/**
 * @file
 * Components - the pieces the Twig templates emit - task T-610.
 *
 * SMACSS `component`: every selector here is a class, and every class here is
 * one this theme's own templates put in the markup. Nothing in this file styles
 * an element that only core emits, because a rule aimed at markup this theme
 * does not control is a rule that breaks silently when core changes it.
 *
 * NO COLOUR LITERALS, like every file except css/tokens.css, and every
 * foreground-on-background combination below is one the token file DECLARES as a
 * pair. That constraint is doing real work rather than decorating this comment:
 * the table header band uses the sunken surface, so the text on it is the text
 * token and the rules on it are the border token, because those are the pairs
 * with computed ratios - 4.5:1 for the text, 3:1 for the rules, which is what
 * WCAG 2.2 SC 1.4.11 asks of a line that separates data rather than decorates.
 *
 * COLOUR IS NEVER THE ONLY CARRIER. The current page in the pager is marked by a
 * thick underline as well as by weight; a row in error is marked by a bar at its
 * inline start and by the word "Error" that only a screen reader hears. Take the
 * colour out of any state in this file and it is still distinguishable.
 */

/**
 * The skip link.
 *
 * The link itself is core's - it is emitted by html.html.twig, which this theme
 * does not override, with the classes `visually-hidden focusable`. Core's own
 * stylesheet is what brings it back into view when it takes focus; all that is
 * added here is enough padding and contrast for the thing to be legible once it
 * appears, because a skip link that surfaces as bare text over whatever it
 * happens to overlap is a feature nobody can use in a hurry.
 */
.visually-hidden.focusable:focus-within {
  z-index: 100;
  padding: var(--agora-space-2xs) var(--agora-space-s);
  color: var(--agora-color-text);
  border: var(--agora-border-width-strong) solid var(--agora-color-border-strong);
  background-color: var(--agora-color-surface);
}

/*
 * ⚠️ WHILE IT HAS FOCUS, THE SKIP LINK IS OUT OF THE FLOW, and that is the
 * whole of the fix for a ring that was never fully on screen. Core brings the
 * link back as `position: static !important` - an inline box at the very top
 * of <body> - and block padding on an inline box grows it ABOVE its line: the
 * link began 8px above the document, its ring 13px above it and 5px past the
 * window's inline start, so the ring lost two sides and the link the top of
 * its own border, on every page at every width. Being in the flow, it also
 * pushed the whole page down by a line, 24px, for as long as it held focus.
 *
 * Positioned, it sits over the corner of the masthead with the ring's extent
 * between it and both edges of the window: all four sides of the ring and of
 * the border are on screen, and nothing under it moves when it takes focus.
 * ABSOLUTE, NOT FIXED, so it stays at the top of the document: a reader who
 * follows it leaves it behind instead of carrying it down over the content
 * they jumped to.
 *
 * `!important` because core's declaration carries it, and between two of
 * those the more specific selector wins - this one by an element. `body >`
 * because that is where core's html.html.twig prints the skip link, and no
 * other focusable hidden element should be lifted to the top of the page.
 */
body > .visually-hidden.focusable:focus-within {
  position: absolute !important;
  inset-block-start: var(--agora-focus-ring-extent);
  inset-inline-start: var(--agora-focus-ring-extent);
}

/**
 * Tables.
 *
 * THE HORIZONTAL SCROLLER. A register of contract awards has more columns than a
 * phone has width. Letting the PAGE scroll sideways breaks WCAG 2.2 SC 1.4.10;
 * letting the TABLE scroll inside its own box does not. The wrapper carries
 * `tabindex="0"` in the template so the scroller can be reached by keyboard -
 * see that file for why it is a region named by the table's caption, and why
 * it is a plain box when there is no caption.
 *
 * `position: relative` IS NOT DECORATION AND IT IS NOT ABOUT POSITIONING
 * ANYTHING. `overflow` clips a descendant only when the scroller is in that
 * descendant's containing-block chain, and an ABSOLUTELY positioned element
 * whose nearest positioned ancestor is nothing at all takes the initial
 * containing block instead - so it escapes the scroller entirely and stretches
 * the document. Core's `.visually-hidden` is `position: absolute`, and Views
 * puts one inside the link in every sortable column header. The result was a
 * page that really did scroll sideways by 108 pixels, measured with
 * `window.scrollTo`, while every element on it appeared to be inside a scroll
 * container.
 *
 * It surfaced the day the column floor above was added and it was latent before
 * that, which is the part worth remembering: the hidden span only escapes once
 * the table is wider than the viewport, so a theme whose columns quietly
 * crushed instead of scrolling could never have shown it. One declaration makes
 * the scroller the containing block, and the span is clipped with everything
 * else.
 *
 * `container-type: inline-size` IS FOR THE CAPTION, and its argument is with
 * .agora-table__caption below. It cannot shrink the scroller: a block box
 * takes its width from its container and never from its content, which is the
 * one thing inline-size containment takes away.
 */
/*
 * ⚠️ THE BORDER IS ON THE TABLE, NOT ON THIS WRAPPER, AND IT MOVED HERE FROM
 * THERE. Reported as a little box sitting on top of the caption and covering it,
 * on every table of this kind, and the report was right about the cause without
 * naming it.
 *
 * A `<caption>` is a child of `<table>` but CSS lays it out OUTSIDE the table's
 * border box - above it. Drawn on this wrapper instead, the border enclosed the
 * caption as well, so the table's own title ended up inside the frame, in a
 * strip of the table's white ground directly above the header row's cream. Two
 * bands stacked inside one rectangle, which reads as a lid on a box rather than
 * as a title above a table.
 *
 * On the table, the border wraps the grid and the caption sits above it, which
 * is what the element is for and what its default layout already wanted to do.
 *
 * THE ROUNDED CORNERS ARE THE PRICE AND THEY ARE GIVEN UP DELIBERATELY.
 * `border-collapse: collapse` - set in css/base.css and load-bearing for every
 * row separator in this theme - makes `border-radius` inert on a table. Keeping
 * the radius would mean `border-collapse: separate`, which changes how every
 * cell border in every table draws. A square-cornered data table is ordinary;
 * re-drawing every table's grid to keep one radius is not a trade worth making.
 */
.agora-table__scroll {
  position: relative;
  overflow-x: auto;
  margin-block-end: var(--agora-space-l);
  container-type: inline-size;
}

/*
 * THE FOCUS RING IS PART OF WHAT A REVEAL HAS TO SHOW, and the room for it is
 * made in css/typography.css, not here. js/table-scroll.js reveals a
 * keyboard-focused link with `nearest`, which aligns the link's BOX with the
 * scroller's edge, and the ring is drawn outside that box: 561 of 2436 stops
 * inside the table scrollers lost a side of it, on the RIGHT going forward and
 * on the LEFT going back. The scroll margin every `:focus-visible` element
 * carries is the ring's extent, and it is what `nearest` keeps on screen.
 *
 * It was a rule scoped to this box on its first day, 2026-09-24, and it moved
 * the same day, when the window's own focus scrolling was found cutting the
 * ring the same way everywhere else - and missing this box's own focus, which
 * the scoped selector never matched. One rule serves both: two copies of one
 * rule is how one of them ends up wrong.
 */

/**
 * A TABLE CARRIES ITS OWN GROUND, and this is a repair rather than a
 * refinement.
 *
 * The banded rows and the header band were both designed as tints OF THE PAGE,
 * measured against white and only against white. Then the page grew alternating
 * section bands and the ground moved underneath them: on a cream section the
 * banded row is `--agora-color-surface-subtle` sitting on
 * `--agora-color-surface-subtle`, which is 1.00:1 - the same colour - and the
 * header band lands at 1.10:1. The table lost its edges on exactly the page it
 * most needed them.
 *
 * THIS IS A DESIGN DEFECT AND NOT A CONFORMANCE ONE, and the distinction is
 * worth writing down because it would be easy and wrong to inflate. SC 1.4.11
 * governs graphical objects and interface components that CONVEY INFORMATION; a
 * zebra fill conveys none, and the structure a reader needs is carried by the
 * cell rules - `--agora-color-border`, which clears the threshold against every
 * declared surface - and by the header semantics. Nothing here was ever
 * unreadable to a screen reader or a contrast tool. It was ugly, and ugly is
 * reason enough.
 *
 * Naming the ground on the table itself is what makes the fix general. It is
 * not a rule about the front page, or about which section is tinted, or about
 * what a container query might report: a table sits on the page surface
 * wherever it is put, so the tints above it keep the relationships they were
 * designed with, and a section band cannot move them again.
 *
 * The last row gives up its own rule so it does not double with the border on
 * the wrapper; two hairlines a pixel apart read as a mistake.
 */
.agora-table {
  border: var(--agora-border-width) solid var(--agora-color-border);
  background-color: var(--agora-color-surface);
}

.agora-table tbody tr:last-child > * {
  border-block-end: 0;
}

/**
 * The caption is the table's name, and it is styled to look like one: aligned
 * with the first column, above the data, in the body colour rather than a
 * dimmed one. A caption in muted gray reads as a footnote about the table
 * instead of as its title.
 *
 * THE CAPTION STAYS AS WIDE AS THE WINDOW ONTO THE TABLE, NOT AS THE TABLE.
 * CSS lays a caption out across the table's full width, so on a phone a
 * register's title ran on one line under the scroller's edge and could only
 * be read by scrolling the table sideways - "One row per published contra",
 * measured at 320px by the WCAG 2.2 review of 2026-10-27 (advisory A7).
 * Three declarations, and each does one job:
 *   * the scroller is a size container (above), so `100cqi` here is the
 *     width of what the reader can see of the table;
 *   * `max-inline-size` makes the caption wrap at that width rather than at
 *     the table's;
 *   * `position: sticky` at the inline start keeps it there while the table
 *     scrolls under it, so the title is still on screen at the last column.
 * Measured in Chrome 156 and Firefox 157 at 320 and 1280px before it was
 * written: the caption fits the visible box at both ends of the scroll, the
 * scroller and the table keep their widths, the table's accessible name is
 * unchanged, and at 1280 - where the table fits - nothing moves. The table
 * scroller test in tests/src/Nightwatch/Tests/axe.js measures the same.
 */
.agora-table__caption {
  position: sticky;
  inset-inline-start: 0;
  max-inline-size: 100cqi;
  padding-block-end: var(--agora-space-2xs);
  text-align: start;
  color: var(--agora-color-text);
  font-size: var(--agora-font-size-md);
  font-weight: var(--agora-font-weight-bold);
}

/**
 * The floor that makes the horizontal scroller do something.
 *
 * See --agora-table-column-min in css/base.css for the measurement and for why
 * the floor is on the cells and not on the table. The scroller in
 * .agora-table__scroll has existed since this theme could render a table; what
 * it lacked was anything to scroll, because the columns would collapse before
 * the table ever grew past its container.
 */
.agora-table th,
.agora-table td {
  min-width: var(--agora-table-column-min);
}

/**
 * The sort link in a column header.
 *
 * MEASURED AT 49 BY 17 CSS PIXELS, which is under the 24 by 24 that WCAG 2.2
 * SC 2.5.8 asks of a pointer target. It was already conforming: the Spacing
 * exception allows an undersized target whose 24px circle does not touch
 * another target's, and the nearest neighbouring target on any register page
 * measured 49px away centre to centre - twice the distance the exception needs.
 *
 * Conforming by exception is still conforming, and it is still worse than not
 * needing the exception. A header cell has room, the change costs one rule, and
 * a claim that does not depend on measuring the gap to the next link is a claim
 * that survives somebody adding a second sortable column beside this one.
 */
.agora-table thead th a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

.agora-table thead th {
  padding-block: var(--agora-space-s);
  letter-spacing: 0.02em;
  color: var(--agora-color-text);
  border-block-end: var(--agora-border-width-strong) solid var(--agora-color-border-strong);
  background-color: var(--agora-color-surface-sunken);
  font-size: var(--agora-font-size-sm);
}

/**
 * Banded rows.
 *
 * A register of contract awards is read ACROSS - which supplier, how much, on
 * what date - and the eye loses the row somewhere around the fourth column. The
 * band is what carries it. It is a tint of the panel surface rather than a new
 * colour, so the text on it is the same declared pair as the text on a panel and
 * nothing new needed checking.
 *
 * IT IS NOT THE ONLY THING HOLDING THE ROW TOGETHER, and that matters here more
 * than usual. The hairline under every cell survives a monochrome print-out, and
 * a register printed and taken away is a normal way for a citizen to use this
 * site. The band is an aid; the rule is the structure.
 */
.agora-table tbody tr:nth-child(even) {
  background-color: var(--agora-color-surface-subtle);
}

/* A row header - the cell that says WHOSE salary the row is about. It is a
   <th scope="row">, so it is already announced as the row's header; the deeper
   panel background is what makes the same structure visible to everyone else,
   and it is a step darker than the band above so the two never coincide. */
.agora-table tbody th {
  background-color: var(--agora-color-surface-sunken);
}

/**
 * A row header that is a register's title, which is a link already.
 *
 * THE SEMANTIC PROMOTION SHOULD NOT COST A VISUAL ONE. In these registers
 * column one is the record's title and it is rendered as a link - navy,
 * underlined, and usually the only link in its row. Adding a deeper background
 * and a heavier weight on top of that is three signals carrying one fact, and
 * it paints a full-height coloured column down the left of every register while
 * telling a reader nothing the link had not already told them. The cell is
 * promoted to a header because that is TRUE, not because it should look
 * different, so the two treatments the header layer would otherwise apply are
 * taken back and the row header renders as an ordinary cell.
 *
 * `transparent` RATHER THAN THE PAGE SURFACE, and the difference is visible on
 * every second row. Painting the cell white would punch a white notch through
 * the banded rows above; letting the row's own band show through is what keeps
 * the stripe continuous. It is also not a colour - it names no value and has no
 * contrast pair to declare - which is why tests/bin/no-colour-literals leaves
 * it alone by construction rather than by exception.
 *
 * SCOPED TO THE DECLARATION AND NOT TO THE PATH. The obvious scope was "the
 * Views table", which would have meant matching on the column-count class or on
 * some other proxy for which template ran. This keys on the same class that
 * CREATED these header cells, which is tighter: appearance and semantics cannot
 * drift apart, because the rule cannot fire on a cell the declaration did not
 * make. templates/table.html.twig serves the `#type: table` route, where a row
 * header is a genuine header and not a link, and it never carries this class -
 * so the sunken treatment above stays exactly where it is right.
 */
.agora-table.agora-row-header-first tbody th {
  background-color: transparent;
  font-weight: var(--agora-font-weight-normal);
}

/**
 * Numeric columns.
 *
 * RIGHT-ALIGNED, AND THE REASON IS THE PRODUCT RATHER THAN THE TYPOGRAPHY. Two
 * awards of 8,400.00 and 142,300.00 are only comparable at a glance if their
 * last digits sit in the same column; left-aligned they are compared by reading
 * each one, which is what publishing a table was supposed to avoid. The
 * tabular, lining figures that make the digits equal width are set on `table`
 * itself in css/typography.css, and this is the other half of that decision.
 *
 * A STYLESHEET CANNOT TELL WHICH COLUMN HOLDS MONEY, so this is a mechanism and
 * not a detector, and it accepts the two names a Drupal site can actually
 * produce. `views-align-right` is Views' own per-column alignment option, set in
 * the view's table settings, so a register built as a view needs no markup
 * change at all. `agora-numeric` is for the other path - a `#type: table` built
 * in code, where the caller sets the class on the cell.
 *
 * The end keyword rather than `right`, because a right-to-left site's numbers
 * still belong at the end of the cell.
 */
.agora-table .agora-numeric,
.agora-table .views-align-right {
  text-align: end;
}

.agora-table .views-align-center {
  text-align: center;
}

/**
 * The empty state.
 *
 * A register with no entries is a truthful answer, not an error, and it is
 * rendered as a sentence rather than as a blank table. It is NOT italic: italics
 * at small sizes are measurably harder for dyslexic readers, and the muted
 * colour plus the full-width row already distinguish it from data.
 */
.agora-table__empty td {
  padding-block: var(--agora-space-m);
  color: var(--agora-color-text-muted);
}

/**
 * The sentence a CSV distribution gets INSTEAD of a table.
 *
 * IT IS NOT A WARNING AND IT IS NOT STYLED AS ONE. Nothing has gone wrong that
 * a reader has to act on: the file is published, it is linked immediately above
 * this, and the page is explaining why it chose not to redraw it here. A status
 * colour or an icon would make an ordinary editorial decision look like an
 * error on a page whose whole job is to be trusted.
 *
 * THE SAME MUTED TREATMENT AS THE EMPTY-TABLE ROW ABOVE, and for the same
 * reason: both are the page speaking about the data rather than being the data,
 * and a reader who has learnt what one of them looks like has learnt the other.
 * The colour pair is the one css/tokens.css already declares for text on the
 * page surface, so this rule introduces nothing for contrast-check to judge.
 *
 * ⚠️ THE COLOUR CARRIES NO MEANING OF ITS OWN. Every fact the note conveys -
 * which file, why, and both numbers - is in the words, so a reader who cannot
 * distinguish it from the surrounding text loses nothing at all.
 */
.agora-csv-table__note {
  max-width: var(--agora-measure);
  margin-block: 0 var(--agora-space-l);
  color: var(--agora-color-text-muted);
}

/**
 * The pager.
 *
 * Every item is at least one target wide and tall - see --agora-target-size -
 * because pagination controls are the most-tapped thing on a register and the
 * easiest to make too small.
 */
.agora-pager__items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--agora-space-3xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.agora-pager__items a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--agora-target-size);
  min-height: var(--agora-target-size);
  padding-inline: var(--agora-space-2xs);
  text-decoration: none;
  border-block-end: var(--agora-border-width-strong) solid transparent;
}

.agora-pager__items a:hover {
  text-decoration: underline;
}

/* The current page. `aria-current` is the selector on purpose: it styles the
   attribute that assistive technology reads, so the visible state and the
   announced state cannot drift apart. The thicker rule is a shape; the weight is
   a second non-colour cue. */
.agora-pager__items a[aria-current="page"] {
  color: var(--agora-color-text);
  border-block-end-color: var(--agora-color-border-strong);
  font-weight: var(--agora-font-weight-bold);
}

/**
 * The breadcrumb trail.
 *
 * THE SEPARATOR IS A SHAPE AND NOT A CHARACTER, and this is the whole reason
 * the component needs a stylesheet entry rather than inheriting the defaults.
 * The usual breadcrumb writes a `/` or a `>` into the markup between the items,
 * and a screen reader then reads that character out loud once per crumb -
 * "Home slash Contracts slash" - because it is a text node like any other. The
 * chevron below is drawn from two borders on an empty pseudo-element, so there
 * is no text node between the items at all and nothing to hide from anybody:
 * `content: ""` produces no accessible text in any engine, which `aria-hidden`
 * on a real character achieves only by asking to be believed.
 *
 * It is a rotated square with two of its four borders painted. Both are drawn
 * in the strong border token, whose pair against the page surface is DECLARED
 * and computed at the non-text threshold of WCAG 2.2 SC 1.4.11 - a mark that
 * separates one item from the next is a graphical object, not decoration, so
 * 3:1 is the bar it has to clear rather than one it is exempt from.
 *
 * THE LINKS CARRY A MINIMUM TARGET. A crumb is a link on its own line rather
 * than a link inside a sentence, so the inline exception to SC 2.5.8 is not
 * one this component may lean on; `--agora-target-size-min` is the criterion's
 * own 24 CSS pixels, and it is a different token from the pager's, which uses
 * the far larger AAA figure because a pager is the most-tapped control on a
 * register and a breadcrumb is not.
 *
 * The trail is set one step down the type scale. It is orientation rather than
 * content: it says where the page sits, and the page's own heading, immediately
 * below it, says what the page is.
 */
.agora-breadcrumb {
  margin-block-end: var(--agora-space-s);
  font-size: var(--agora-font-size-sm);
}

.agora-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agora-breadcrumb__item {
  display: flex;
  align-items: center;
}

.agora-breadcrumb__item + .agora-breadcrumb__item::before {
  width: var(--agora-crumb-chevron-size);
  height: var(--agora-crumb-chevron-size);
  margin-inline: var(--agora-space-2xs);
  content: "";
  transform: rotate(45deg);
  border-block-start: var(--agora-border-width) solid var(--agora-color-border-strong);
  border-inline-end: var(--agora-border-width) solid var(--agora-color-border-strong);
}

.agora-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--agora-target-size-min);
}

/* The page you are on, where the trail includes it. `aria-current` is the
   selector, exactly as it is on the pager: the visible state and the announced
   state are then the same fact rather than two facts that can drift. The weight
   is the only cue and it is not a colour, so the crumb is still distinguishable
   with the palette removed - and it is already the one item in the row that is
   not a link, which the underline says on its own. */
.agora-breadcrumb__item[aria-current="page"] {
  font-weight: var(--agora-font-weight-bold);
}

/**
 * Menus.
 *
 * The markers are removed, and the template compensates by declaring
 * `role="list"` on the same element. That is not belt-and-braces: Safari with
 * VoiceOver stops exposing a list as a list once `list-style: none` is applied,
 * so removing the bullet silently removes "list, 4 items" from what a
 * screen-reader user hears. The role puts it back.
 */
.agora-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.agora-menu .agora-menu {
  padding-inline-start: var(--agora-space-m);
}

.agora-menu__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--agora-target-size);
  padding-inline: var(--agora-space-3xs);
}

/**
 * Form items.
 */
.agora-form-item {
  margin-block-end: var(--agora-space-m);
}

.agora-form-item__description {
  max-width: var(--agora-measure);
  margin-block-start: var(--agora-space-3xs);
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-sm);
}

/**
 * A field in error.
 *
 * The bar at the inline start is the visible carrier of the state, and it is a
 * shape rather than a hue, so a reader who cannot tell the two hues apart still
 * sees the bar, and a screen-reader user hears the word "Error" the template
 * prints in front of the message. WCAG 2.2 SC 1.4.1.
 *
 * (That sentence used to name a colour after a colon, and tests/bin/no-colour-literals
 * reported it on its very first run. The check cannot tell prose from a
 * declaration - it says so in its own header - and the remedy for a prose match
 * is to reword the prose, never to teach the check an exception.)
 */
.agora-form-item__error {
  margin-block-end: var(--agora-space-2xs);
  padding-inline-start: var(--agora-space-2xs);
  color: var(--agora-color-status-error);
  border-inline-start: var(--agora-border-width-strong) solid var(--agora-color-status-error);
  font-weight: var(--agora-font-weight-bold);
}

/**
 * Fields.
 *
 * The label is a heavier weight rather than a different colour, so that the
 * pairing of label and value survives a monochrome print-out of a page - which
 * is how a citizen most often takes a record of a public document away with
 * them.
 *
 * `.agora-field__items` keeps its list markers. Removing them would need the
 * same `role="list"` repair described under the menu above, and here the bullets
 * are doing something useful anyway: they show at a glance that a contract has
 * four attached documents rather than one.
 */
.agora-field {
  margin-block-end: var(--agora-space-s);
}

.agora-field__label {
  font-weight: var(--agora-font-weight-bold);
}

/**
 * The record sheet - a node in the FULL view mode, and nowhere else.
 *
 * WHAT IT REPLACES AND WHY. A detail page here is a stack of label-and-value
 * pairs: ten of them on a contract, six on a councillor. Rendered as core
 * leaves them - each label on its own line with its value under it - the page
 * became a narrow ribbon down the left of the viewport with the entire right
 * half of a desktop window empty, and twice as tall as it needed to be. The
 * shape below is the one a public register has converged on everywhere it is
 * published on paper: the label in a column of its own, the value beside it,
 * one hairline between rows, the whole thing on a panel that is plainly a
 * record rather than an article.
 *
 * THE MEASURE IS NOT WIDENED TO FILL THE SPACE, which is the tempting fix and
 * the wrong one. Every value keeps `--agora-measure`, so no line of text gets
 * longer than it was; what changes is that the label no longer spends a whole
 * line of its own, and that the panel - which is a surface, not a line of text -
 * takes the width the text is not allowed to. Empty space is a smaller problem
 * than an unreadable line, so the space is filled by the composition and not by
 * the prose.
 *
 * THE PANEL IS THE SUBTLE SURFACE, and every foreground that can appear on it
 * is a pair the token file DECLARES and has computed: body text, muted text,
 * links in all three states, the borders, the focus ring. That is the whole
 * reason this component may use a second surface at all - a panel whose
 * foregrounds were chosen by eye is exactly what the token file exists to
 * refuse.
 *
 * THE TWO-COLUMN FORM IS KEYED ON A LABEL THAT IS ACTUALLY VISIBLE. A field
 * whose label is hidden renders no label element, and a field whose label is
 * set to `visually_hidden` renders one that is taken out of the flow by
 * `position: absolute` - in a grid, an absolutely positioned child is not a
 * grid item at all, so the value would slide into the LABEL track and be set in
 * a seventeen-rem column. Both cases are excluded here rather than discovered
 * later on somebody's site: they fall through to the single-column form, which
 * is the right shape for a body field anyway.
 *
 * ONE BREAKPOINT, AND IT IS THE ONE THE THEME ALREADY HAS. 60rem is where the
 * header lifts its second-level row; reusing it means the page has two states
 * rather than four, and means no second number to keep in step with the first.
 * Below it the rows stack as before, because a label column plus a value column
 * inside a phone's width leaves neither of them readable.
 */
.agora-node--full .agora-node__content {
  padding: var(--agora-space-s) var(--agora-space-m);
  border: var(--agora-border-width) solid var(--agora-color-border);
  border-radius: var(--agora-radius);
  background-color: var(--agora-color-surface-subtle);
}

.agora-node--full .agora-field {
  margin-block-end: 0;
  padding-block: var(--agora-space-xs);
  border-block-end: var(--agora-border-width) solid var(--agora-color-border);
}

.agora-node--full .agora-field:first-child {
  padding-block-start: 0;
}

/* The last row closes the panel, so its rule would sit a padding's width above
   the panel's own edge and read as a second, thinner border. */
.agora-node--full .agora-field:last-child {
  padding-block-end: 0;
  border-block-end: 0;
}

/* A value never runs past the measure, whatever room the column has. The list
   form is capped too: a field with four attached documents is still prose. */
.agora-node--full .agora-field__item,
.agora-node--full .agora-field__items {
  max-width: var(--agora-measure);
}

/* The last thing inside a value adds no margin of its own. A rich-text field
   ends in a <p>, which carries a bottom margin from the base stylesheet, and
   that margin lands INSIDE the row - so the one row containing prose sat lower
   than every other and its hairline drifted out of the rhythm the rest of the
   sheet keeps. Seen in a rendered page at 1440, not reasoned about. */
.agora-node--full .agora-field__item > *:last-child {
  margin-block-end: 0;
}

@media (min-width: 60rem) {
  .agora-node--full .agora-node__content {
    padding: var(--agora-space-m) var(--agora-space-l);
  }

  .agora-node--full .agora-field:has(> .agora-field__label:not(.visually-hidden)) {
    display: grid;
    grid-template-columns: minmax(0, var(--agora-record-label-width)) minmax(0, 1fr);
    gap: var(--agora-space-3xs) var(--agora-space-l);
    align-items: baseline;
  }
}

/**
 * The masthead.
 *
 * ONE LINK, NOT TWO. templates/block--system-branding-block.html.twig explains
 * why the mark and the name are a single anchor rather than core's two; the job
 * here is only to lay them out side by side and to take the underline off,
 * because a link whose text is the site's own name in a masthead is identified
 * by its position and its size rather than by a rule under it. WCAG 2.2 SC 1.4.1
 * is about links inside blocks of text, which this is not - and the hover rule
 * below puts the underline back the moment a pointer is on it.
 */
/*
 * THE MARK AND NAME ON ONE LINE, THE SLOGAN ON THE NEXT - AND IT USED TO BE ONE
 * ROW WITH THE THREE OF THEM BASELINE-ALIGNED, WHICH IS THE DEFECT THIS RULE
 * FIXES. Both halves of that arrangement were wrong, and the second was the
 * expensive one.
 *
 * BASELINE ACROSS TWO VERY DIFFERENT SIZES DROPS THE SMALL ONE. The name is
 * `--agora-font-size-lg` bold and the slogan `--agora-font-size-sm`; sitting
 * them on a shared baseline puts the slogan's whole box 28px below the top of
 * the name - measured, not estimated - so it read as hanging in mid-air beside
 * the masthead rather than belonging to it. The comment on the footer's own
 * column rule argued the opposite, that baseline is what "stops them looking
 * dropped". That was written from the two-row layout and it is falsified here;
 * it is corrected in place rather than left to be discovered twice.
 *
 * AND THE ROW WAS THE REASON THE SEARCH FIELD WAS STRANDED. Side by side, this
 * block measures 505px. The banner row is the region plus the field, so
 * 505 + gap + navigation + gap + 288 exceeded the 1200px container and the row
 * wrapped exactly where css/layout.css says it wraps first - the search dropped
 * to a line of its own at the far left and the band went to 130px. Stacked, the
 * block is the width of the link alone and the row fits with room to spare. The
 * ugly banner and the tall banner were one defect, not two.
 *
 * `align-items: start` AND NOT THE DEFAULT `stretch`: in a column the cross
 * axis is the inline one, so stretching would run the link's hit area the full
 * width of the header with nothing in most of it.
 */
.agora-branding {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: var(--agora-space-3xs);
}

.agora-branding__home,
.agora-branding__home:visited,
.agora-branding__home:hover {
  display: flex;
  align-items: center;
  gap: var(--agora-space-xs);
  text-decoration: none;
  color: var(--agora-color-text);
}

.agora-branding__home:hover .agora-branding__name {
  text-decoration: underline;
}

/**
 * The mark.
 *
 * Sized in rem so that it grows with the reader's own font size along with the
 * name beside it - a masthead where the name doubles and the logo does not is
 * the usual result of sizing one of them in pixels.
 *
 * ⚠️ FIXED BY HEIGHT AND SCALED BY THE REAL RATIO, NOT FIXED BY WIDTH WITH
 * `height: auto`, which is what this rule used to be. That was backwards for
 * any mark wider than it is tall: the width held at the token's own value and
 * the height followed the file's real ratio down from it, so a 240x64 upload
 * measured 44px wide and 12px tall - correct in the one axis nobody was
 * looking at and wrong in the one that sets how much of the masthead the mark
 * actually fills. Fixing the height instead means every mark, whatever its
 * shape, stands at the same visual weight beside the site name.
 *
 * `--agora-branding-mark-ratio` IS SET INLINE BY THE TEMPLATE, from the real
 * file's own width divided by its own height, computed once in this theme's
 * own block preprocess - CSS has no way to read an image's intrinsic
 * ratio into a calculation on a sibling element. The fallback of `1` is the
 * theme's own mark, which is square, and is also what applies whenever the
 * real ratio could not be measured (an SVG this theme did not draw, or a file
 * that failed to read) - the safe assumption already documented on the footer
 * mark's own three-state design: a wrong SQUARE guess costs a reflow at worst,
 * where the old width-fixed rule cost a permanently wrong final size.
 *
 * ⚠️ THIS CLASS IS SHARED WITH THE FOOTER MARK, AND THE RATIO IS NEVER SET
 * THERE - deliberately, and not a gap this rule needs to close. The footer's
 * own field asks for a square image outright ("drawn to read at 44 pixels
 * across on the dark navy band"), the theme's default footer mark is square,
 * and the fallback of `1` renders both of those correctly. A council that
 * uploads a NON-square footer mark against that field's own advice gets it
 * stretched to fit a square box - a visible defect, but on a path this
 * project's own field description already tells a site not to take, and no
 * worse than the squashed height `width: var(--agora-branding-mark)` with
 * `height: auto` already produced there for the same upload.
 */
.agora-branding__logo {
  width: calc(var(--agora-branding-mark) * var(--agora-branding-mark-ratio, 1));
  height: var(--agora-branding-mark);
}

.agora-branding__name {
  font-size: var(--agora-font-size-lg);
  font-weight: var(--agora-font-weight-bold);
  line-height: var(--agora-line-height-heading);
}

/*
 * THE INDENT IS THE MARK PLUS THE GAP BESIDE IT, and it is written as that sum
 * rather than as the pixel it comes to, because that is what it MEANS: the
 * slogan starts where the name starts. The two lines then share a left edge and
 * the block reads as one thing.
 *
 * It cannot be done with alignment instead. The mark and the name are inside a
 * single `<a>` - deliberately, so the masthead is one tab stop and one
 * accessible name - so the slogan is a sibling of that link, not of the name,
 * and no alignment property in the parent can see the name's edge. `subgrid`
 * could, but its fallback when unsupported is a one-column grid that puts the
 * mark ABOVE the name, which is a worse banner than the one being fixed.
 *
 * ⚠️ THE SUM ASSUMED A SQUARE MARK, AND THAT IS THE SAME DEFECT THE MARK'S OWN
 * RULE HAD. `var(--agora-branding-mark)` is the mark's HEIGHT, and before this
 * the mark's rendered WIDTH happened to equal it - true of a square logo and
 * false of anything else, so a 240x64 upload left the slogan indented under
 * the mark's own left half rather than under the name. The same
 * `--agora-branding-mark-ratio` custom property the mark itself now reads
 * multiplies in here too, because "where the mark's rendered box ends" is one
 * quantity with two readers, and D-048's own rule elsewhere in this project is
 * that one question is one variable rather than two tests that can disagree.
 */
.agora-branding__slogan {
  max-width: var(--agora-measure);
  margin: 0;
  padding-inline-start: calc(var(--agora-branding-mark) * var(--agora-branding-mark-ratio, 1) + var(--agora-space-xs));
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-sm);
}

/**
 * The banner band's two rows.
 *
 * The masthead sits above a hairline and the navigation below it. Two rows
 * rather than one because the navigation of a transparency portal is a list of
 * registers with real names - "Contracts and tenders", "Senior salaries" - and
 * squeezing those beside a name and a mark is what forces the abbreviations
 * nobody can search for. It also means the whole thing degrades by wrapping,
 * with no disclosure widget and no script: at 390px the mark and name stay on
 * one line and the navigation wraps under itself.
 *
 * `nav` IS CORE'S ELEMENT AND NOT THIS THEME'S CLASS, which is the one place
 * this file breaks its own rule about styling markup the theme does not emit.
 * It is deliberate and it is the narrower risk: the alternative is overriding
 * core's block--system-menu-block.html.twig, and that template is what supplies
 * the navigation landmark's accessible name through an id it generates itself.
 * Reproducing that in order to add a class would put the accessible name of
 * every menu on this repository's shoulders to keep working. A nav element
 * inside a banner is about as stable as core markup gets.
 */
.agora-page__header .agora-branding {
  padding-block: var(--agora-space-m);
}

.agora-page__header nav {
  border-block-start: var(--agora-border-width) solid var(--agora-color-border);
}

.agora-page__header .agora-menu--level-0 {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 var(--agora-space-l);
}

/**
 * A top-level item is a column: its own link, then its children under it.
 *
 * `align-items: flex-start` IS NOT COSMETIC HERE. Without it the link stretches
 * to the width of the item, and the item is as wide as the row of children
 * below it - so the accent rule that marks the current section ran on past the
 * end of the word it was underlining, for as far as the submenu was wide. The
 * rule has to be the width of the label it belongs to or it stops reading as an
 * underline and starts reading as a divider.
 */
.agora-page__header .agora-menu__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.agora-page__header .agora-menu__link {
  min-height: var(--agora-target-size);
  padding-block: var(--agora-space-2xs);
  padding-inline: 0;
  text-decoration: none;
  color: var(--agora-color-text);
  border-block-end: var(--agora-rule-accent) solid transparent;
  font-weight: var(--agora-font-weight-bold);
}

.agora-page__header .agora-menu__link:hover {
  text-decoration: underline;
}

/**
 * Where you are.
 *
 * `is-active` IS THE ONE SIGNAL THIS USES, AND THE CHOICE WAS MEASURED RATHER
 * THAN ASSUMED. The obvious mechanism is `item.in_active_trail` in the menu
 * template, which is exactly what it sounds like and would be one Twig line. It
 * was written that way first and then checked on a running site with the value
 * printed into a data attribute on every list item: it is FALSE on every item of
 * every page, including the page a link points at, with the menu block
 * configured either way round. Whatever the reason - the links in question are
 * `views_view` derivatives - a stylesheet cannot be built on a flag that does
 * not arrive, and shipping the rule anyway would have looked like working code.
 *
 * `is-active` does arrive, on the same pages, from core's
 * ActiveLinkResponseFilter, which compares the request path after the page is
 * rendered. Verified on the same site: exactly one menu link carries it on a
 * register page and none carries it elsewhere.
 *
 * `:has()` IS WHAT TURNS THAT INTO A SECTION MARKER. The class lands on the
 * link for the current page and nowhere else, so a second-level page would
 * otherwise leave the whole primary bar unmarked. The selector reads "the item
 * that contains the active link", which marks the section whether the active
 * link is the section itself or one of its children. Where `:has()` is not
 * supported the section is simply not marked - the navigation still works and
 * nothing overlaps.
 *
 * THREE CUES, NOT ONE. The rule beneath is a shape, the weight is already bold
 * and stays bold, and the hue is the third. Take the colour away - print it,
 * or read it with a colour vision deficiency - and the rule is still there.
 * WCAG 2.2 SC 1.4.1. The rule's width is reserved on every item as a
 * transparent border, so nothing shifts by four pixels when a section becomes
 * the current one.
 */
.agora-page__header .agora-menu__link.is-active,
.agora-page__header .agora-menu__item:has(.agora-menu__link.is-active) > .agora-menu__link {
  color: var(--agora-color-accent-strong);
  border-block-end-color: var(--agora-color-accent);
}

/**
 * The second level, shown for the current section only.
 *
 * WHAT IS HIDDEN AND WHAT IS NOT, said plainly because `display: none` removes
 * content from assistive technology as well as from the screen and that is not
 * a thing to do quietly. Every second-level link is rendered into the page by
 * the menu block on every request - the markup is there, and the accessibility
 * gate counts it - but only the children of the section the reader is currently
 * in are displayed. The links that are hidden are the children of OTHER
 * sections, and every one of them is reachable in one step: follow the section,
 * and its children appear here and are listed on the section's own page. That
 * is the same shape as a government site's primary navigation and it is why no
 * disclosure widget is needed, which in turn is why there is no script in this
 * theme at all.
 *
 * THERE IS DELIBERATELY NO FRONT-PAGE EXCEPTION, and it is worth saying so
 * because one was written and then removed. On the front page nobody is inside
 * a section yet, so this rule leaves a first-time visitor looking at the top
 * level alone - which was a genuine discoverability failure while the front
 * page had nothing else pointing at the registers. It was answered here for a
 * day, by showing every second level on that page as a stacked column, at a
 * cost of roughly 200px of masthead. It is answered better by the front page
 * itself: that page now lists every register as a link in its own content,
 * which says it plainly instead of asking a masthead to. A page that names its
 * own entry points beats a navigation rule that reveals them, so the rule went
 * and the masthead went back to one height on every page.
 *
 * The alternative considered and refused was a hover-or-focus dropdown. WCAG 2.2
 * SC 1.4.13 requires such content to be dismissible with the keyboard, and
 * dismissible cannot be done in CSS, so the honest version of that pattern is a
 * script - for a menu whose second level is at most a handful of registers.
 */
.agora-page__header .agora-menu--level-1 {
  display: none;
}

.agora-page__header .agora-menu__item:has(.agora-menu__link.is-active) > .agora-menu--level-1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--agora-space-m);
  padding-block-end: var(--agora-space-2xs);
  padding-inline-start: 0;
}

.agora-page__header .agora-menu--level-1 .agora-menu__link {
  min-height: 1.5rem;
  padding-block: var(--agora-space-3xs);
  color: var(--agora-color-link);
  border-block-end: 0;
  font-size: var(--agora-font-size-sm);
  font-weight: var(--agora-font-weight-normal);
}

.agora-page__header .agora-menu--level-1 .agora-menu__link:hover {
  color: var(--agora-color-link-hover);
}

.agora-page__header .agora-menu--level-1 .agora-menu__link.is-active {
  color: var(--agora-color-accent-strong);
}

/**
 * The one media query in this theme, and what it buys.
 *
 * IN FLOW, THE SECOND-LEVEL ROW MAKES ITS PARENT AS WIDE AS ITSELF. The item is
 * a column containing a short link and a row of six, so the column is the width
 * of the six - and the next top-level link is pushed half a screen to the right
 * of the one before it. That was measured on a rendered page: with the section
 * open, the second primary link started at x=680 instead of x=370.
 *
 * Above this width the row is lifted out of the flow and laid across the whole
 * navigation, which is where a section's sub-navigation belongs anyway, and the
 * space it occupies is reserved on the list above it so that nothing is covered.
 * Below this width nothing is lifted: the primary links have already wrapped
 * onto separate lines, so a wide item costs nothing and an absolutely
 * positioned row of unknown height would be the only thing that could overlap.
 *
 * `flex-wrap: nowrap` IS WHAT MAKES THE RESERVED HEIGHT HONEST. A reserved
 * height is a promise about how tall the row is, and a row that may wrap cannot
 * keep it - two lines in a one-line reserve would sit on top of the heading
 * below. Not wrapping makes the height exactly one line whatever a site puts in
 * its menu; a menu with more children than fit scrolls inside the header rather
 * than pushing the page sideways, and every link in it is still a tab stop, so
 * the scroll container is reachable from the keyboard by definition.
 *
 * ⚠️ THE ROW IS LAID ACROSS THE HEADER REGION, NOT ACROSS THE LIST, AND THAT
 * IS A CORRECTION. It used to be positioned against the level-0 list, whose
 * width is the width of the two top-level links - 338px at a 1024 viewport -
 * while six register links need 500px. So between 1024 and about 1150px the
 * last one or two links were CUT OFF, scrollable in principle and invisible
 * in practice: `overflow-x: auto` draws no scrollbar on a touch-style pointer
 * and nothing on the page said there was more. Measured with
 * elementFromPoint at the centre of "Grants" and "Datasets", which returned
 * the page container. The region - the branding and the navigation together,
 * `flex: 1 1 auto` in the banner row - is 652px at 1024 and grows to the
 * whole row the moment the search field wraps under it, so the six links fit
 * at every width this query covers, and the row is still bounded by an
 * ancestor rather than by the viewport. The scroll stays as the guard for a
 * site with more children than any width holds.
 *
 * THE PROPERTY I-110 BOUGHT STILL HOLDS: the row is still lifted out of the
 * flow, so the masthead does not re-centre and its height does not change
 * when a page has a second level - the reserve on the list is what pays for
 * the row's height, exactly as before. Its bottom edge is the region's bottom
 * edge, which is the list's own bottom edge because the list carrying the
 * reserve is the tallest thing in the region: the mark beside it is drawn at
 * --agora-branding-mark, a length this theme sets, so no uploaded logo can
 * grow the branding past the list and under the row.
 */
@media (min-width: 60rem) {
  .agora-page__header .agora-region--header {
    position: relative;
  }

  /*
    The space is reserved only on the pages that use it, which is why there are
    two selectors and not one. A page with no open section would otherwise carry
    an empty band under its navigation on every view - measured on the 404 page,
    where the reserve was the only thing in the header below the links.

    Each :has() is a single level, deliberately: the specification forbids
    nesting :has() inside :has(), so "an item that has children and contains the
    active link" cannot be written as one test. It is written as the two cases
    that actually occur - the active link is INSIDE a second-level list, or the
    active link is a top-level one that HAS a second-level list beside it.
  */
  .agora-page__header .agora-menu--level-0:has(.agora-menu--level-1 .agora-menu__link.is-active),
  .agora-page__header .agora-menu--level-0:has(.agora-menu__link.is-active + .agora-menu--level-1) {
    padding-block-end: var(--agora-subnav-reserve);
  }

  .agora-page__header .agora-menu__item:has(.agora-menu__link.is-active) > .agora-menu--level-1 {
    position: absolute;
    inset-block-end: 0;
    inset-inline: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  /*
    ⚠️ A SCROLL CONTAINER CLIPS THE FOCUS RING OF EVERYTHING INSIDE IT, and
    the rule above makes this row one. `overflow-x: auto` makes the vertical
    overflow clip too, and the row had no padding above its links and none
    before the first of them, so a focused link lost the top of its ring and
    the first link its inline start as well: every second-level link, on every
    visit, in both directions - 84 of 84 stops at 1280 across the seven
    registers of the preview. A scroll margin cannot help here: nothing has to
    scroll, the ring is cut by the box the link is in.

    So while a link in the row draws a ring, the row's box grows by the ring's
    extent on the three sides its bottom padding does not already cover, and
    the negative inline margins hand the width straight back. The links do not
    move by a pixel, and neither does the row's bottom edge, which is what
    positions it; only the transparent box around them grows.

    CONDITIONAL, AND THE CONDITION IS THE RING'S OWN. The row starts 2px below
    the primary links and the branding, so a row grown upward all the time
    would lay a clear box over their bottom 3px, and a clear box still takes
    the clicks that land on it. `:has(:focus-visible)` limits that to while a
    keyboard user is inside the row, which is exactly when there is a ring to
    make room for. It is a second `:has()` on a different compound, not one
    nested inside another.
  */
  .agora-page__header .agora-menu__item:has(.agora-menu__link.is-active) > .agora-menu--level-1:has(:focus-visible) {
    margin-inline: calc(-1 * var(--agora-focus-ring-extent));
    padding-block-start: var(--agora-focus-ring-extent);
    padding-inline: var(--agora-focus-ring-extent);
  }
}

/**
 * The contentinfo band.
 *
 * The masthead component is reused here without its mark, so its colours have
 * to be taken back: the home link sets the page text colour, which on the
 * inverse surface would be near-black on navy. The override below is the
 * declared inverse pair. It is spelled out rather than left to the band rule in
 * css/layout.css because that rule is a single class and an element, and this
 * one is two classes - it would lose, silently, and the failure would be a
 * contrast fault rather than a visual glitch.
 */
.agora-page__footer .agora-branding__home,
.agora-page__footer .agora-branding__home:visited,
.agora-page__footer .agora-branding__home:hover {
  color: var(--agora-color-text-inverse);
}

.agora-page__footer .agora-branding__name {
  font-size: var(--agora-font-size-md);
}

.agora-page__footer .agora-branding__slogan {
  color: var(--agora-color-text-inverse-muted);
}

.agora-footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--agora-space-m);
  margin: 0;
  padding: 0;
  list-style: none;
}

.agora-footer-menu__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--agora-target-size);
}

/**
 * Exposed filters.
 *
 * THIS IS THE PROMISE OF THE WHOLE SITE AND IT SHIPPED LOOKING LIKE A DEBUG
 * FORM: labels beside their fields, two select boxes of different widths
 * because their option text differed, and a submit button with no styling at
 * all. What a citizen is on a transparency portal to do is ask it a question,
 * so the block that asks is given a panel, an accent edge and room, and the
 * fields are given equal widths so the row reads as one instrument rather than
 * three controls that happened to land together.
 *
 * ⚠️ THE ACCENT EDGE IS GONE, AND IT IS THE ONE WORD OF THAT PARAGRAPH THAT
 * CHANGED. Removed by [andres] on 2026-09-05, who named this block by its
 * heading and objected to the coloured rule down its inline start as the house
 * style of generated design - a decoration applied TO a block rather than
 * structure the block has. The rest of the paragraph above stands: this is still
 * the promise of the whole site, it still gets a panel and room, and the fields
 * still share the row equally.
 *
 * WHAT REPLACES IT HAS TO DO THE SAME JOB, which is the part worth stating,
 * because deleting the edge and stopping there would have left the form floating
 * on the band with nothing to sit on. A hairline on ALL FOUR sides in the
 * neutral border token, with the radius and the panel fill it already had. A
 * contained panel with an edge reads as a tool; a panel with ONE coloured edge
 * reads as a callout that has lost its point.
 *
 * IT IS THE REGISTER CARD'S OWN EDGE, NOT A NEW GESTURE - the same token at the
 * same width with the same radius, so the two panels on this page are made of
 * the same thing. Both pairs it needs were already declared: the border token
 * against the panel surface it fills with, and against the page and cool
 * surfaces the band underneath it can be. No colour was added for this.
 *
 * ⚠️ THE FILL DOES NOTHING ON THE BAND THIS BLOCK CURRENTLY SITS ON, AND IT IS
 * KEPT ANYWAY. Measured in the rendered page rather than assumed: the panel
 * computes the subtle surface and so does the section behind it - the same
 * value, so the edge is the ONLY thing separating the two, and what a reader
 * sees is an outlined region rather than a raised panel. That is why the border
 * had to be a real hairline and not a suggestion. The fill is not removed as
 * redundant because the front page alternates its section surfaces. Over the
 * page surface, or over the cool one, this same declaration is what makes the
 * panel a panel, and deleting it here would break it there while looking like a
 * tidy-up.
 *
 * (That sentence named a colour after a colon in its first draft, and
 * tests/bin/no-colour-literals reported it - the same way it caught the error
 * indicator's comment on its very first run. The check cannot tell prose from a
 * declaration and says so in its own header; the remedy is to reword the prose,
 * never to teach the check an exception.)
 *
 * `flex: 1 1 14rem` IS WHAT FIXES THE MISMATCHED WIDTHS, and it does it without
 * knowing how many filters a view exposes: every field claims an equal share of
 * the row and wraps to the next line below fourteen rem, so two filters make two
 * half-width fields and five make a grid, with no breakpoint written anywhere.
 *
 * THE TWO CLASSES MATCHED HERE ARE CORE'S. Both are as old as Drupal 7 and both
 * are asserted on in core's own test suite, which is a better guarantee than
 * most theme classes carry. The alternative was overriding
 * views-exposed-form.html.twig to add a class of this theme's own - and the
 * fixture pages this theme is tested against contain no exposed form at all, so
 * that override would ship untested. A CSS rule that matches nothing degrades to
 * an unstyled form; a template override that is wrong degrades to no form.
 */
.views-exposed-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--agora-space-s) var(--agora-space-m);
  margin-block-end: var(--agora-space-l);
  padding: var(--agora-space-m);
  border: var(--agora-border-width) solid var(--agora-color-border);
  border-radius: var(--agora-radius);
  background-color: var(--agora-color-surface-subtle);
}

/**
 * `min-width: 0` IS PRECAUTIONARY, AND SAYING SO IS THE POINT OF THIS NOTE.
 *
 * A flex item defaults to `min-width: auto`, which means it refuses to shrink
 * below its MIN-CONTENT width - and the min-content width of a <select> is the
 * width of its longest option. A filter offering "Environment and Public Space"
 * therefore has a floor of a couple of hundred pixels that no percentage width
 * can talk it out of, and a row that cannot shrink past the viewport makes the
 * PAGE scroll sideways, which is a straight failure of WCAG 2.2 SC 1.4.10.
 *
 * WHAT WAS ACTUALLY OBSERVED, stated because the first version of this comment
 * claimed a measurement it did not have: at the narrowest viewport this host
 * can produce - headless Chrome refuses to lay out below about 485 CSS pixels
 * on Windows - the row does NOT overflow, with this line or without it. So the
 * failure above is derived from how flex sizing works and not from a rendered
 * page, and the real 390px check is still outstanding. The line stays because
 * it costs nothing and the floor it removes is real; the claim is trimmed to
 * what was measured.
 */
.views-exposed-form .agora-form-item {
  display: flex;
  flex: 1 1 14rem;
  flex-direction: column;
  min-width: 0;
  margin-block-end: 0;
}

.views-exposed-form label {
  display: block;
  margin-block-end: var(--agora-space-3xs);
  font-size: var(--agora-font-size-sm);
  font-weight: var(--agora-font-weight-bold);
}

/**
 * 🔴 THE SELECTOR IS SCOPED TO `.agora-form-item` AND THAT SCOPE IS THE WHOLE
 * FIX FOR A DEFECT A READER SAW ON THE RUNNING SITE. It used to be
 * `.views-exposed-form input`, which is every input in the form - INCLUDING
 * the two `input[type="submit"]` elements Views puts in the actions container.
 * Both buttons were therefore stretched to the full width of that container,
 * and two full-width elements cannot sit side by side: Search and Reset
 * stacked, touching, both filled with the same inverse surface, and the pair
 * read as one dark slab rather than as two controls.
 *
 * The fields are what wants a full-width control; the actions are not fields.
 * `.agora-form-item` is this theme's own class, added to every form element by
 * templates/form-element.html.twig, so the rule now says the thing it meant to
 * say. An exposed widget that somehow arrived outside a form element would
 * lose its full width and look narrow, which is a visible degradation rather
 * than a silent one.
 */
.views-exposed-form .agora-form-item input,
.views-exposed-form .agora-form-item select {
  width: 100%;
}

/**
 * The actions: a row of two controls, not a block of one.
 *
 * THE OFFSET IS COMPUTED FROM THE LABEL AND NOT GUESSED. Every field in the row
 *
 * THE OFFSET IS COMPUTED FROM THE LABEL AND NOT GUESSED. Every field in the row
 * is a column - label, then control - so the controls line up on their own. The
 * button has no label above it, so with the row aligned to its top the button
 * would sit one label-height too high. The calculation below is that label's
 * exact height in the tokens that draw it, which is why it cannot drift: change
 * the label's size or the gap under it and this moves with them.
 *
 * The alternative was aligning the row to its BOTTOM instead, and it was tried
 * first. It fails on the real form: a filter with a description under it - "the
 * search box searches titles" - is taller than one without, so bottom-aligning
 * pushed the search field a line above the two selects beside it. Aligning to
 * the top and paying for one known offset is the version that survives a filter
 * gaining a description.
 *
 * `flex: 0 1 auto` REPLACES `0 0 auto`, AND THE CHANGED DIGIT IS THE PHONE-WIDTH
 * ANSWER. Laying the two buttons in a row makes this container as wide as both
 * of them plus the gap; refusing to shrink would then push the row past a
 * narrow viewport and make the PAGE scroll sideways, which is a straight
 * failure of WCAG 2.2 SC 1.4.10. Allowed to shrink, it stops at its own
 * min-content width - one button, because `flex-wrap` lets the second drop
 * below - and the gap becomes the space between two stacked controls. So the
 * pair is a row when there is room and a stack when there is not, with no
 * breakpoint written anywhere and never glued in either state.
 */
.views-exposed-form .form-actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: var(--agora-space-xs);
  margin: 0;
  margin-block-start: calc(var(--agora-font-size-sm) * var(--agora-line-height-body) + var(--agora-space-3xs));
}

/* The buttons wrap rather than shrink: an input does not reflow its label, so
   a narrowed submit control clips the word inside it instead of getting
   shorter usefully. */
.views-exposed-form .form-actions input[type="submit"] {
  flex: 0 0 auto;
}

/**
 * Reset, as a genuinely secondary control.
 *
 * WHY THE SELECTOR IS A SIBLING COMBINATOR AND NOT A CLASS. Core attaches no
 * distinguishing class to the exposed form's reset button and no name of its
 * own - verified against the markup a running site emits, where the two
 * controls differ only in their `value` and their `id`. What IS stable is the
 * ORDER: ExposedFormPluginBase gives the reset button a weight of 10 and the
 * submit button none, so reset is always the last action. The alternative was
 * a form alter in this theme's PHP to add one class, which is a hook and a
 * maintenance burden for a purely presentational distinction.
 *
 * ⚠️ IT DEGRADES IN THE HARMLESS DIRECTION, which is the reason the trade is
 * acceptable. If core ever changes that shape the selector stops matching and
 * Reset simply looks like Search again - no layout breaks, nothing overlaps,
 * nothing becomes unreadable. Silent, though, which is why
 * tests/src/Functional/ViewsEmptyRegionTest.php asserts the shape this rule
 * depends on: two submit inputs in the actions container, Search then Reset.
 *
 * ⚠️ THE PAIR ONLY EXISTS ON A FILTERED PAGE. Core gives the reset button no
 * access at all while no exposed identifier carries input, so an unfiltered
 * register renders Search alone and this rule matches nothing - which is
 * correct, and is worth knowing before anyone concludes it is broken because
 * they cannot see a secondary button on a page they have not searched. It is
 * also why the defect this fixes was only ever visible on a filtered page:
 * the same page that was claiming nothing had been published.
 *
 * THE TREATMENT IS AN OUTLINE AND NOT A TINT. The boundary is carried by the
 * border against the panel it sits on - a declared pair at the SC 1.4.11
 * threshold - so the control keeps a visible edge without needing its fill to
 * contrast with the panel behind it. No accent is involved: a decorative
 * accent rule down the side of a panel is this theme's named anti-pattern and
 * reaching for one to mark a secondary button would be the same gesture in a
 * smaller place.
 */
.views-exposed-form .form-actions input[type="submit"] + input[type="submit"] {
  color: var(--agora-color-text);
  border-color: var(--agora-color-border-strong);
  background-color: var(--agora-color-surface);
}

.views-exposed-form .form-actions input[type="submit"] + input[type="submit"]:hover {
  background-color: var(--agora-color-surface-sunken);
}

/**
 * What a register says when a filter matched nothing.
 *
 * The region this styles is built by this theme's views-view preprocess,
 * which swaps a view's configured empty text - "nothing has been published
 * yet", a compliance statement - for a message about the filter whenever a
 * filter is what produced the zero rows. Read that hook for why a theme is
 * allowed to change what a page says.
 *
 * (It is described rather than named, and that is not carelessness: a hook
 * implementation's name necessarily carries the machine name, and
 * tests/bin/identity-strings refuses a packaged file that names the product
 * without being declared. A stylesheet has no structural need to name it, so
 * the mention is reworded rather than the declaration widened - the same
 * remedy that file's own notes record for two earlier comments here.)
 *
 * It is drawn as a quiet panel rather than as a status message: nothing has
 * gone wrong, the search simply has no answer, and a page that shouts about
 * it is worse than one that states it. The edge is a full hairline on all four
 * sides, deliberately, and not an accent bar down one of them.
 */
.agora-views-empty {
  padding: var(--agora-space-l) var(--agora-space-m);
  border: var(--agora-border-width) solid var(--agora-color-border);
  border-radius: var(--agora-radius);
  background-color: var(--agora-color-surface-subtle);
}

.agora-views-empty__message {
  margin: 0;
  font-weight: var(--agora-font-weight-bold);
}

.agora-views-empty__actions {
  margin: 0;
  margin-block-start: var(--agora-space-xs);
}

/**
 * The front page's version of the same form.
 *
 * A transparency portal's front page has one job - what do you want to know? -
 * and the search is the answer to it, so on that page and no other the same
 * component is given the weight of a hero: more room, a larger label and a
 * taller field. It is the SAME component with three values changed rather than
 * a second one, so a filter added to the view appears in both places without
 * anybody remembering to style it twice.
 *
 * THE FRONT-PAGE CLASS IS THIS THEME'S OWN AND NOT CORE'S, and the reason is in
 * the header of templates/page.html.twig: Drupal 11 puts no path classes on the
 * body element at all, so the `path-frontpage` hook every older theme reaches
 * for is not there. The flag `is_front` is, and that template turns it into a
 * modifier on the page wrapper. It follows whatever path a site has configured
 * as its front page rather than matching a literal one.
 */
.agora-page--front .views-exposed-form {
  gap: var(--agora-space-m);
  padding: var(--agora-space-l) var(--agora-space-m);
}

.agora-page--front .views-exposed-form label {
  font-size: var(--agora-font-size-md);
}

.agora-page--front .views-exposed-form .form-actions {
  margin-block-start: calc(var(--agora-font-size-md) * var(--agora-line-height-body) + var(--agora-space-3xs));
}

.agora-page--front .views-exposed-form input,
.agora-page--front .views-exposed-form select {
  min-height: calc(var(--agora-target-size) * 1.15);
  font-size: var(--agora-font-size-md);
}

/**
 * The main region's top padding, removed on the front page only.
 *
 * The masthead band is the first thing in the region, and a band that starts a
 * step down from the banner reads as a panel rather than as a masthead. The
 * band itself, and everything inside it, is at the end of this file.
 */
.agora-page--front .agora-page__main {
  padding-block-start: 0;
}

/**
 * Page rhythm - which front-page blocks stand on a band.
 *
 * One continuous white column gives the eye nothing to stop on, so some
 * sections take a panel surface and run the full width of the viewport, by the
 * same shadow-and-clip method the band above uses and for the same reason.
 *
 * WHICH SECTIONS IS A PROPERTY OF THE SECTION, NOT OF WHERE IT STANDS. The
 * quick-access strip, the summary figures, the spend table and the register
 * cards stand on the warm panel, and the service areas on the cool band. Each
 * block is selected by the component it holds, through `:has()`, so it keeps
 * its ground wherever a site places it and whatever is placed around it.
 *
 * ⚠️ THIS REPLACED `nth-child(even)`, AND THE REASON IS A MEASUREMENT. Parity
 * counted the content block's children, so one block added from the Canvas
 * library moved every band after it by one. A band then landed on the partner
 * of a pair and covered the figures beside it, and the spend table's override
 * lost the position and the clip it had been borrowing from the parity rule
 * and drew a shadow a viewport tall with no clip. With ONE heading placed on
 * the front page through Canvas, the site header, the masthead, the heading
 * itself and the award total were painted over at 1024, 1280 and 1440px -
 * while the amount stayed in the DOM and axe reported nothing, because a
 * box-shadow is never hit-tested and never measured for contrast.
 *
 * A BLOCK AN OWNER ADDS FROM THE CANVAS LIBRARY STANDS ON THE PAGE SURFACE.
 * Nothing here gives it a band, and nothing here can put a band over it. The
 * section component's background prop is the way to get a panel: it offers the
 * same warm panel and cool band, painted inside the content column.
 *
 * The padding is for the blocks a site places - every direct child that is not
 * a component - so a section keeps its air whether or not it has a ground. How
 * a component is spaced against them is the last rule in this group.
 */
.agora-page--front #block-agora-theme-content > div:not([data-component-id]) {
  padding-block: var(--agora-space-xl);
}

.agora-page--front #block-agora-theme-content > nav:has(> .agora-quick-access),
.agora-page--front #block-agora-theme-content > div:has(.agora-key-figures),
.agora-page--front #block-agora-theme-content > div:has(.agora-spend-bars),
.agora-page--front #block-agora-theme-content > div:has(.agora-register-cards) {
  --agora-band-ground: var(--agora-color-surface-subtle);
}

/**
 * THE COOL BAND - the service areas stand on the tinted navy rather than on
 * the cream or the page. It is the third surface the front page uses and it
 * exists so that the page has a rhythm of three grounds rather than two: the
 * cream carries the quick-access strip, the figures and the register cards,
 * the cool carries the areas, and the page surface carries the rest. The tint
 * is --agora-color-surface-cool, declared in css/tokens.css as a tint of the
 * inverse navy with every token that sits on it paired there - text, muted
 * text, the three link states, the accent, both borders, the card mark and the
 * focus ring.
 *
 * ⚠️ WHAT HAPPENS WHILE THE AREAS ARE PAIRED with the spend table is inside
 * the container query further down, and it is not the obvious thing. Read
 * that block before touching this one.
 */
.agora-page--front #block-agora-theme-content > div:has(.agora-area-cards) {
  --agora-band-ground: var(--agora-color-surface-cool);
}

/**
 * The only rule that paints a front-page band: bleed, clip and position
 * together, so that none of the three can ever be borrowed from somewhere else.
 *
 * The 100vw shadow runs the ground to the edges of the viewport from inside a
 * centred column; the clip holds it to the block's own rows; and the position
 * decides when it is painted. A positioned block paints AFTER every block that
 * is not positioned, so a band covers everything painted before it in its row.
 * That is why the list holds leaders and never a partner: a partner stands on
 * its leader's band, positioned and later in the tree, so it paints over the
 * band rather than under it - see the pairing rules below.
 */
.agora-page--front #block-agora-theme-content > :is(nav:has(> .agora-quick-access), div:has(.agora-key-figures), div:has(.agora-spend-bars), div:has(.agora-area-cards), div:has(.agora-register-cards)) {
  position: relative;
  background-color: var(--agora-band-ground, transparent);
  box-shadow: 0 0 0 100vw var(--agora-band-ground, transparent);
  clip-path: inset(0 -100vw);
}

/**
 * A component placed between the blocks - a heading, a paragraph, a section or
 * a group from the Canvas library - is spaced against its neighbours here.
 *
 * Where it meets a block it takes the section step, 54px, so no component box
 * ever stands within 36px of a band's painted edge. Where it meets another
 * component it takes the small step, so a heading placed above a paragraph is
 * read as that paragraph's heading rather than as a label floating between two
 * bands.
 */
.agora-page--front #block-agora-theme-content > [data-component-id] {
  margin-block: var(--agora-space-s) 0;
}

.agora-page--front #block-agora-theme-content > [data-component-id]:first-child,
.agora-page--front #block-agora-theme-content > :not([data-component-id]) + [data-component-id] {
  margin-block-start: var(--agora-space-xl);
}

.agora-page--front #block-agora-theme-content > [data-component-id]:last-child,
.agora-page--front #block-agora-theme-content > [data-component-id]:has(+ :not([data-component-id])) {
  margin-block-end: var(--agora-space-xl);
}

/**
 * TWO COMPONENTS ON ONE ROW - the front page's pairs.
 *
 * WHAT IT PAIRS, AND IT NAMES NEITHER A POSITION NOR A COUNT. A component
 * carrying a lot of data - the summary figures, the spend table - takes two
 * thirds; the compact list beside it takes one third. WHICH component is which
 * is decided by the CLASS the site template puts on the view display, and the
 * pairing itself is decided by ADJACENCY. There is no `nth-child` in this
 * section, no `first-of-type`, and nothing that counts how many components the
 * page holds.
 *
 * HOW IT SURVIVES AN EDIT, which is the whole point, stated as four cases
 * rather than as a promise:
 *
 *   a component is inserted BETWEEN a pair   the `+` stops matching, the
 *                                            partner falls back to a full row,
 *                                            and the leader - now alone on its
 *                                            flex line - grows to fill it.
 *   the pair is REORDERED                    likewise: the partner rule wants
 *                                            the leader immediately before it.
 *   one of a pair is DELETED                 the survivor is alone on its line
 *                                            and grows to fill it.
 *   a component is added ANYWHERE else       it keeps the default full-row
 *                                            basis and takes a row of its own.
 *
 * Every one of those ends the same way - STACKED, which is a worse composition
 * and not a broken page. Each of these components is designed to look right at
 * full width, which is what makes that fallback acceptable rather than merely
 * survivable. Nothing has to DETECT the edit: a lone item with a grow factor
 * receives all the free space on its line whatever its basis was.
 *
 * TWO LEADERS CAN NEVER PAIR WITH EACH OTHER, which is the one degenerate case
 * the arithmetic has to rule out rather than merely survive. Delete a partner
 * and two leaders become adjacent; the bases are what stop them sharing a line.
 * 38 + 38 + a 2.25 gap is 78.25rem and the content column is capped at 72rem by
 * --agora-container-width, so they wrap. The cap is what makes that a
 * guarantee rather than a likelihood.
 *
 * THE RATIO IS EXACT, AND THAT IS WHY THE NUMBERS LOOK ARBITRARY. The bases are
 * in 2:1 and the grow factors are in 2:1, and when basis_a = 2*basis_b and
 * grow_a = 2*grow_b the rendered widths come out in 2:1 for ANY free space and
 * ANY gap. At the full 72rem column that is 46.5rem beside 23.25rem.
 *
 * THE THRESHOLD IS A CONTAINER QUERY AND NOT FLEX WRAPPING, and this is the
 * decision in this block that is worth the most explanation, because flex
 * wrapping alone WORKS and was what this section did first.
 *
 * The trouble is not the layout, it is the BAND. A band is a VISUAL ROW, and a
 * pair takes one row and holds two blocks, so the two members of a pair have to
 * stand on one ground while they are paired and may stand on two once they
 * stack. The spend table is the case that shows it: it stands on the warm panel
 * while it has a row to itself, and on the cool band while the service areas
 * stand beside it on theirs. No fixed ground satisfies both layouts, so the
 * band has to know which layout it is in.
 *
 * ⚠️ ONLY THE COLOUR MOVES AT THE THRESHOLD, NEVER THE PAINT. Which block
 * paints a band, and the position and the clip it paints with, are the same on
 * both sides of it. The bands used to alternate on `nth-child`, which counts
 * DOM children, and a pair consumes two children for one row - so the page
 * needed a correction on the spend table, and that correction painted with no
 * clip of its own whenever a block placed above it moved the count by one.
 *
 * A container query is what tells it. `@container` is evaluated against the
 * component column's own inline size, which is the same measurement that
 * decides whether a pair fits, so the layout and the band turn over together at
 * one threshold written in one place. A media query could not do this: it
 * measures the VIEWPORT, and the column is the viewport less a container cap
 * and two gutters.
 *
 * THE THRESHOLD IS SET BY THE PARTNER, because the partner is what suffers
 * first. At a 60rem column the one-third partner is 19.25rem, which is where a
 * record title in this corpus stops running to four lines. The column reaches
 * 60rem at a viewport of about 1008px, so a 1024 tablet pairs and a 768 one
 * stacks.
 *
 * `min-width: 0` ON EVERY CHILD is the guard this theme sets wherever a flex
 * item holds text: an item's automatic minimum is its own content, and one long
 * unbroken title would otherwise push the row wider than the page - a WCAG 2.2
 * SC 1.4.10 failure arriving as a rounding error. `min()` on each basis is the
 * other half of it.
 *
 * THE CONTAINER IS THE MAIN CONTENT BLOCK, WHICH THIS REPOSITORY SHIPS, and the
 * `:has()` gate keeps every rule here off every other page. A node page holds
 * none of these components, so it does not match, so its main block is neither
 * made a flex container nor given containment, and its layout is untouched. A
 * browser with neither `:has()` nor `@container` - they arrived in the same
 * generation - matches nothing in this section and gets the stacked page, and
 * because every band rule selects through `:has()` as well, it gets that page
 * on one ground: a finished column rather than bands on the wrong rows.
 */
#block-agora-theme-content:has(.agora-key-figures, .agora-spend-bars) {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--agora-space-l);
  container: agora-components / inline-size;
}

/**
 * Every component takes a row of its own until the query below says otherwise.
 * `row-gap: 0` above, deliberately: the components carry their own vertical
 * padding, and a row gap would add a second helping of it between them.
 */
#block-agora-theme-content:has(.agora-key-figures, .agora-spend-bars) > * {
  flex: 1 1 100%;
  min-width: 0;
}

@container agora-components (min-width: 60rem) {
  /* The leader - two thirds. */
  #block-agora-theme-content > div:has(.agora-key-figures),
  #block-agora-theme-content > div:has(.agora-spend-bars) {
    flex: 2 1 min(38rem, 100%);
  }

  /**
   * The partner - one third.
   *
   * `position: relative` IS LOAD-BEARING AND IS THE ONE LINE HERE NOBODY WOULD
   * GUESS. The tint is painted as a 100vw box-shadow on the leader, clipped to
   * the leader's own height, and the two items of a pair are stretched to a
   * common height - so the leader's shadow is what grounds the whole row,
   * partner included, and the partner needs no ground of its own. But a
   * positioned element paints AFTER its non-positioned siblings, so with the
   * leader positioned and the partner not, that shadow lands ON TOP of the
   * partner and hides it: the first render of this section showed a
   * two-thirds-wide empty tint where the summary figures should have been.
   * Both positioned and both at `z-index: auto`, tree order decides and the
   * partner paints last. Seen, not predicted.
   */
  #block-agora-theme-content > div:has(.agora-key-figures) + div:has(.agora-recent-activity),
  #block-agora-theme-content > div:has(.agora-spend-bars) + div:has(.agora-area-cards) {
    position: relative;
    flex: 1 1 min(19rem, 100%);
  }

  /**
   * The band correction - while the spend table is paired it stands on the
   * cool ground, so the row it shares with the service areas is ONE band.
   *
   * WHAT CHANGES HERE IS A COLOUR AND NOTHING ELSE. The spend block keeps the
   * one rule that paints every front-page band - position, bleed and clip
   * together - and only the ground that rule reads moves, from the warm panel
   * to the cool band. Below the query the two stack, the spend table is warm
   * again and the areas paint their own cool band.
   *
   * ⚠️ THIS OVERRIDE USED TO SET THE SHADOW ITSELF, with no position and no
   * clip of its own: it borrowed both from the `nth-child` rule, and lost them
   * whenever the spend table landed on an odd child. It then drew a static
   * shadow a viewport tall, with no clip, over everything painted before it -
   * the masthead, the site header and the figures included.
   *
   * ⚠️ THE LEADER PAINTS THE BAND AND THE PARTNER DOES NOT, AND THE REASON IS
   * THE SAME PAINTING ORDER THE PARTNER RULE ABOVE DESCRIBES. Both are
   * positioned, so tree order decides and the partner paints LAST - including
   * any 100vw shadow of its own, which would land on top of the spend table
   * and hide it. So while the two are paired the partner keeps only its own
   * box's colour and gives up its bleed and its clip, and the leader - whose
   * shadow the partner paints over, harmlessly, in the same colour - is the one
   * that runs the ground the full width.
   */
  .agora-page--front #block-agora-theme-content > div:has(.agora-spend-bars) {
    --agora-band-ground: var(--agora-color-surface-cool);
  }

  .agora-page--front #block-agora-theme-content > div:has(.agora-spend-bars) + div:has(.agora-area-cards) {
    box-shadow: none;
    clip-path: none;
  }
}

/**
 * Register cards - "What this portal publishes" as a grid of counts.
 *
 * THE MARKUP IS VIEWS' UNFORMATTED LIST, UNTOUCHED. A display opts in by
 * setting `agora-register-cards` in its own css_class option, and every
 * selector below keys on that class, so a view that did not ask for cards is
 * not given them. The rows are the container's direct children - the
 * unformatted-list template emits no inner wrapper - which is why the grid
 * sits on the container itself.
 *
 * `auto-fill` RATHER THAN A COLUMN COUNT. Three columns of two is the shape
 * that falls out of the 17rem floor at the content column's full width, but
 * nothing below says "three" or "six": a seventh register lands in the next
 * free cell, and a narrow viewport reflows to two columns and then one, with
 * no breakpoint and no rule tied to how many registers a site publishes.
 *
 * THE FLOOR YIELDS TO THE CONTAINER. A bare 17rem happens to fit a 320px
 * viewport minus the gutters to the pixel, and one pixel under that the
 * column would overflow and hand the PAGE a horizontal scrollbar - a failure
 * of WCAG 2.2 SC 1.4.10 arriving as a rounding error, on readers with large
 * default fonts if nobody else. `min()` caps the floor at the container's
 * own width, so the single-column layout can never be wider than the page.
 */
.agora-register-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
  gap: var(--agora-space-m);
  margin-block-end: var(--agora-space-l);
}

/**
 * A Views header is a grid ITEM, and the grid does not know it is prose.
 *
 * The site template ships a sentence above these cards - the one that says the
 * demonstration municipality is Spanish and its registers derive from Spanish
 * transparency law - as a `text_custom` header area. Views renders that inside
 * the view's own container, so it lands in the first cell and the cards flow
 * around it as though the paragraph were a seventh register.
 *
 * Spanning it is the whole fix. It is the SAME defect the area cards' more-link
 * had, one component down this file: anything a view puts inside its container
 * that is not a row has to be told it is not a row.
 */
.agora-register-cards > header,
.agora-register-cards > .view-header {
  grid-column: 1 / -1;
  max-width: var(--agora-measure);
}

/**
 * A card carries its own ground and its own edge, by the table's precedent
 * and for the table's reason: the front page's sections alternate surfaces,
 * and a panel that borrowed its ground would vanish on the band that matches
 * it. On the cream band the white card is what lifts the grid off the page;
 * on the page surface the border keeps the edge, checked at 3:1 against both
 * surfaces the card can sit on.
 *
 * `position: relative` is the containing block for the stretched link below,
 * and the flex column is what lets the count block sit at the card's foot.
 */
.agora-register-cards .views-row {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--agora-space-m);
  border: var(--agora-border-width) solid var(--agora-color-border);
  border-radius: var(--agora-radius);
  background-color: var(--agora-color-surface);
}

.agora-register-cards .views-row:hover {
  border-color: var(--agora-color-border-strong);
}

/**
 * The register's name is the card's link, and the whole card is its target.
 *
 * THE STRETCH IS A PSEUDO-ELEMENT OVER THE CARD, NEVER A WRAPPING ANCHOR. An
 * anchor around the whole card would take the card's entire contents - name,
 * label and numeral - as its accessible name, and Views owns this markup
 * anyway. The ::after is the real link's own box stretched to the card's
 * edges, so the accessible name stays exactly the register's name and the
 * pointer target becomes the card.
 *
 * NO UNDERLINE AT REST, by the masthead's precedent: the name is identified
 * as a link by its position and weight at the head of a card whose only
 * action it is, and the underline returns on hover and on focus. The focus
 * ring is the theme's own, drawn around the name - nothing here touches
 * `outline`.
 *
 * ONE COLOUR ACROSS STATES, by the navigation's precedent: these are section
 * entry points a reader passes through on every visit, not documents to be
 * ticked off a list, so the visited hue would paint most of the grid purple
 * within a minute of browsing while telling the reader nothing. The class
 * selectors outweigh `a:visited` on their own; `:hover` is restated so the
 * hover hue survives the same weighing.
 */
.agora-register-cards .views-field-type .field-content a {
  text-decoration: none;
  color: var(--agora-color-link);
  font-size: var(--agora-font-size-lg);
  font-weight: var(--agora-font-weight-bold);
  line-height: var(--agora-line-height-heading);
}

.agora-register-cards .views-field-type .field-content a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.agora-register-cards .views-field-type .field-content a:hover,
.agora-register-cards .views-field-type .field-content a:focus-visible {
  text-decoration: underline;
  color: var(--agora-color-link-hover);
}

/**
 * The "Register" label serves the accessibility tree only: visually the name
 * at the head of a card labels itself. It is hidden with core's own
 * visually-hidden technique rather than `display: none`, which would remove
 * what it hides from assistive technology too.
 */
.agora-register-cards .views-field-type .views-label {
  position: absolute;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}

/**
 * The count block sits at the card's foot whatever the name's length, so the
 * numerals line up across the row - in a transparency portal the numbers ARE
 * the visual. Its label stays VISIBLE, above the numeral it names: a bare
 * large number with a hidden label would be legible to a screen reader and
 * cryptic to everyone else, which is the usual failure inverted, not fixed.
 */
.agora-register-cards .views-field-nid {
  display: flex;
  flex-direction: column;
  margin-block-start: auto;
  padding-block-start: var(--agora-space-s);
}

.agora-register-cards .views-field-nid .views-label {
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-sm);
}

/**
 * Tabular lining figures, restated because the rule that pins them in
 * css/typography.css reaches tables and these counts sit in a div: two cards
 * side by side should give their digits equal widths all the same.
 */
.agora-register-cards .views-field-nid .field-content {
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--agora-color-text);
  font-size: var(--agora-font-size-3xl);
  font-weight: var(--agora-font-weight-bold);
  line-height: var(--agora-line-height-heading);
}

/**
 * Key figures - the four numbers that open the page.
 *
 * THE MARKUP IS VIEWS' UNFORMATTED LIST, and the display opts in with
 * `agora-key-figures` in its own css_class option exactly the way the register
 * cards do. One `.views-row` holding four `.views-field`, each a `.views-label`
 * beside a `.field-content`; three of the four wrap their value in a span and
 * one in a div, which is Views' own inconsistency and the reason the value rule
 * below sets `display: block` rather than assuming either. That count was
 * re-measured in rendered output when the fourth figure came back, not carried
 * over - it read two and two while the amount came from a Views field.
 *
 * THE LEAD FIGURE IS NOT VIEWS'. Three of these four come from the display; the
 * amount is built by a preprocess in the theme file, because the SQL Views
 * emits for that aggregate sums a text column and is wrong on every database.
 * It is a synthetic entry in the list core's own template walks, so everything
 * below still describes what is rendered - but a reader who goes looking for
 * `field_agora_base_amount` in the view's configuration will not find it.
 *
 * FOUR PEER TILES - AND THE PARAGRAPH THIS REPLACES ARGUED THE OPPOSITE, so
 * the reversal is recorded rather than hidden. It read: "NOT FOUR EQUAL
 * BOXES, AND THAT IS THE WHOLE DESIGN DECISION. A four-across grid of
 * identical cards would say the four numbers matter equally, and they do not:
 * one of them is how much public money was committed and the other three are
 * the shape of the file it came from." That was a real argument and it lost
 * to a rendered page: the money on a line of its own with three footnotes
 * on hairlines beneath read as one dashboard figure and a caption, and the
 * portal's own claim is that the count of awards and the number of service
 * areas are facts of the SAME standing as the money. Peers it is. The
 * amount still comes first, because the preprocess prepends it, and that
 * order is all the precedence it needs.
 *
 * FLEX RATHER THAN A GRID WITH A COLUMN COUNT, by the register cards' reason.
 * Nothing below says "four": every figure asks for the same basis, so the row
 * holds four at the content column's width, wraps to two and two at a
 * tablet and stacks at a phone, with no breakpoint. A fifth figure joins the
 * row instead of breaking the layout.
 *
 * EVERY PAIR HERE WAS ALREADY DECLARED. Text and muted text on the page
 * surface, the accent as a rule at 3:1 and the border at 3:1 - and all four are
 * declared on the panel surface too, so this block is safe on either band of
 * the front page's alternating sections rather than only on the one it happens
 * to sit on today.
 */
.agora-key-figures .views-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--agora-space-m) var(--agora-space-m);
  margin-block-end: var(--agora-space-l);
}

/**
 * FOUR PEER TILES, AND NO LEAD. The first design gave the amount a line of its
 * own at the largest size and set the other three under it as a rail of
 * hairlines; what that drew was one figure and three footnotes, on a page
 * whose point is that the count of awards and the number of service areas are
 * facts of the same standing as the money. So every figure takes the same
 * tile: the same basis, the same brand rule at its inline start - the 4px
 * band that closes the banner and opens the footer, so the accent arrives
 * here as the thing it already is in this theme - and the same size of
 * numeral. The order still puts the amount first, because the preprocess
 * prepends it; nothing here depends on that.
 *
 * ⚠️ THE BRAND RULE AT THE INLINE START IS GONE, AND THE CLAUSE ABOUT IT IS THE
 * ONLY PART OF THAT PARAGRAPH THAT STOPPED BEING TRUE. Removed by [andres] on
 * 2026-09-05 in the same breath as the exposed filter panel's, and for the same
 * reason: a coloured bar down the inline start of a block is the default gesture
 * of generated design, and on a public register it reads as decoration applied
 * to a block rather than as structure the block has. Four peer tiles, the same
 * basis and the same size of numeral all survive it. The accent has not left the
 * page - it still closes the banner, opens the footer and underlines every
 * heading, which is what "the thing it already is in this theme" was pointing
 * at.
 *
 * A NEUTRAL HAIRLINE ABOVE EACH FIGURE, AND NOT A BORDER AROUND IT. Turning
 * these four into bordered cards was the obvious replacement and it is the wrong
 * one: this page already carries six quick-access cards, six register cards and
 * six publication cards, and everything weighing the same is a criticism it has
 * already had. A rule ABOVE a column of figures is the statistical table's own
 * convention, it is lighter than a box, and it still gives each figure an edge
 * to stand on instead of leaving it floating on the band - which was the actual
 * complaint, in his words, of a block suspended in the void.
 *
 * THE RULES LINE UP ACROSS THE ROW, which is the property that makes this read
 * as a table of figures rather than as four separate things: the tiles share a
 * basis, so their top edges meet at the same height on every row the flex
 * container wraps into. The inline padding went with the bar - there is nothing
 * to clear at the inline start any more - so the figures now align with the
 * page's own text column rather than sitting a step inside it.
 *
 * ⚠️ THE SPACE UNDER THE RULE IS A FULL STEP AND IT IS NOT DECORATION - IT IS
 * WHAT KEEPS THE RULE AND THE MARK APART. The mark below is three horizontal
 * bars in this same neutral token; the rule is one horizontal line in it. Set at
 * half a step, the two read as ONE object - a rule that frays into three shorter
 * lines - which was visible in a render before it was reasoned about. At a full
 * step they separate and the mark reads as its own thing again. Anyone tightening
 * this back up should look at a tile at 100 per cent first.
 *
 * ⚠️ AND THE UNDERLYING TENSION IS NOT SOLVED BY SPACING, so it is recorded
 * rather than left for the next reader to rediscover. The mark was drawn when
 * this tile's edge was a VERTICAL accent bar, where a horizontal mark contrasted
 * with its anchor. The anchor is now horizontal and the same neutral tone, so the
 * mark echoes it instead of contrasting with it. Spacing makes that legible; it
 * does not make it a good pairing. Whether these become distinct per-figure marks
 * is open and belongs to whichever lane owns the class contract with the view
 * configuration - this note is the input to that decision, not a workaround for
 * it.
 *
 * THE BASIS IS HALF THE ROW WITH AN 11rem FLOOR, AND THE ARITHMETIC IS WHY.
 * A six-figure amount with separators at the 2xl step is about 212px wide
 * with its rule and padding, and this block's paired width is 46.5rem, or
 * 744px at the default root size: four tiles at any basis that lets the
 * amount fit need more than that, and four at a basis that fits put the
 * amount over its own edge. Measured in a render, where 11rem drew three
 * tiles and stranded the date on a line of its own. Half the row less the
 * gap draws two and two on any width where two fit, which is every width
 * from a tablet up; below the floor the tiles stack. `max()` on the basis is
 * what stops a narrow phone from being handed a half that is smaller than
 * the amount.
 *
 * `min-width: 0` because a flex item's default minimum is its content, and a
 * long formatted date would otherwise refuse to shrink and push the row wider
 * than the page - the same SC 1.4.10 rounding error the register cards guard
 * against with `min()`.
 */
.agora-key-figures .views-field {
  flex: 1 1 max(11rem, calc(50% - var(--agora-space-m)));
  min-width: 0;
  padding-block-start: var(--agora-space-s);
  border-block-start: var(--agora-border-width) solid var(--agora-color-border);
}

/**
 * THE MARK ON A KEY FIGURE. Asked for by [andres] on 2026-09-04. The objection
 * put to him was that an icon competes with the number it sits above; he granted
 * it, and asked for the tiles to be adapted so that they carry one anyway. The
 * three conditions he attached are the whole specification: all four identical
 * in position, muted in tone, and subordinate to the numeral. Everything below
 * is one of those three or a consequence of them.
 *
 * ALL FOUR ARE THE SAME MARK, AND THAT IS THE DEFECT-PROOF VERSION RATHER THAN
 * THE LAZY ONE. The mockup this came from carried a chart on its first tile and
 * icons on the other three, which reads as one figure that matters and three
 * that decorate it - the exact hierarchy this row spent a previous round
 * removing when it stopped being one lead figure and three footnotes. Per-tile
 * icons would also have to be keyed on field names, and three of those field
 * names belong to the SITE TEMPLATE's view: the day one is renamed there, this
 * stylesheet draws three marks and a gap, which is the mockup's defect arriving
 * by rot rather than by choice. One selector, one mark, no field names, and a
 * fifth figure gets it too.
 *
 * A PSEUDO-ELEMENT AND NOT MARKUP, for a reason that is about the gate and not
 * about tidiness. Only three of these four tiles come from Views; the money
 * figure is a synthetic field built by a preprocess in the theme file, so any
 * mechanism that needed an extra element or an extra class would have to be
 * implemented twice, in two repositories, and would be one rename away from
 * covering three tiles out of four. A `::before` with empty content covers all
 * of them from one rule, is never announced, cannot get into an accessible name
 * and cannot change what axe counts.
 *
 * DRAWN WITH GRADIENTS, NOT WITH AN ASSET. Three background layers, each a
 * two-stop gradient of one token, which is a solid fill written the only way
 * this repository allows: tests/bin/no-colour-literals refuses a colour literal
 * outside the token file, and a masked SVG data URI would have carried one in
 * its own fill attribute. It also means no new file, no icon font and nothing
 * added to the SBOM for a decoration.
 *
 * THE SHAPE IS THIS THEME'S OWN. Three stacked record bars, in the proportions
 * the hero mark uses for the same three bars - 60, 38 and 66 units of its grid,
 * which is 91, 58 and 100 per cent of the longest. A register is a stack of
 * records, so the mark says what the tile is counting without a metaphor
 * borrowed from an icon set.
 *
 * MUTED, AND THE TOKEN IS ALREADY PAIRED ON EVERY GROUND THIS TILE CAN STAND ON.
 * It is pure decoration - remove it and not one figure becomes unavailable - so
 * SC 1.4.11 does not reach it at all. Using the border token anyway means the
 * mark inherits four declarations that already exist, against the page, the
 * panel, the sunken and the cool surfaces, and no pair had to be added for a
 * shape that conveys nothing. It is quieter than the label above the numeral,
 * which is the "subordinate" condition made into a value.
 */
.agora-key-figures .views-field::before {
  display: block;
  width: 1.25rem;
  height: 0.75rem;
  margin-block-end: var(--agora-space-2xs);
  content: "";
  background-image: linear-gradient(var(--agora-color-border), var(--agora-color-border)), linear-gradient(var(--agora-color-border), var(--agora-color-border)), linear-gradient(var(--agora-color-border), var(--agora-color-border));
  background-repeat: no-repeat;
  background-position:
    left top,
    left center,
    left bottom;
  background-size:
    91% 2px,
    58% 2px,
    100% 2px;
}

/**
 * FORCED COLOURS: the mark goes, by the hero picture's reason.
 *
 * A forced-colours mode substitutes background and text COLOURS and leaves
 * background IMAGES alone, and these bars are a background image - so they would
 * survive into a palette they were never measured against, drawn in a token that
 * no longer relates to the canvas behind them. They carry no information, so
 * removing them costs a reader nothing; leaving them in costs a reader who has
 * asked the operating system for their own colours three bars of unknown
 * contrast on every tile, four times over.
 */
@media (forced-colors: active) {
  .agora-key-figures .views-field::before {
    display: none;
  }
}

/**
 * The labels stay VISIBLE, by the register cards' reason: a large bare number
 * that only a screen reader can name is the usual accessibility failure turned
 * inside out, not fixed. They are set in the table header's idiom - muted, one
 * step down, faintly letter-spaced - so a reader who has just come off a
 * register recognises them.
 */
.agora-key-figures .views-label {
  display: block;
  margin-block-end: var(--agora-space-3xs);
  letter-spacing: 0.02em;
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-sm);
}

/**
 * Tabular lining figures, restated here for the reason the register cards
 * restate them: the rule that pins them in css/typography.css is set on
 * `table`, and these four numbers sit in divs and spans.
 */
.agora-key-figures .field-content {
  display: block;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--agora-color-text);
  font-size: var(--agora-font-size-2xl);
  font-weight: var(--agora-font-weight-bold);
  line-height: var(--agora-line-height-heading);
}

/**
 * The trend line under the total awarded - T-1305, D-037.
 *
 * ONE TILE OUT OF THE FOUR CARRIES IT, and that is a reversal of an argument
 * made 200 lines above in this same file, so it is recorded rather than left to
 * be noticed. The paragraph on the tile mark says the mockup "carried a chart
 * on its first tile and icons on the other three, which reads as one figure
 * that matters and three that decorate it". That objection was to per-tile
 * ICONS, and it stands: all four tiles still take the same mark, from one
 * selector, keyed on no field name. What has changed is that [andres] asked
 * for this specific chart, on this specific tile, from the mockup he approved.
 * It is not an icon and it is not decoration keyed to a field: it is a second
 * rendering OF THE FIGURE ABOVE IT, which no other tile has anything to draw.
 *
 * IT IS NOT KEYED ON A FIELD NAME EITHER, which is the half of that earlier
 * objection worth keeping. The class comes from a template this theme owns,
 * rendered into the one field the theme itself builds, so nothing here breaks
 * when the site template renames a view field - the failure mode the icon
 * argument was really about.
 *
 * NO CARD, NO BORDER, NO SECOND EDGE. The four figures were reworked on
 * 2026-09-05 to sit under a neutral hairline with no box around them, and a
 * chart with a frame would put the box straight back on one of the four. The
 * line sits in the tile's own column, flush with the numeral above it.
 */
.agora-award-trend {
  margin-block-start: var(--agora-space-2xs);
}

/**
 * THE BOX SCALES WITH THE TILE AND KEEPS ITS SHAPE. `height: auto` with an
 * untouched `preserveAspectRatio` is what makes the vertices round: the
 * viewBox is 4:1 and the element takes whatever width the tile has, so the
 * drawing scales uniformly. `preserveAspectRatio="none"` with a fixed height
 * was the first version and it drew ellipses - the same drawing, stretched, on
 * every viewport that was not exactly 4:1.
 *
 * `display: block` because an inline SVG sits on the text baseline and
 * collects the descender gap underneath it, which reads as an inconsistent gap
 * above the caption.
 */
.agora-award-trend__chart {
  display: block;
  width: 100%;
  height: auto;
}

/**
 * THE LINE AND ITS VERTICES, IN THE BRAND ACCENT, AND NO PAIR IS DECLARED FOR
 * THEM. That exemption is claimed rather than computed, so it is argued here
 * the way css/tokens.css argues the identical one for the bars behind the
 * spend table - and it is the same argument, about the same species of object.
 *
 * SC 1.4.11 governs graphical objects REQUIRED TO UNDERSTAND THE CONTENT. Every
 * month this line plots is written out in text in the table beside it, and the
 * figure it ends on is printed in full immediately above it at the largest step
 * in the scale. Remove the drawing and not one number becomes unavailable, so
 * the success criterion does not reach it - which is also why the SVG carries
 * `aria-hidden` and no name.
 *
 * THE TOKEN IS ALREADY PAIRED ON EVERY GROUND THIS TILE CAN STAND ON ANYWAY,
 * at 3.0, against the page, the panel and the cool band - so no pair was added
 * for this and tests/bin/contrast-check reads the same 26 tokens and 67 pairs
 * it read before. For the record rather than for the gate: the accent measures
 * 3.29:1 against the page surface, which is comfortably visible; that figure is
 * not a conformance claim and is not declared as one.
 *
 * THE COLOURS ARE HERE AND NOT IN THE MARKUP. tests/bin/no-colour-literals
 * refuses a hex literal in a `stroke` attribute in the template, and rightly:
 * a colour in an SVG presentation attribute is a colour that no longer moves
 * when the token moves. `var()` in a presentation attribute is also patchily
 * supported, which makes this the correct place on both counts. That invariant
 * scans COMMENTS as well as declarations, which is how this paragraph came to
 * be written without the six digits it was originally quoting - and the rule is
 * right to be that strict, since a literal in a comment is where the next
 * person copies one from.
 */
.agora-award-trend__line {
  fill: none;
  stroke: var(--agora-color-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agora-award-trend__vertex {
  fill: var(--agora-color-accent);
}

/**
 * FORCED COLOURS: the line is RECOLOURED, not removed - and that is a
 * deliberate departure from the tile mark twenty lines above, which is hidden.
 * The difference is what the two things are. The mark is a background IMAGE,
 * and a forced-colours mode substitutes background and text colours while
 * leaving background images alone, so it would survive into a palette it was
 * never measured against. This is real SVG geometry, so it can be given the
 * system's own text colour and drawn on the system's own canvas - measured
 * ground, by definition. Setting it explicitly rather than relying on the user
 * agent is the point: whether a browser forces `fill` and `stroke` on its own
 * is not something this theme should have to be right about.
 */
@media (forced-colors: active) {
  .agora-award-trend__line {
    stroke: CanvasText;
  }

  .agora-award-trend__vertex {
    fill: CanvasText;
  }
}

/**
 * THE ACCESSIBLE EQUIVALENT, TAKEN OFF THE SCREEN AND LEFT IN THE TREE.
 *
 * Core's own visually-hidden technique, the same one the footer's legal heading
 * and the register cards use. `display: none` would have been the obvious way
 * to keep 24 rows out of a tile and it is the wrong one: it removes the table
 * from the accessibility tree as well as from the layout, which would leave an
 * `aria-hidden` chart with no equivalent anywhere - a worse position than
 * having drawn no chart at all.
 *
 * The caption and the header cells go with it, which is the property being
 * bought: a screen-reader user reaches a titled table with named columns, not
 * 24 loose pairs of strings.
 */
.agora-award-trend__table {
  position: absolute;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}

/**
 * THE CAPTION IS THE SIGHTED READER'S HALF OF THAT TABLE, and it is the only
 * text here that carries weight rather than decoration. It names the window and
 * the month basis, because there is no award-date field in this product and a
 * time axis nobody can check is a claim rather than a measurement.
 *
 * It is NOT the mockup's "This year". The series is two years long; a caption
 * that misdescribes its own axis on a transparency portal is the precise kind
 * of small untruth this product exists not to ship.
 *
 * The muted text token at the smallest step, which is the idiom this theme
 * already uses for the label ABOVE each figure - so the tile reads as a caption
 * above and a caption below, with the number between them. Both pairs are
 * declared at 4.5:1 on every surface this block can stand on.
 *
 * `text-wrap: balance` BECAUSE IT WRAPS AND MUST NOT SAY LESS TO AVOID IT. At
 * a tile's width this line runs to two, and the first render left one word
 * stranded on the second - a caption that reads like a mistake, on the one
 * piece of text here a reader has to take seriously. Balancing evens the two
 * lines instead of shortening the sentence, which was the other way out and the
 * wrong one: every clause in it is load-bearing. A browser without it wraps as
 * it always did, so nothing depends on the support.
 */
.agora-award-trend__caption {
  margin-block: var(--agora-space-3xs) 0;
  text-wrap: balance;
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-xs);
  line-height: var(--agora-line-height-heading);
}

/**
 * The bar layer over a money column - "the chart IS the table".
 *
 * WHAT DRAWS IT AND WHAT DOES NOT. Both halves are the theme's. The span is
 * emitted by a preprocess in the theme file, into a money column that same
 * preprocess adds to the table, and the share of the largest row is computed
 * there too and set on the row as `--agora-bar` - a unitless ratio between 0
 * and 1, because `calc()` can scale a length by a number and cannot scale one
 * percentage by another. Views can produce neither: it cannot divide,
 * and since its aggregated SUM fields had to be removed it cannot produce the
 * amount either. Both reasons are measured rather than assumed - see the theme
 * file.
 *
 * THIS PARAGRAPH USED TO SAY THE SPAN WAS THE SITE TEMPLATE'S, put into the
 * cell by the view's own field rewrite, with this class as the contract between
 * two repositories. It stopped being true when those fields were removed as
 * unsafe SQL, and the failure that followed is why the sentence is corrected
 * here rather than quietly deleted: the theme went on computing six correct
 * percentages for a span that no longer existed, and the chart stopped being a
 * chart in silence. A contract that spans two repositories is only as good as
 * the measurement taken on the far side of it.
 *
 * IT FAILS TO NOTHING, ON PURPOSE. `var(--agora-bar, 0)` is a zero-width fill,
 * so a row the preprocess could not compute renders as a plain cell rather than
 * as a full-width bar or a broken one. A register that opts a span in without
 * the preprocess running gets no bars and no damage. That is the safe direction
 * for the accident to fall in - and because a table that quietly stops being a
 * chart is a failure nobody would notice from the page, the theme file makes
 * noise about it rather than relying on this fallback to be seen.
 *
 * THE FILL IS DECORATION AND IS MARKED AS NONE. No role, no aria-label, no
 * title, and it is a pseudo-element, so it is not in the accessibility tree at
 * all. The accessible content of the cell is the amount, written out in full;
 * SC 1.4.11 does not reach a graphic whose information is spelled out beside
 * it. See the note beside --agora-color-accent-soft for the argument and for
 * the two ratios it is NOT claiming.
 *
 * NOTHING SITS ON THE FILL ANY MORE, and the strip below is why. The figure is
 * right-aligned in a reserved strip that the fill is scaled to stop short of,
 * so the amount always sits on the cell - 14.71:1 on the page surface, 13.18:1
 * on a banded row - and never on the accent.
 *
 * The pair that was bought for the old arrangement, --agora-color-text on
 * --agora-color-accent-soft at 5.39:1, is therefore no longer EXERCISED by this
 * component. It has NOT been removed from css/tokens.css and must not be: it is
 * still a true statement about those two tokens, the pair count is a floor that
 * may rise and never fall, and --agora-color-accent-soft is named by exactly
 * one @pair, so deleting it would leave a declared colour unpaired and fail the
 * checker on a second count. See the note beside it in the token file.
 *
 * THE RESERVED STRIP, and why it is a constant rather than per-row. Its width
 * is an upper bound on the widest figure the column prints, computed in the
 * theme file: the table pins tabular numerals, so a figure's width is a count
 * of digits at 0.75em each and separators at half that. Every row is handed the
 * SAME strip, which is what keeps the bars comparable - a per-row reservation
 * would give a short figure a longer track and let a smaller total draw a
 * longer bar. The unit is `em` and NOT `ch`, which was the first answer and was
 * wrong: `ch` is the default "0" advance, Public Sans sets its default figures
 * narrower than its tabular ones, and a strip counted in `ch` comes out about
 * 13% short. The theme file carries the measurement.
 *
 * `max(0px, ...)` IS THE DEGRADATION, not a rounding nicety. If a column is
 * ever squeezed until the strip and its gutter exceed the cell, the track
 * reaches zero and EVERY bar disappears together - the chart goes away rather
 * than becoming a row of equal stubs that all say the same wrong thing. It
 * cannot happen at the width this theme guarantees: `--agora-table-column-min`
 * is 10rem, this corpus reserves 7.5em, and the smallest bar it draws still
 * measures several pixels at that floor.
 *
 * ⚠️ THAT RESERVATION READ 6.75em UNTIL THE MONEY FIELDS WERE GIVEN A UNIT
 * (D-047). A configured prefix is one more character in every figure in the
 * column, so the theme charges it one more character's width and the strip
 * grows with it - read off the rendered page as `--agora-bar-figure: 7.500em`,
 * not predicted. It moves the floor in the SAFE direction: the track at that
 * floor is the strip plus its gutter, so a wider strip is a wider track.
 *
 * The fallback in `var(--agora-bar-figure, 9.375em)` is a SAFE default and not a
 * placeholder: it is the same bound applied to `999,999,999.99`, so a table
 * that somehow renders without the theme's computed value still reserves enough
 * for a nine-figure total instead of falling back to the overlapping behaviour
 * this rule was rewritten to end.
 *
 * `isolation: isolate` RATHER THAN A z-index RACE. The fill is at z-index -1 so
 * that it paints behind the amount; without a stacking context of its own on
 * the span it would sink behind the row's background as well and disappear on
 * every banded row. One declaration pins it between the two.
 *
 * LOGICAL PROPERTIES RATHER THAN A GRADIENT. The obvious implementation is a
 * hard-stopped linear-gradient, and it is wrong here for one reason: gradients
 * take `to right`, which is not a logical direction, so a right-to-left site
 * would grow every bar from the wrong edge or need the whole value written
 * twice. `inset-inline-start` needs neither.
 */
/**
 * The money column's own floor, and it exists because of a measurement.
 *
 * A bar is only worth drawing while the track is wide enough to tell two
 * amounts apart. Squeezed to the table's ordinary column floor of 10rem, the
 * strip and its gutter leave about 12px of track, and this corpus then renders
 * its three smallest areas as three IDENTICAL one-pixel stubs - three different
 * amounts drawn the same way, which is not a small chart but a false one.
 * Measured at 390px and 600px viewports before this rule existed.
 *
 * SO THE COLUMN ASKS FOR TWICE THE STRIP, which is the narrowest width at which
 * the bar still gets at least half the cell it lives in. Derived rather than
 * dialled in: reserved strip plus gutter for the figure, the same again for the
 * track, plus the cell's own inline padding. At that floor the largest bar is
 * 124px and the smallest this corpus draws is around 7px - still a chart.
 * Those two pixel figures were measured before the money fields carried a unit,
 * and they are a FLOOR rather than a current reading: the unit widens the strip
 * and the track by the same amount, so both bars grew when it was configured.
 * They are left as they were measured rather than re-estimated by arithmetic.
 *
 * IT IS NOT A BREAKPOINT, deliberately. A media query would have to guess the
 * width at which THIS table stops being squeezed, which depends on the page's
 * content column and on how many columns the view has; this arithmetic depends
 * on neither, holds under text zoom because every term scales with the font,
 * and simply makes the table scroll a little further inside the scroller it
 * already has.
 *
 * The `var()` fallback should never be reached here: the theme file declares
 * `--agora-bar-figure` on the header cell and on every body row of this column,
 * so all of them compute the same floor.
 *
 * `max()` AGAINST THE ORDINARY COLUMN FLOOR closes the other end of the range,
 * and it is a case this rule opened rather than one it inherited: a register
 * that records no amounts at all reserves nothing, and without the `max()` this
 * selector - which outranks the shared `th, td` rule - would shrink a column of
 * empty cells to about 3rem, narrower than every column beside it. It can only
 * ever RAISE the floor now, never lower it.
 */
.agora-table .views-field-agora-total {
  min-width: max(var(--agora-table-column-min), calc(2 * (var(--agora-bar-figure, 9.375em) + var(--agora-space-2xs)) + 2 * var(--agora-space-s)));
}

.agora-bar {
  position: relative;
  isolation: isolate;
  display: block;
  padding-block: var(--agora-space-3xs);
}

.agora-bar::before {
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline-start: 0;
  width: calc(var(--agora-bar, 0) * max(0px, 100% - var(--agora-bar-figure, 9.375em) - var(--agora-space-2xs)));
  content: "";
  background-color: var(--agora-color-accent-soft);
}

/* -------------------------------------------------------------------------- */
/* THE BANNER, AS ONE ROW                                                      */
/* -------------------------------------------------------------------------- */

/**
 * ⚠️ READ THIS BEFORE THE PARAGRAPH ABOVE HEADED "The banner band's two rows".
 * That paragraph describes the layout this section replaces and has been left
 * exactly as written, on instruction: its argument - that a navigation of real
 * register names squeezed beside a mark and a name is what forces the
 * abbreviations nobody can search for - is still the reason the row is built to
 * WRAP rather than to compress, and whether one row survives real labels is a
 * measurement that belongs in a task report, not in a comment written by
 * whoever changed the layout. css/layout.css holds the row itself.
 *
 * The rules below TAKE SOMETHING BACK from the two-row layout. Each is marked,
 * because a reader who does not know it is undoing a rule from above will read
 * it as arbitrary.
 */

/* Takes back the hairline that separated the two rows - in a single row it
   would draw a line above the navigation and nothing else - and gives the
   navigation the room left over, so the search field sits at the inline end of
   the row rather than immediately after the last menu item. */
.agora-page__header .agora-region--header nav {
  flex: 1 1 auto;
  min-width: 0;
  border-block-start: 0;
}

/* Takes back the masthead's own vertical padding: the row owns that now, and
   keeping both would make the banner as tall as it was with two rows. */
.agora-page__header .agora-region--header .agora-branding {
  padding-block: 0;
}

/**
 * THE MASTHEAD'S SCALE - THE TWO OVERRIDES THAT USED TO BE HERE ARE GONE, and
 * they are recorded rather than silently deleted, because the argument that put
 * them there is still half right.
 *
 * It read: the mark and the name both go up one notch, because a masthead
 * reading at the same size as the navigation beside it is what made this header
 * look like a demonstration. That half stands. What it did not weigh is the
 * other end. The mark went to 3.25rem - 52px - which made it the tallest thing
 * in a row whose every other item is 44px, so it was the MARK and not the
 * padding that set the banner's height, and 8px of that height was bought by
 * nothing a reader can see.
 *
 * SO BOTH TAKE THE SHARED SCALE BACK: the mark is 2.75rem, the same 44px as the
 * control beside it, and the name is --agora-font-size-lg. The row is a single
 * 44px band. The name still stands well clear of the 1rem navigation next to
 * it, which is the comparison the old argument actually made.
 *
 * There is nothing left to scope. The branding block placed in the contentinfo
 * band is a colophon and always used the shared scale; now the banner does too,
 * and the two rules that separated them are the two rules that are gone.
 */

/**
 * The search field in the banner.
 *
 * IT IS THE ITEM THAT GIVES WAY. `flex: 0 1 <width>` means it asks for its
 * width and shrinks below it before anything else in the row does; the mark,
 * the name and the register labels keep the room they need. Below the floor the
 * outer row wraps and the field takes a line of its own, which is the two-row
 * banner arriving by wrapping rather than by a breakpoint.
 *
 * `min-width: 0` on the form as well as on the input, because a flex item's
 * automatic minimum size is its content and the button inside it does not
 * shrink - without this the form would refuse to go below the button's width
 * plus the input's, and push the page wider instead.
 */
.agora-header-search {
  display: flex;
  flex: 0 1 var(--agora-header-search-width);
  gap: var(--agora-space-2xs);
  min-width: 0;
}

.agora-header-search__input {
  flex: 1 1 var(--agora-header-search-floor);
  min-width: 0;
}

/**
 * The placeholder, in the muted text token - a declared pair on the page
 * surface at 4.5:1. `opacity: 1` because browsers dim a placeholder by default
 * and a dimmed muted token is no longer the pair that was computed.
 */
.agora-header-search__input::placeholder {
  opacity: 1;
  color: var(--agora-color-text-muted);
}

/**
 * The button keeps the element layer's solid control - the inverse surface
 * carrying the inverse text, a pair declared at 14.29:1 - because the banner is
 * the page surface and that is exactly the ground that control was designed
 * against. What changes is its shape: it is a SQUARE of the target size holding
 * one drawing, and the padding the element layer gives a worded button is taken
 * back so that the square is the square. `flex: 0 0 auto` so the field beside
 * it, and not the button, is what gives way when the row tightens.
 */
.agora-header-search__submit {
  flex: 0 0 auto;
  width: var(--agora-target-size);
  padding: 0;
}

/**
 * The magnifier. Stroked in `currentColor`, so it is the inverse text token on
 * the inverse surface - the button's own declared pair - and a change to that
 * token cannot leave the drawing behind. `fill: none` because the circle would
 * otherwise be a disc.
 */
.agora-header-search__icon {
  display: block;
  width: var(--agora-glyph-size);
  height: var(--agora-glyph-size);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

/* -------------------------------------------------------------------------- */
/* THE FRONT PAGE'S MASTHEAD BAND                                              */
/* -------------------------------------------------------------------------- */

/**
 * WHAT IT IS MADE OF. The band is the page-title block - which already exists,
 * already sizes itself to the heading, and is a placement this repository ships
 * - given the inverse surface and stretched to the full width of the viewport.
 * What sits INSIDE it is one template, put there by a preprocess. A site that
 * changes its front page keeps its masthead, because the masthead is not part
 * of the front page's content.
 *
 * FULL BLEED WITHOUT VIEWPORT UNITS IN THE LAYOUT. The usual trick for a band
 * inside a centred column is a negative inline margin of `calc(50% - 50vw)`,
 * and it is the usual trick because it is easy to write and easy to ship a bug
 * with: `100vw` includes the scrollbar, so on any page tall enough to scroll it
 * is wider than the viewport and the page scrolls sideways. That is a WCAG 2.2
 * SC 1.4.10 failure arriving as a rounding error. A spread `box-shadow` paints
 * the same band and takes no part in layout at all, and `clip-path` holds it to
 * the element's own height. Nothing here can widen the document.
 *
 * The id is this theme's own. Core builds the element id from the machine name
 * of the block placement, and that placement is one this repository ships in
 * config/optional - so the hook is owned here rather than borrowed from markup
 * somebody else controls.
 */
/**
 * THE BAND'S HEIGHT, AND IT IS A FLOOR RATHER THAN A PADDING SUM.
 *
 * ⚠️ THIS WAS 29rem - 464px - AND THE ARGUMENT FOR 464 DIED WITH THE RULE IT
 * RESTED ON. It read: the approved design scales to 337px, but at 337 "the
 * whole building does not fit", because the picture was fitted to the band's
 * HEIGHT and so the band's height decided how wide the building could be. That
 * premise was the fault. The design does not show the whole building - measured
 * on the mockup itself, its picture is cropped by the band along the bottom and
 * carries bare surface above the roof - so nothing has to be made taller to fit
 * it. Measured band for band against the mockup at a 1440 viewport: header 74
 * against our 60, hero 340 against our 464. The hero was the one large error,
 * and it was +124px, which is a third of the band again.
 *
 * 21.25rem is 340px at the default root size, which is the mockup's own number,
 * expressed in rem so that it scales with the reader's own font size. It stays
 * a FLOOR, and here the content is what wins: with the lede wrapped to two
 * lines the content and its padding need 343px, so the band renders at 343 and
 * the mockup comparison reports +3px rather than 0. That is the floor doing its
 * job - a band whose content needs more still gets more, which is what keeps
 * the narrow layouts working - and 3px is not worth taking off a sentence.
 *
 * `display: grid` WITH `align-content: center` rather than more padding. The
 * padding still sets the minimum air around the content; the grid is what
 * centres that content in the leftover space when the floor is what decides the
 * height. Written as padding alone it would take 126px a side and stop being
 * a spacing value.
 *
 * ISOLATION IS LOAD-BEARING AND IS NOT TIDINESS. The picture layer below blends
 * with `screen`, and a blend mode with nothing to isolate it reaches through to
 * whatever the page paints behind this band - which would make the result a
 * property of the page rather than of this rule, the exact objection that got
 * `luminosity` rejected. `isolation: isolate` makes this band its own blending
 * group, so the layer can only ever blend with the band's own surface.
 */
.agora-page--front #block-agora-theme-page-title {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: 21.25rem;
  padding-block: calc(var(--agora-space-xl) + var(--agora-space-2xs));
  color: var(--agora-color-text-inverse);
  background-color: var(--agora-color-surface-inverse);
  box-shadow: 0 0 0 100vw var(--agora-color-surface-inverse);
  clip-path: inset(0 -100vw);
}

/**
 * The focus ring inside the band.
 *
 * The band holds interactive controls now, and the ordinary ring is checked
 * against the PAGE surface, not against this one. The inverse ring is the pair
 * computed at the 3:1 non-text threshold on the inverse surface, and it is the
 * same substitution css/layout.css makes in the footer band for the same
 * reason.
 */
.agora-page--front #block-agora-theme-page-title :focus-visible {
  outline-color: var(--agora-color-focus-inverse);
}

/**
 * The composition: words on one side, the mark on the other.
 *
 * FLEX AND A WRAP, NOT ABSOLUTE POSITIONING. The mark used to be emitted by the
 * page template and positioned absolutely over this band, with the headline and
 * the lede reserving a padding the width of the artwork so that they never ran
 * under it. That works while the band carries two lines of text. It stops
 * working as soon as a control is one of the things being reserved against: the
 * reservation is a fixed length and a control is not, and at 390px it left
 * about 160px of room for one. So the mark moved inside the band and the two
 * became siblings.
 *
 * `align-items: center` RATHER THAN `stretch`, so that the mark stays the size
 * the token asks for instead of growing to the height of the column beside it.
 */
/**
 * `position: relative` AND DELIBERATELY NO `z-index`. This row is the
 * containing block for the third of the band's layers - the scrim behind the
 * mark, drawn further down this file - and it is the right box for it because
 * it is centred exactly like the band's own content column, so one `50vw`
 * expression bleeds all three layers to the same two edges.
 *
 * Leaving `z-index` at `auto` is the load-bearing half: a value here would make
 * this row a stacking context, the scrim would sort inside THAT instead of
 * inside the band, and it would then paint on top of the mark rather than
 * behind it.
 *
 * ⚠️ THE SCRIM IS `position: absolute` FOR A SECOND REASON BESIDES PLACEMENT.
 * A pseudo-element of a flex container is a FLEX ITEM, so an in-flow `::before`
 * here would be laid out as a third column beside the words and the mark and
 * would visibly break the row. Out-of-flow boxes are not flex items, which is
 * what makes this safe.
 */
.agora-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--agora-space-m) var(--agora-space-l);
}

/**
 * `min-width: 0` because a flex item's automatic minimum size is its content,
 * and a long unbroken word in a headline would otherwise refuse to shrink and
 * push the row wider than the page - the SC 1.4.10 rounding error again.
 */
.agora-hero__body {
  flex: 1 1 var(--agora-hero-body-floor);
  min-width: 0;
}

.agora-hero__art {
  flex: 0 1 var(--agora-hero-art-width);
  min-width: 0;
}

.agora-hero-art {
  display: block;
  width: 100%;
  height: auto;
}

/**
 * THE BAND'S OWN PICTURE - it FILLS the band, and the words sit on a scrim.
 *
 * ⚠️ READ THIS FIRST: THIS THEME NO LONGER SHIPS A PICTURE, AND THE DEFAULT IS
 * A FLAT BAND. Everything below describes what happens when a site HAS set one;
 * with nothing set, `var(--agora-hero-image, none)` resolves to `none`, the
 * ::before layer paints nothing, and the band is its own surface token from
 * edge to edge. The two scrims are drawn in that same token, so they composite
 * to the flat band rather than to a visible shape - the default costs no rule
 * of its own, which is why there is not one, and is a state to look at rather
 * than to reason about (a rendering of it is in the release that introduced it).
 *
 * WHY THE FILE WENT. A theme installed on its own put a photograph of a
 * building that belongs to nobody in particular across the top of a council's
 * home page, hard-named in this stylesheet, with nothing in the administration
 * interface able to remove it. That is demonstration content travelling inside
 * a product. The picture is now `hero_image_path` in the theme's settings, set
 * on this theme's own page under Appearance, and written onto the band as a
 * custom property by the theme's block preprocess. The site template ships the
 * demonstration image and points the setting at it. The paragraphs below are
 * kept in full rather than trimmed, because every number in them was measured
 * against a real file and a site owner choosing one needs them.
 *
 * ⚠️ SIX ROUNDS OF THIS RULE WERE REJECTED ON SIGHT AND EVERY ONE OF THEM
 * PASSED ITS OWN CHECKS. All six tried the same shape - keep the picture AWAY
 * from the type, in a window between the lede and the mark, so that nothing
 * ever inks over it - and that shape is what made every round an argument
 * about opacity. A picture confined to a strip has to be faint enough not to
 * disturb its neighbours, and faint enough is invisible.
 *
 * THIS ROUND INVERTS IT, and the inversion is the maintainer's. The picture
 * fills the whole band, bleeding to both edges of the viewport, at an opacity
 * chosen to make it read as architecture. Where the words are, a scrim is laid
 * UNDER them. Nothing is hidden; the ground beneath the type is darkened
 * instead - which is a thing that can be measured on the rendered pixels and
 * tuned until it passes, where "make the photograph disappear" never could be.
 *
 * ---------------------------------------------------------------------------
 * WHY THE PREVIOUS FILE COULD NOT HAVE DONE THIS. It is a measurement, not a
 * preference about pictures. That file's ground was a SKY, and across its own
 * width the sky on the right measured BRIGHTER than the shadowed stone in the
 * middle. `opacity` is one multiplier over a whole layer, so lowering it pulled
 * the sky and the stone toward the band's surface TOGETHER: there was no
 * setting at which the building was present and its background was not. That is
 * why the old rule needed a mask, why the mask needed a mask-composite trick to
 * square its own alpha, and why the result read as a smudge.
 *
 * THE SHAPE TO CHOOSE, and it is the one number a site owner needs from this
 * comment. The file this was tuned against was 2200x530. Its ratio is 4.15,
 * which is the band's own ratio, so `cover` never has to choose a crop and no
 * framing decision is delegated to the browser. Every horizontal slice of it
 * was architecture - a colonnade running the full width under an even overcast
 * - which is exactly the property the two earlier files lacked and no parameter
 * could give them. A squarer picture still works; it is simply cropped hard at
 * the top and the bottom, and whatever was interesting about its sky is the
 * part that goes.
 *
 * NO MASK AND NO BLUR. Blurring lowers every edge in the picture at once, and
 * an architectural photograph is MADE of edges; a mask was only ever there to
 * carve a window out of a layer that had to be small. Neither has anything to
 * do now.
 *
 * ---------------------------------------------------------------------------
 * THE FULL BLEED, AND THE OVERHANG IT COSTS. `inset-inline: calc(50% - 50vw)`
 * on both sides pulls each edge of the layer out to the viewport edge, which is
 * correct for any centred element without this rule having to know how wide the
 * element is. `100vw` INCLUDES the scrollbar, so on a page tall enough to
 * scroll each side overhangs by half a scrollbar - about 7.5px - and BOTH sides
 * now overhang where the old rule bled nowhere at all. The absorber is the
 * `overflow-x: clip` below, which is why it is declared in the same query.
 * Reflow at 960, 1024, 1200, 1440 and 1920 with scrollbars visible is the
 * measurement that this is true rather than intended (SC 1.4.10).
 *
 * ---------------------------------------------------------------------------
 * THE SCRIM'S EXTENT IS DERIVED FROM WHERE THE TYPE ENDS, NOT CHOSEN.
 * `--agora-hero-scrim-edge` reconstructs the inline start of the page's own
 * content column, measured from the bled layer's own inline start:
 * `max(0px, (100vw - --agora-container-width) / 2)` is the centring margin and
 * `--agora-space-m` is the container's padding. Both this and the bleed above
 * are written against `100vw`, so the half-scrollbar each of them is wrong by
 * is the SAME half-scrollbar, and the two errors cancel. At a 1440 viewport it
 * resolves to 144px and the column's content really does begin at 144px of the
 * layer - checked, not assumed.
 *
 * From there the numbers are the lede's. It is capped at 26rem and wraps to two
 * lines that end 416px after the column starts, so the scrim is held fully
 * opaque to 27rem past the edge and eases to nothing by 42rem past it. At 1440
 * that is opaque to 576px, gone by 816px, with the mark's leftmost ink at
 * 956px: the ramp is finished 140px before the mark begins, so the two scrims
 * never sum. The headline is shorter than the lede and the button row shorter
 * again, so the lede is the binding constraint and the only one that has to be
 * tracked if the copy changes.
 *
 * A GRADIENT TO `transparent`, AND AN `opacity` ON THE LAYER, BECAUSE AN ALPHA
 * CANNOT BE WRITTEN HERE. tests/bin/no-colour-literals refuses every colour
 * FUNCTION outside the token file - the mixing one and the slash-alpha forms
 * included, and naming either of them in this comment turns the gate red, which
 * is worth knowing before you spend the hour - and a token carrying its own
 * alpha is not representable in tests/bin/contrast-check's parser either, which
 * reads a bare three- or six-digit hex and nothing else.
 * So the gradient runs from the token to `transparent`, which is not a colour
 * literal and needs no function, and the layer's own `opacity` sets how solid
 * its opaque end actually is. Gradient interpolation is premultiplied, so the
 * fade does not pass through a lighter tone on its way to nothing.
 *
 * ---------------------------------------------------------------------------
 * `isolation: isolate` ON THE BAND IS STILL LOAD-BEARING, FOR A NEW REASON.
 * It used to be there to contain a blend mode, and the blend mode is gone. What
 * it does now is create a stacking context: without one, a descendant at
 * `z-index: -1` paints BEHIND the band's own opaque background-color and
 * nothing is visible at all. With one, the painting order inside the band is
 * its background, then the negative layers in tree order - picture, then scrim,
 * then the mark's scrim - then everything in flow. That order is the whole
 * composition and it is not an accident of source position.
 */
@media (min-width: 60rem) {
  /*
    The scrollbar absorber for the two `vw` bleeds above. `clip` and not
    `hidden`: hidden would make this a scroll container, which would break
    `position: sticky` for anything a site puts in the region and would give the
    region its own scrollable overflow. `clip` clips and creates nothing.
  */
  .agora-page--front .agora-page__main {
    overflow-x: clip;
  }

  .agora-page--front #block-agora-theme-page-title {
    --agora-hero-scrim-edge: calc(max(0px, (100vw - var(--agora-container-width)) / 2) + var(--agora-space-m));
  }

  .agora-page--front #block-agora-theme-page-title::before,
  .agora-page--front #block-agora-theme-page-title::after {
    position: absolute;
    z-index: -1;
    inset-block: 0;
    inset-inline: calc(50% - 50vw);
    content: "";
  }

  /**
   * The picture, AND ITS OPACITY IS THE BAND'S TINT - the two are the same
   * declaration and this comment exists because that is not obvious.
   *
   * ⚠️ THE BAND STOPPED BEING ITS OWN COLOUR AT 0.82 AND THAT WAS THE DEFECT.
   * The scrim only covers the type, so everything to its right was the file at
   * nearly full strength: the band ran from the inverse surface on one side to
   * a near-white on the other, and a masthead that is the one dark band on a
   * page of light ones cannot be light for half its width. Measured with the
   * mockup's own statistic - the mean luminance of the picture region against
   * the flat surface at the band's inline start - the mockup rises +23 over
   * its ground and this band rose +53.
   *
   * ⚠️ AND THE FIX IS ONE NUMBER, NOT A FOURTH LAYER, WHICH IS WORTH THE
   * PARAGRAPH BECAUSE THE OBVIOUS FIX IS THE FOURTH LAYER. A flat wash in
   * --agora-color-surface-inverse laid over the picture, at alpha t, composites
   * to (1-t)·a·picture + (the rest)·the same token the band is already painted
   * in - because the band's own background IS that token. So a tint layer and a
   * lower `opacity` on the picture are not merely similar, they are the SAME
   * composite: only the product a·(1-t) survives, and every layer above the
   * picture here is drawn in that one token, so their attenuations simply
   * multiply and their ORDER cannot matter either. Falsified rather than
   * asserted: a build with `opacity: 0.82` plus a wash at 0.4878 was rendered
   * beside this one, and the two images differ nowhere in the band by more than
   * one step of 255 - the rounding of the extra composite. A layer that
   * provably changes nothing is a layer that will be maintained forever by
   * someone who cannot see what it does, so it is not shipped.
   *
   * 0.42 IS WHERE THE TWO CONSTRAINTS MEET. Below it the architecture starts to
   * go; above it the rise climbs past the mockup's. It is not the number that
   * makes the picture most visible, and that is the point.
   *
   * ⚠️ THE FALLBACK IN THE `var()` IS THE WHOLE DEFAULT AND IT IS ONE WORD.
   * `none` is a real value for background-image, so with no setting this layer
   * is a positioned box that paints nothing at all - no request, no repaint, no
   * rule needed to switch it off. Writing `var(--agora-hero-image)` with no
   * fallback would ALSO have worked, by making the declaration invalid at
   * computed-value time, and it is not written that way on purpose: a
   * behaviour that depends on a reader knowing what an unset custom property
   * does to its own declaration is a behaviour nobody will maintain.
   */
  .agora-page--front #block-agora-theme-page-title::before {
    opacity: 0.42;
    background-image: var(--agora-hero-image, none);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }

  /* The scrim under the words. */
  .agora-page--front #block-agora-theme-page-title::after {
    opacity: 0.94;
    background-image: linear-gradient(to right, var(--agora-color-surface-inverse) 0, var(--agora-color-surface-inverse) calc(var(--agora-hero-scrim-edge) + 27rem), transparent calc(var(--agora-hero-scrim-edge) + 42rem));
  }

  /**
   * THE SOFTER SCRIM BEHIND THE MARK, AND WHY IT IS A THIRD ELEMENT.
   *
   * The mark asks less of its ground than the type does - 3:1 against a shape,
   * not 4.5:1 against a letter - so it must not be given the type's scrim.
   * Two strengths need two `opacity` values, `opacity` belongs to an element
   * rather than to one background layer of it, and the band has only two
   * pseudo-elements. Hence this one, on the row rather than on the band.
   *
   * ⚠️ IT IS NO LONGER LOAD-BEARING AND IT IS KEPT ANYWAY - SAID OUT LOUD SO
   * THAT NOBODY HAS TO GUESS. It was built when the picture ran at 0.82 and the
   * mark's corner measured 1.47:1; the band's tint now does most of that work.
   * MEASURED WITH THIS LAYER SWITCHED OFF AND NOTHING ELSE CHANGED, at a 1440
   * viewport: the mark 3.72:1 and the record bars 3.74:1, both already over the
   * 3.0 threshold. With it: 6.44:1 and 6.15:1. So it buys headroom rather than
   * compliance, and headroom is worth a layer here because the picture is now
   * WHATEVER A SITE OWNER UPLOADED - which may well be one whose sky sits where
   * the measured file's roofline did. That was already the argument when the
   * picture was a shipped asset a site MIGHT swap; it is a stronger argument
   * now that no file is shipped and every picture in this band is one nobody
   * here has seen. A future round that wants the picture stronger at the inline
   * end should delete this layer before it touches anything else, and should
   * re-run that measurement rather than trusting this sentence.
   *
   * ⚠️ RE-MEASURED 2026-09-05 AND THE FIGURES ABOVE STILL DESCRIBE THIS BRANCH,
   * WHICH IS WHY THEY ARE NOT EDITED. D-048 sank the mark into the band, and
   * for one commit it did so on BOTH grounds; the amendment the same day made
   * the tone conditional, so over a picture - the only case this rule runs in -
   * the mark is back to the tone these numbers were taken against. Re-measured
   * at 1440 with a picture set, per-pixel against the layer immediately behind
   * each shape rather than against an assumed ground, this layer buys:
   *
   *              structure (14408 px)          record bars (3705 px)
   *   with       min 6.63  median 11.09        min 5.96  median 7.40
   *   without    min 3.81  median  9.58        min 3.62  median 5.21
   *
   * Both branches clear 3:1 over this picture with or without this layer, which
   * is what "headroom rather than compliance" meant and still means. The margin
   * it buys is large and the picture it is measured against is one file.
   *
   * ⚠️ AND HERE IS WHAT THE ONE-COMMIT VERSION COST, KEPT BECAUSE A MEASUREMENT
   * THAT CHANGED A DECISION IS WORTH MORE THAN ONE THAT CONFIRMED IT. With the
   * watermark tone forced across this ground too, the same method read 52% of
   * the structure and 89% of the record bars below 3:1, and this layer went
   * from buying headroom to being the difference between faint and gone. The
   * ratios were not what decided it: the mark stopped reading as a portico,
   * because the recess is OPAQUE and became the loudest shape in the
   * composition as soon as the columns stopped outshining it. A watermark
   * belongs on a ground with no texture of its own; this ground has a
   * photograph on it, and the photograph is the texture.
   *
   * The open door is untouched by all of it, and that is what the recess is
   * for: measured at exactly 4.19:1 in every state tried, over 1476 pixels,
   * because it is drawn on opaque surface and never on the picture at all.
   *
   * ⚠️ IT IS AN ELLIPSE CENTRED ON THE MARK AND NOT A BOX BEHIND IT. An opaque
   * plate under the mark was built in an early round and rejected on sight, and
   * the reason a plate is what a careless version becomes is arithmetic: the
   * worst ground is at the mark's TOP-LEFT CORNER, where the picture's sky
   * meets its roofline, so a small gradient steep enough to darken that corner
   * has to be nearly solid in the middle. This one is the other way round -
   * 26rem by 20rem, far larger than the mark, so 0.58 at its centre is still
   * about 0.42 at that corner. Nothing in it has an edge.
   *
   * WHERE ITS CENTRE IS, WITHOUT MEASURING THE MARK. The mark is the last thing
   * in a row that ends at the content column's inline end, so its centre is
   * half its own width in from that edge: `--agora-hero-scrim-edge` plus half
   * `--agora-hero-art-width`, measured from the right. Checked against the
   * rendered page at 1024, 1200, 1440 and 1920, where it tracks the mark's real
   * centre to within about 8px - the half-scrollbar that `100vw` always costs.
   *
   * ⚠️ `at right <length> top 50%` AND NOT `at right <length> center`, WHICH IS
   * WHERE AN HOUR WENT. A position with an offset from one edge must give an
   * offset from the other edge too: the four-value form is keyword, length,
   * keyword, length, and a bare `center` in the second slot matches no
   * production in the grammar. The whole `background-image` is then invalid and
   * DROPPED, so the layer paints nothing at all - silently, with no console
   * error and no visual clue beyond the measurement that was being taken
   * anyway. The version with `center` measured 1.47:1 on the mark, which looked
   * like a scrim that was too weak rather than a scrim that did not exist.
   *
   * `inset-block: -100%` AND NOT `0`. This row is shorter than the band - the
   * band has padding and a `min-height` floor - so a layer inset to the row
   * would stop short of the band's top and bottom and draw two horizontal
   * edges. Overflowing it and letting the band's own `clip-path` cut it is what
   * removes them; the ellipse's vertical centre stays the row's centre, which
   * is the band's centre too.
   */
  .agora-page--front .agora-hero::before {
    position: absolute;
    z-index: -1;
    inset-block: -100%;
    inset-inline: calc(50% - 50vw);
    content: "";
    opacity: 0.58;
    background-image: radial-gradient(26rem 20rem ellipse at right calc(var(--agora-hero-scrim-edge) + var(--agora-hero-art-width) / 2) top 50%, var(--agora-color-surface-inverse) 0%, var(--agora-color-surface-inverse) 30%, transparent 100%);
  }
}

/**
 * FORCED COLOURS: no picture and no scrims at all.
 *
 * In a forced-colours mode the user has said, at the level of the operating
 * system, that they want this page in their own palette. Backgrounds become the
 * system canvas and text becomes the system text colour - but a background
 * IMAGE survives that substitution, which is why this rule is written rather
 * than assumed. A photograph at four tenths of its opacity - an opacity whose
 * whole job is to tint it INTO a surface token that, in this mode, no longer
 * exists - over a canvas whose luminance the theme cannot know, is texture
 * behind text with no computable contrast at all. The tint is the part that
 * fails first here: the picture would arrive at full strength.
 *
 * All three layers go, and what remains is the band, the headline and the mark
 * in the system's own colours - the same thing every reader below 60rem gets.
 * The mark is drawn in `var()` fills, which forced-colours modes substitute, so
 * it survives on its own terms.
 */
@media (forced-colors: active) {
  .agora-page--front #block-agora-theme-page-title::before,
  .agora-page--front #block-agora-theme-page-title::after,
  .agora-page--front .agora-hero::before {
    display: none;
  }
}

/**
 * The headline.
 *
 * Two steps larger than an ordinary page title on a wide viewport, one step on
 * a narrow one, and the accent rule under it stays - it is the same rule every
 * heading in this theme gets, and the accent is a declared pair against the
 * inverse surface at 4.19:1, so it needs no special case.
 *
 * THE CLAMP'S ENDPOINTS ARE BOTH STEPS OF THE TYPE SCALE, which is the rule
 * this theme keeps for every size: 3xl is the floor, 4xl the ceiling, and the
 * middle term climbs from the floor at one hundredth of the viewport so the
 * ceiling is reached from about 820px up. Nothing here is a bare rem, and a
 * change to either step in css/typography.css moves this headline with it.
 *
 * THE PICTURE'S OPACITY IS UNCHANGED AT 0.42. It may only rise while the lede
 * keeps 4.5:1 over whatever it sits on, and the note on the lede below records
 * the measurement: at 26rem the lede ends at 545px of a 1440 band and the
 * scrim is fully opaque to 576px, so the lede sits on the band's own surface
 * at the declared 9.36:1 and the picture does not reach it. That is still
 * true - the headline grew, the lede did not move - but the picture's own
 * note records that 0.42 is where the band's tint and the architecture meet,
 * and a larger headline is not a reason to reopen that.
 *
 * A WORD MAY BREAK ANYWHERE RATHER THAN RUN OFF THE PAGE. At this size a
 * single long word is most of a phone's width, and a reader who applies the
 * text spacing WCAG 2.2 SC 1.4.12 measures with - letters 0.12em apart, words
 * 0.16em - makes it wider than the band: the review of 2026-10-27 measured
 * "Transparency" running 46px past the edge of a 320px page, which then
 * scrolled sideways (advisory A6). `anywhere`, and not `break-word`, because
 * the headline's column is a flex item, and a flex item will not shrink below
 * its narrowest content: only `anywhere` counts the break when that width is
 * worked out, so the column narrows and the word wraps inside it instead of
 * pushing past it. It changes nothing for a headline that fits, which is
 * every one at ordinary spacing.
 */
.agora-page--front #block-agora-theme-page-title h1 {
  max-width: var(--agora-measure);
  margin-block-end: 0;
  overflow-wrap: anywhere;
  font-size: clamp(var(--agora-font-size-3xl), calc(var(--agora-font-size-3xl) + 1vw), var(--agora-font-size-4xl));
}

/**
 * The lede under the headline. Cream on navy is the declared inverse-muted
 * pair, computed like every pair in the token file. The block-end margin every
 * paragraph gets is taken back because what follows is the button row, whose
 * own top margin opens the gap; leaving both would open a step of empty navy
 * that reads as a missing element.
 *
 * ⚠️ 26rem AND NOT `--agora-measure`, WHICH IS THE ONE PLACE THIS BAND OVERRULES
 * THE SHARED MEASURE. At 68ch this sentence runs to 810px of a 1425px band and
 * lands on the picture, and that overlap is what capped the picture's opacity
 * at 0.25 for three rounds - it is body text, so SC 1.4.3 asks 4.5:1 of it over
 * whatever it sits on, and measured there at 0.45 opacity it read 1.68:1. At
 * 26rem it wraps to two lines ending at 545px; the picture's box starts at
 * 527px and its squared ramp is still within a hundredth of nothing there, so
 * the lede is back on the band's own surface at the declared 9.36:1 and the
 * picture has stopped competing with a sentence. The mockup does the same
 * thing: its lede is two lines and stops well short of its building.
 */
.agora-page--front #block-agora-theme-page-title .agora-hero-lede {
  max-width: 26rem;
  margin-block: var(--agora-space-s) 0;
  color: var(--agora-color-text-inverse-muted);
  font-size: var(--agora-font-size-md);
}

/**
 * The two ways in.
 *
 * THE ROW IS A <p> AND HAS TO GIVE UP THE MEASURE. Every paragraph in this
 * theme is capped at 68ch so that prose stays readable; a row of controls is
 * not prose, and left capped it would wrap the second button onto its own line
 * on a wide screen for no reason.
 */
.agora-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--agora-space-2xs) var(--agora-space-s);
  max-width: none;
  margin-block: var(--agora-space-l) 0;
}

/**
 * A button that is a link.
 *
 * THE SHARED GEOMETRY IS HERE AND THE TWO GROUNDS ARE BELOW. Both carry the
 * element layer's control height, so a reader whose pointer is imprecise gets
 * the same target as anywhere else in the theme, and neither carries a shadow
 * or a radius beyond the theme's own 2px.
 *
 * ⚠️ "THE THEME'S OWN 2px" IS SIX PIXELS AS OF 2026-09-04. The sentence above is
 * kept because its point survives the number: these two controls take the shared
 * token and add nothing of their own to it. The token moved in css/base.css,
 * where the move is argued and where its two exclusions are listed; nothing here
 * had to change to follow it, which is the whole reason it is a token.
 */
.agora-hero__action,
.agora-hero__action:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--agora-target-size);
  padding-inline: var(--agora-space-m);
  transition: background-color 120ms ease-out;
  text-decoration: none;
  border: var(--agora-border-width-strong) solid transparent;
  border-radius: var(--agora-radius);
  font-weight: var(--agora-font-weight-bold);
}

/**
 * The primary.
 *
 * IT IS INVERTED FROM THE ELEMENT LAYER'S BUTTON AND THAT IS FORCED. The
 * default control is the inverse surface carrying the inverse text, which on
 * this band would be navy on navy: invisible, and a failure of SC 1.4.11 as
 * well as of common sense. Swapping the two gives the page surface carrying the
 * page text, a pair declared at 14.29:1. Its edge against the band is the pale
 * fill itself, which is the pair css/tokens.css declares as "a light control on
 * the masthead band"; the border is painted to match the fill rather than left
 * at the element layer's dark hairline, which against navy would be the
 * outermost edge and nowhere near 3:1.
 *
 * ⚠️ THE FILL IS THE SOFT ACCENT NOW, NOT THE PAGE SURFACE. Decided by [andres]
 * on 2026-09-04, looking at the rendered band: the amber control draws the eye
 * and the white one does not, on a band where exactly one thing should. The
 * paragraph above is kept whole because everything in it except the choice of
 * fill is still exactly why this rule looks the way it does: the border is still
 * painted to match the fill for the same reason, and the fill is still the
 * boundary. Only the colour of both moved.
 *
 * DARK TEXT ON THE AMBER, NEVER WHITE, and this is the condition the change was
 * accepted under rather than a preference. White on this step is 2.73:1 and
 * fails SC 1.4.3 outright. The page's own text token on it is 5.39:1 - the pair
 * css/tokens.css had been carrying as moot since the spend bars stopped running
 * under their figures, which is now load-bearing again.
 *
 * WHAT THE FILL IS MEASURED AGAINST, because the flat number is not the number.
 * The declared pair computes 5.23:1 on the band's own surface, but above 60rem
 * the band carries a photograph and the honest figure is the one taken from a
 * render: 4.97:1 against the brightest pixel adjacent to this button's edge at
 * a 1440 viewport, which is comfortably over the 3:1 this needs. The scrim over
 * the type column is what buys that, and it does not extend to the whole band -
 * the same fill would reach only 2.17:1 over the mark. The token file carries
 * both measurements and the warning that goes with them; do not move these
 * buttons outward without re-taking them.
 */
.agora-hero__action--primary,
.agora-hero__action--primary:visited {
  color: var(--agora-color-text);
  border-color: var(--agora-color-accent-soft);
  background-color: var(--agora-color-accent-soft);
}

/**
 * The hovered primary - AND THE LABEL INVERTS WITH THE FILL.
 *
 * Every hovered control in this theme darkens its own fill, and keeping that
 * convention here costs the label its colour: there is no darker step of this
 * hue that carries the dark page text at 4.5:1. The brand accent reaches 4.31
 * and the darkest step reaches 2.39, so the choice was a lighter hover, a
 * different idiom for this one control, or an inverted label. White on the
 * darkest step is 6.15:1 and is declared.
 *
 * ⚠️ THE BORDER IS DELIBERATELY NOT REPAINTED HERE AND THAT IS LOAD-BEARING.
 * The darkest step measures 2.32:1 against the band, so it must never be this
 * button's outermost edge. Leaving the border at the resting rule's soft accent
 * keeps the boundary a reader sees against the band identical in both states,
 * at the measured 4.97:1. Adding `border-color` to this rule to "finish" it
 * would put a 2.32:1 edge on the band and break SC 1.4.11 silently - nothing in
 * the gate renders a hover state.
 */
.agora-hero__action--primary:hover {
  color: var(--agora-color-text-inverse);
  background-color: var(--agora-color-accent-strong);
}

/**
 * The secondary.
 *
 * An outline in the brand accent, which is a declared pair against this band at
 * the 3:1 non-text threshold, with the label in plain inverse text. A FILLED
 * secondary was rejected by arithmetic rather than by taste: a fill would have
 * to carry 4.5:1 text and there is no step of this hue that does. An outline
 * needs only 3:1, because it is a boundary and not a background.
 *
 * ⚠️ THE SENTENCE ABOUT ARITHMETIC IS FALSE AS OF 2026-09-04 AND IS CORRECTED
 * HERE RATHER THAN DELETED, because it is the rule three declarations above that
 * falsified it and a reader arriving at this block deserves to be told so. There
 * IS a step of this hue that carries 4.5:1 text - the soft accent, at 5.39:1 -
 * and the primary button is now filled with it. What was true when that sentence
 * was written is that the brand accent, the step named in this rule, reaches
 * only 4.31:1; the soft step was in the file but had no use on this band yet.
 *
 * SO WHY THIS ONE IS STILL AN OUTLINE, which is now a design reason and no
 * longer an arithmetic one: it is the SECOND of two. Two filled controls side by
 * side on the same band state no order between them, and the whole point of the
 * pair is that one of them is where most readers should go first. The outline is
 * what makes the primary primary.
 */
.agora-hero__action--secondary,
.agora-hero__action--secondary:visited {
  color: var(--agora-color-text-inverse);
  border-color: var(--agora-color-accent);
}

.agora-hero__action--secondary:hover {
  color: var(--agora-color-text-inverse);
  background-color: var(--agora-color-surface-inverse-raised);
}

/* -------------------------------------------------------------------------- */
/* THE CONTENTINFO BAND'S COLUMNS                                              */
/* -------------------------------------------------------------------------- */

/**
 * A footer column's heading.
 *
 * IT IS A BLOCK LABEL, WHICH MEANS THE SITE DECIDES WHETHER IT EXISTS. Core
 * renders a block's label as a heading when the placement sets
 * `label_display: visible`; the placements this theme ships all set '0', so the
 * footer has no headings today and this rule draws nothing. It is written now
 * so that a site placing four menus in the footer gets four column headings
 * that look like the rest of the theme rather than four unstyled headings.
 *
 * ONE STEP DOWN FROM AN ORDINARY SECTION HEADING and in the muted inverse tone,
 * because a column heading names a short list of links rather than a section of
 * the page. The pair is declared: inverse-muted on the inverse surface.
 */
.agora-page__footer h2 {
  margin-block: 0 var(--agora-space-xs);
  letter-spacing: 0.02em;
  color: var(--agora-color-text-inverse-muted);
  font-size: var(--agora-font-size-base);
}

/**
 * A footer column's links stack instead of running along a line.
 *
 * `.agora-footer-menu` above lays the footer menu out as a horizontal row,
 * which was right when the footer was one line of obligations. In a column it
 * has to stack, and the rule below is what does it - scoped to the grid, so
 * that a site still using the footer as one row is unaffected.
 */
.agora-page__footer .agora-region--footer > * > .agora-footer-menu {
  flex-direction: column;
  gap: var(--agora-space-3xs) 0;
}

/**
 * THE SOCIAL ROW - a footer menu whose items carry the marks of the networks
 * they point at, laid out as one row of squares under the columns and above
 * the colophon line.
 *
 * IT SPANS THE GRID, and the grid stays count-free. The columns are `auto-fit`
 * over an 11rem floor, so nothing here says how many columns there are; the
 * menu's own <nav> is told to take every track there is, which is what puts
 * the row under the columns whatever their number. The block's heading, if
 * the site shows one, sits above the row exactly as a column's heading sits
 * above its links. `:has()` on the <nav> and not a class on it, because the
 * <nav> is core's block wrapper and the only thing this theme controls inside
 * it is the list.
 *
 * ⚠️ A SQUARE, NOT A GLYPH ON A LINE. Each mark is a link and each link is a
 * target-size square - 44px - with the drawing at the glyph size inside it.
 * The square carries a hairline in the muted inverse tone so that a mark's
 * target is visible as a target, and under the pointer or the keyboard it
 * takes the raised inverse surface with the inverse text on it, a pair
 * declared at 14.29:1; the focus ring is the footer's inverse ring, from
 * css/layout.css. The colour is set on the LINK and the SVG fills in
 * `currentColor`, so one token colours every mark.
 *
 * A TEXT LINK IN THE SAME LIST IS NOT A SQUARE. An external link to a host
 * this theme has no mark for - or an internal one the site put in the same
 * menu - keeps `.agora-footer-menu__link` alone and inherits the row's own
 * line height and target size; the modifier is what the mark adds.
 */
.agora-page__footer .agora-region--footer > nav:has(> .agora-footer-menu--social) {
  grid-column: 1 / -1;
}

.agora-page__footer .agora-region--footer > * > .agora-footer-menu--social {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--agora-space-2xs) var(--agora-space-s);
  align-items: center;
}

.agora-footer-menu__link--brand,
.agora-footer-menu__link--brand:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--agora-target-size);
  height: var(--agora-target-size);
  transition: background-color 120ms ease-out;
  color: var(--agora-color-text-inverse);
  border: var(--agora-border-width) solid var(--agora-color-text-inverse-muted);
  border-radius: var(--agora-radius);
}

.agora-footer-menu__link--brand:hover,
.agora-footer-menu__link--brand:focus-visible {
  color: var(--agora-color-text-inverse);
  border-color: var(--agora-color-text-inverse);
  background-color: var(--agora-color-surface-inverse-raised);
}

.agora-footer-menu__mark {
  display: block;
  width: var(--agora-glyph-size);
  height: var(--agora-glyph-size);
}

/**
 * THE STATUTORY BAR - the four obligations every public body publishes, laid
 * across the foot of the band on one line rather than stacked in a column.
 *
 * IT IS A POSITION THAT MEANS SOMETHING, WHICH IS WHY IT IS WORTH THE RULES.
 * The accessibility statement, the legal notice, the privacy notice and the
 * cookie notice are not four more content links: they are site-wide statutory
 * obligations, and every institutional site signals that by putting them at the
 * very bottom, horizontally, apart from the subject columns. Rendered as a
 * fifth column - which is what an unstyled sixth footer menu becomes - they
 * read as one more topic, in the first track, with two thirds of the band empty
 * beside them. That is what this replaces.
 *
 * WHAT DECIDES THAT THIS MENU IS THE BAR IS NOT IN THIS FILE, and it must not
 * arrive here. A machine name appears exactly once in this theme, on the
 * detector function in the theme file, which argues the exception and bounds
 * it. This stylesheet keys on a class, the same way it keys on the social
 * row's, and it would go on working unchanged if that detector were replaced
 * by a region test tomorrow.
 *
 * IT SPANS THE GRID BY THE SOCIAL ROW'S MEANS AND FOR ITS REASON. The footer
 * columns are `auto-fit` with no count anywhere, so the bar cannot be told
 * which track to start in; it is told to take every track there is. `:has()`
 * on the <nav> rather than a class on it, because the <nav> is core's block
 * wrapper and the only thing this theme controls inside it is the list.
 *
 * ITS OWN LINE, ABOVE THE COLOPHON, AND NOT SHARING ONE WITH IT. Sharing was
 * the tempting option - it would have filled the dead space to the right of
 * the credit in one move - and it was rejected on meaning rather than on
 * layout: `Powered by Drupal` is an attribution this theme volunteers, and the
 * four links beside it are obligations a public body is compelled to publish.
 * A reader who meets them on one line meets them as one kind of thing. They
 * are stacked instead, and share ONE rule, so the band closes with a single
 * separator and then the bottom matter under it.
 *
 * THE RULE MOVES TO THIS BAR AND THE COLOPHON GIVES IT UP - see the rule after
 * next, which is conditional on the bar existing. Two hairlines a step apart
 * would have drawn a box around the credit.
 */
.agora-page__footer .agora-region--footer > nav:has(> .agora-footer-menu--legal) {
  grid-column: 1 / -1;
  margin-block-start: var(--agora-space-s);
  padding-block-start: var(--agora-space-m);
  border-block-start: var(--agora-border-width) solid var(--agora-color-text-inverse-muted);
}

/**
 * THE HEADING SERVES THE ACCESSIBILITY TREE ONLY, and hiding it is the one
 * change here that could have broken something in another repository.
 *
 * A visible "Legal and accessibility" heading over a horizontal strip is the
 * fifth column reappearing as a label. But the heading is also what NAMES this
 * navigation landmark: core's block template emits it with an id and points
 * the <nav> at it with `aria-labelledby`, so deleting it would leave a nameless
 * landmark among five named ones, and `display: none` would take it out of the
 * accessibility tree with the same result.
 *
 * Core's own visually-hidden technique, the same one the register cards use:
 * the element keeps its box in the accessibility tree and loses it on screen.
 * The site template's ValidationTest asserts this heading's TEXT, and it runs
 * without CSS, so it reads the same string before and after this rule. Verified
 * against the rendered page rather than reasoned about: six navigation
 * landmarks, six headings, six distinct `aria-labelledby` targets, unchanged.
 */
.agora-page__footer .agora-region--footer > nav:has(> .agora-footer-menu--legal) > h2 {
  position: absolute;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}

/**
 * The links themselves: a row that WRAPS rather than one that overflows.
 *
 * `flex-wrap: wrap` is the whole of the narrow-viewport story - there is no
 * breakpoint here and no horizontal scrolling at any width, which is SC 1.4.10
 * and was measured at 390 rather than assumed. The row gap is what keeps two
 * wrapped lines of links from reading as one paragraph.
 *
 * NO SEPARATOR CHARACTER BETWEEN THE LINKS, and the omission is deliberate. A
 * middle dot drawn with `content` is announced by some screen readers, so a
 * reader would hear the punctuation between every pair of obligations. The
 * space does the separating, which is what space is for.
 */
.agora-page__footer .agora-region--footer > * > .agora-footer-menu--legal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--agora-space-2xs) var(--agora-space-m);
  align-items: center;
}

/**
 * THE COLOPHON GIVES UP ITS RULE WHEN THE BAR IS DRAWING ONE, and it takes it
 * straight back when the bar is absent.
 *
 * This is the graceful degradation the whole mechanism rests on, expressed in
 * CSS rather than promised in a comment: the selector is conditional on a bar
 * being in the region, so a site with no statutory menu never matches it and
 * gets the colophon exactly as it is today - its own rule, its own spacing,
 * byte for byte. Falsified by renaming the menu on a running site and watching
 * the rule come back.
 */
.agora-page__footer .agora-region--footer:has(.agora-footer-menu--legal) #block-agora-theme-powered-by {
  margin-block-start: 0;
  padding-block-start: var(--agora-space-2xs);
  border-block-start: 0;
}

/**
 * THE COLOPHON AND THE SOCIAL ROW SHARE THE LAST LINE - the credit at the inline
 * start, the network marks at the inline end.
 *
 * WHAT IT IS FOR. Measured on the rendered band: the colophon spans the full
 * content column and its ink stops at 273 of 1296, leaving 1023px of empty navy
 * to its right, and the social row above it spends a whole grid row on four
 * 44px squares. Putting the two on one line fills the emptiest row in the footer
 * with the block that was wasting a row of its own, and takes the band from
 * 565px to 467px at 1440 and from 725px to 627px at 1024. Both figures are from
 * a render, not an estimate.
 *
 * TWO OPTIONAL EXTRAS MAY SHARE A LINE; AN OBLIGATION AND A CREDIT MAY NOT.
 * The statutory bar was deliberately NOT put on this line - see its own rules
 * above - because a notice a public body is compelled to publish and an
 * attribution this theme volunteers would then read as one kind of thing. Two
 * things a site could equally well drop are a different case, and they are the
 * two that are here.
 *
 * ⚠️ THE GUARD IS THE WHOLE OF THE SAFETY, AND IT IS A STATEMENT ABOUT DOM
 * ORDER. Both rules below require the colophon to have the social row as a LATER
 * SIBLING - `:has(~ nav > ...)`. That is not decoration and it is not
 * defensiveness about markup: it is the ONLY thing that keeps the visual order
 * equal to the reading order. If the social row came first in the document and
 * were drawn on the right of a line whose left-hand item comes later, a keyboard
 * user's focus would jump forward past the statutory bar, back up to it, and
 * down again - a 80px backward jump, measured on a build that used `order` to
 * force this layout. `order` is exactly how that defect is normally introduced,
 * so it appears nowhere here. When the document order is wrong the selectors
 * match nothing and the footer renders as it did before, which is a correct
 * footer rather than a broken one.
 *
 * ⚠️ SO THIS DRAWS NOTHING UNTIL THE SITE PLACES THE SOCIAL BLOCK AFTER THE
 * COLOPHON, AND THAT IS SAID OUT LOUD RATHER THAN LEFT TO BE DISCOVERED. This
 * theme ships its colophon at weight 10; the site template ships its social menu
 * at weight 5, so today the social row comes FIRST and none of this applies.
 * Any weight above the colophon's turns it on, and it was proved that way -
 * the rig was set to 12 and the band measured 467px with no backward jump
 * anywhere in the footer. Nothing here needs the theme's own placement changed.
 *
 * THE LAST TWO TRACKS, NOT A COLUMN COUNT. `-3 / -1` and `1 / -3` are counted
 * from the END of whatever track list `auto-fit` produced, so nothing here says
 * how many columns the footer has - the same discipline every other rule in this
 * region keeps. Below 60rem the grid is one track wide and there is no line to
 * share, so the whole block is inside the media query and the two stack exactly
 * as they do today, heading and all.
 */
@media (min-width: 60rem) {
  .agora-page__footer .agora-region--footer > #block-agora-theme-powered-by:has(~ nav > .agora-footer-menu--social) {
    grid-column: 1 / -3;
    align-self: center;
  }

  .agora-page__footer .agora-region--footer > #block-agora-theme-powered-by:has(~ nav > .agora-footer-menu--social) ~ nav:has(> .agora-footer-menu--social) {
    grid-column: -3 / -1;
    align-self: center;
  }

  .agora-page__footer .agora-region--footer > #block-agora-theme-powered-by:has(~ nav > .agora-footer-menu--social) ~ nav > .agora-footer-menu--social {
    justify-content: flex-end;
  }

  /**
   * The heading goes the way the statutory bar's went, and for the same reason
   * and with the same technique: on a colophon line a visible "Follow us" is the
   * row's old heading turned into a label, but the heading is what names this
   * navigation landmark through `aria-labelledby`, so it is hidden on screen and
   * kept everywhere else. The site template's ValidationTest asserts this text
   * and runs without CSS. Verified on the rendered page: six landmarks, six
   * headings, the text unchanged.
   */
  .agora-page__footer .agora-region--footer > #block-agora-theme-powered-by:has(~ nav > .agora-footer-menu--social) ~ nav:has(> .agora-footer-menu--social) > h2 {
    position: absolute;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px;
    height: 1px;
    word-wrap: normal;
  }
}

/**
 * THE COLOPHON COLUMN - the name and one line saying what this is. NOT the
 * mark: the footer's own branding placement in config/optional switches the
 * logo off, so no `<img>` reaches this column at all. That is deliberate, and
 * it is written down because the sentence that stood here said "the mark, the
 * name and one line" - describing three things while two shipped. The mark is
 * a file a site owner uploads through Appearance and it is drawn navy for the
 * page surface; on the inverse footer it would be navy on navy.
 *
 * ⚠️ THIS RULE USED TO CARRY THE COLUMN AND THE ARGUMENT FOR IT. Both moved to
 * the component itself, which is now a stack everywhere, so all that is left
 * here is the footer's own wider gap. The rest is deleted rather than kept as
 * dead declarations that repeat what they inherit.
 *
 * AND THE ARGUMENT IT CARRIED WAS WRONG, WHICH IS WHY THE CORRECTION IS WRITTEN
 * DOWN INSTEAD OF THE COMMENT SIMPLY DISAPPEARING. It said that in a row,
 * aligning the name and the line beside it on their baselines "is what stops
 * them looking dropped". Measured in the banner, baseline is what MADE the
 * slogan look dropped - 28px below the top of the name, because the two are
 * three steps apart on the size scale. The claim was plausible, it was never
 * measured, and it stood for as long as nobody looked at the header. See
 * `.agora-branding`.
 */
.agora-page__footer .agora-branding {
  gap: var(--agora-space-xs);
}

/**
 * THE ONE LINE. It is the site's own slogan, which is a field a site owner
 * fills in rather than a string this theme invents, and it is already switched
 * on in the placement. On the inverse surface it takes the muted inverse tone,
 * which is set higher up in this file; what is set here is the measure, because
 * `--agora-measure` is 68ch and a footer column is nothing like 68 characters
 * wide - left uncapped the cap simply never applies, which is harmless, but
 * stating the column's own measure documents that this line is meant to be ONE
 * line and not a paragraph.
 */
/*
 * AND THE BANNER'S INDENT IS TAKEN BACK HERE, which is the one thing the two
 * placements genuinely disagree about. In the banner the slogan is indented to
 * start under the name, because there is a whole row of space to the right of
 * the mark and the two lines sharing a left edge is what makes them read as one
 * block. This column is 14rem; the same indent would eat a quarter of it and
 * leave the line to wrap. Here the slogan aligns with the MARK instead, which
 * is the column's own left edge.
 */
.agora-page__footer .agora-branding__slogan {
  max-width: 28ch;
  padding-inline-start: 0;
}

/**
 * THE CLOSING LINE, BENEATH THE COLUMNS RATHER THAN BESIDE THEM.
 *
 * `Powered by Drupal` is a placement this theme ships and it is not a column of
 * links: given a grid track of its own it became a fourth column holding one
 * sentence, which is what the footer looked like before this rule and is the
 * single thing that made the band read as unfinished. `grid-column: 1 / -1`
 * takes it out of the column rhythm and puts it under the whole grid, where a
 * colophon line belongs.
 *
 * THE ID IS THIS THEME'S OWN, exactly as the hero band's is: core builds the
 * element id from the machine name of the block placement, and that placement
 * is one this repository ships in config/optional. The hook is owned here
 * rather than borrowed from markup somebody else controls. A site that removes
 * the placement loses the rule with it and loses nothing else - the grid has no
 * opinion about how many items it holds.
 *
 * THE HAIRLINE IS THE MUTED INVERSE TONE, which is a DECLARED combination
 * against this band rather than a value chosen by eye. It is declared there as
 * text at 4.5:1, so as a rule it is far past the 3:1 a separator would need;
 * the point of using it is that no new token and no new pair were required to
 * draw a line here.
 */
.agora-page__footer #block-agora-theme-powered-by {
  grid-column: 1 / -1;
  margin-block-start: var(--agora-space-s);
  padding-block-start: var(--agora-space-m);
  color: var(--agora-color-text-inverse-muted);
  border-block-start: var(--agora-border-width) solid var(--agora-color-text-inverse-muted);
  font-size: var(--agora-font-size-sm);
}

/* -------------------------------------------------------------------------- */
/* THE CONTRACT: what the SITE TEMPLATE opts in to, and what it gets           */
/* -------------------------------------------------------------------------- */

/**
 * HOW THIS SECTION WORKS, because it is the seam between two repositories.
 *
 * Everything below styles markup this theme does not emit. A Views display, or
 * a block, opts in by carrying one of the class names in this section -
 * `css_class` on a Views display, or the class field on a block - and the theme
 * responds. The theme never names a view, a route or a block by its machine
 * name, so a site that renames one keeps its design.
 *
 * THE COUPLING RUNS ONE WAY ON PURPOSE. The template opts in; the theme
 * responds. That is what makes it safe for the two repositories to release
 * independently: a class nobody has used yet costs a few hundred bytes of CSS,
 * and a class the theme has not styled yet renders as unstyled output rather
 * than as an error.
 *
 * EVERY SELECTOR HERE KEYS ON VIEWS' OWN MARKUP - `.views-row`,
 * `.views-field`, `.views-label`, `.field-content` - and on nothing else. No
 * rule below counts rows, fields or columns, so a display that grows a field or
 * loses one keeps working.
 */

/**
 * `agora-band--split` - a band carrying two components side by side.
 *
 * ⚠️ PROVISIONAL, AND IT MAY NOT BE REACHABLE. It expects a class on the
 * SECTION wrapper, and whether the page builder can put a class on a section
 * has not been verified here. If it cannot, do not work around it: the two
 * components stack in source order and each is designed to look right at full
 * width, which is the fallback this rule degrades to at narrow viewports
 * anyway. Stacked is a worse composition, not a broken one.
 *
 * The 22rem floor is what a list of records needs before its columns start
 * crushing; below it the pair stacks with no breakpoint written.
 *
 * ⚠️ SUPERSEDED AND UNREACHED. The front page pairs its components without
 * this rule and without a class on any section wrapper: see "TWO COMPONENTS ON
 * ONE ROW" further up this file, which keys on the component classes and on
 * adjacency instead. This block is kept because the paragraph above it is still
 * the right analysis of the fallback - stacked is a worse composition and not a
 * broken one - and because a display may still opt into the class. Nothing does
 * today.
 */
.agora-band--split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
  align-items: start;
  gap: var(--agora-space-l) var(--agora-space-xl);
}

/**
 * `agora-quick-access` - the registers as a grid of cards.
 *
 * EXPECTS: an unformatted list. One `.views-row` per destination, each holding
 * a link, and optionally one more field of description text.
 *
 * The grid is the register cards' grid with a smaller floor, because these
 * cards carry a label and a line rather than a label and a number.
 */
.agora-quick-access {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: var(--agora-space-m);
}

/**
 * A card carries its own ground and its own edge, by the register cards'
 * precedent and for their reason: the front page's sections alternate surfaces,
 * and a panel that borrowed its ground would vanish on the band that matches
 * it. Both pairs are declared against both surfaces a card can sit on.
 */
.agora-quick-access .views-row {
  padding: var(--agora-space-m);
  border: var(--agora-border-width) solid var(--agora-color-border);
  border-radius: var(--agora-radius);
  background-color: var(--agora-color-surface);
}

/**
 * THE WHOLE CARD IS NOT A LINK AND MUST NOT BECOME ONE. Wrapping a card in an
 * anchor puts every word inside it into the link's accessible name, so a screen
 * reader reads the label and the description as one long link title. The link
 * is the label; the card is a box around it. If the card has to be clickable
 * anywhere, that is a job for a stretched pseudo-element on the link, not for a
 * wrapper - and it needs a text-selection story first, which this theme does
 * not have without script.
 */
.agora-quick-access .views-row a {
  text-decoration: none;
  font-size: var(--agora-font-size-md);
  font-weight: var(--agora-font-weight-bold);
}

.agora-quick-access .views-row a:hover {
  text-decoration: underline;
}

.agora-quick-access .views-field + .views-field {
  margin-block-start: var(--agora-space-2xs);
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-sm);
}

/**
 * `agora-activity-list` - what was published recently.
 *
 * EXPECTS: an unformatted list. One `.views-row` per record, holding a title
 * link and any number of small fields beside it - a type, a date, an area.
 *
 * A LIST AND NOT A TABLE, deliberately. A table earns its markup when a reader
 * compares values down a column; a recent-activity list is read top to bottom,
 * one row at a time, and a two-column table of five rows on a phone is the
 * horizontal scroller nobody wanted.
 */
.agora-activity-list .views-row {
  padding-block: var(--agora-space-s);
  border-block-start: var(--agora-border-width) solid var(--agora-color-border);
}

.agora-activity-list .views-row:first-child {
  padding-block-start: 0;
  border-block-start: 0;
}

.agora-activity-list .views-field:first-child a {
  font-weight: var(--agora-font-weight-bold);
}

/**
 * The supporting fields run along one line under the title, separated by space
 * rather than by a bullet or a pipe: a punctuation character between two fields
 * is read out by a screen reader, and "Contract vertical bar 30 October" is not
 * what anybody meant.
 */
.agora-activity-list .views-field:not(:first-child) {
  display: inline-block;
  margin-block-start: var(--agora-space-3xs);
  margin-inline-end: var(--agora-space-s);
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-sm);
}

/**
 * `agora-recent-activity` - what this council published most recently.
 *
 * EXPECTS: an unformatted list with a more-link. One `.views-row` per record,
 * holding `.views-field-type` as bare text, `.views-field-title` around a link,
 * and `.views-field-created` carrying a visible label and a `<time>`.
 *
 * IT IS THE `agora-activity-list` CONTRACT ABOVE UNDER THE NAME THE OTHER
 * REPOSITORY ACTUALLY USES. That block is left where it is rather than deleted:
 * it is still a true statement about any display that opts into that class, and
 * it is the reason this one is written as a variation rather than from nothing.
 * Nothing in the site template opts into it today.
 *
 * A LIST AND NOT A TABLE, for the reason argued above it, with one added: this
 * is the component that takes ONE THIRD of a row, so at 1440 it is 372px wide,
 * and a two-column table that narrow is the horizontal scroller nobody wanted.
 *
 * THE HAIRLINE RUNS BETWEEN THE ROWS AND NOT AROUND THEM. These are three
 * documents in date order, not three destinations; a card each would give them
 * the weight of the register grid and say something untrue about what they are.
 */
.agora-recent-activity .views-row {
  padding-block: var(--agora-space-s);
  border-block-start: var(--agora-border-width) solid var(--agora-color-border);
}

.agora-recent-activity .views-row:first-child {
  padding-block-start: 0;
  border-block-start: 0;
}

/**
 * The kind of record, as a line over the title. It is set in the table header's
 * idiom - muted, one step down, faintly letter-spaced - so a reader coming off
 * a register recognises it as the same word they filtered by. The display gives
 * this field no label, so there is nothing here to separate.
 */
.agora-recent-activity .views-field-type {
  letter-spacing: 0.02em;
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-sm);
}

/**
 * The title keeps its underline, unlike the register cards' names. Those are
 * section entry points a reader passes through on every visit; these are
 * DOCUMENTS - the same links the register tables draw underlined two sections
 * further down - and the visited state means something for a document in a way
 * it does not for a section.
 */
.agora-recent-activity .views-field-title {
  margin-block-start: var(--agora-space-3xs);
  font-weight: var(--agora-font-weight-bold);
  line-height: var(--agora-line-height-heading);
}

/**
 * ⚠️ THE LINE THIS RULE EXISTS FOR RENDERED AS `Published` RUN STRAIGHT INTO
 * `16 Apr 2025`, WITH NO SPACE AT ALL, AND THE CAUSE IS WORTH WRITING DOWN
 * BECAUSE IT IS NOT A TYPO ANYBODY CAN FIND BY READING THE MARKUP.
 *
 * Views emits a labelled field as two adjacent inline spans and puts NOTHING
 * between them. Its only separator is the colon it appends when a field sets
 * `element_label_colon`, which is an option in the VIEW's configuration and so
 * the site template's to set - core assigns `label_suffix` in exactly one
 * place, ViewsThemeHooks, and assigns it nothing otherwise. The markup has no
 * opinion. Every other labelled figure in this theme reads correctly only
 * because a rule further up this file has already made its own label a block.
 *
 * This component had NO rule at all, which is why it was the one place the
 * default showed. Laying it out is the fix: `display: flex` makes both children
 * block-level boxes, so the label and the date are two boxes with a real gap -
 * separated in the accessibility tree as well as on the page, which generated
 * content would not have been. Nothing here injects a character and nothing
 * here should. `content: " "` would be a workaround for a layout that was
 * simply missing.
 *
 * A COLON IS STILL THE TEMPLATE'S TO ADD if it wants one AS TEXT. It is one
 * line in views.view.agora_base_publications, on the `created` field of the
 * recent-activity display. This theme neither needs it nor assumes it.
 */
.agora-recent-activity .views-field-created {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--agora-space-3xs);
  margin-block-start: var(--agora-space-3xs);
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-sm);
}

/**
 * The more-link closes the list the way a row opens it, on the hairline, so the
 * last record is not left hanging off the foot of the component.
 */
.agora-recent-activity .more-link {
  margin-block-start: var(--agora-space-s);
  padding-block-start: var(--agora-space-s);
  border-block-start: var(--agora-border-width) solid var(--agora-color-border);
  font-size: var(--agora-font-size-sm);
}

/**
 * `agora-area-cards` - a service area and how much it publishes.
 *
 * EXPECTS: an unformatted list with a more-link. One `.views-row` per area,
 * holding a link and a labelled count.
 *
 * ⚠️ REBUILT TO RHYME WITH THE QUICK-ACCESS CARDS AND TO SURVIVE A NARROW
 * COLUMN, and the second half is what changed the design rather than only the
 * detailing. This component is the PARTNER in a pair, so at 1440 it is 372px
 * wide and its own grid resolves to a SINGLE column of six. Six cards each
 * stacking a name over a label over a large numeral came to roughly twice the
 * height of the table beside them. So a card is now a ROW: the name at the
 * inline start, the count at the inline end, and the name wrapping INSIDE its
 * own box when the track is narrow.
 *
 * ⚠️ IT DOES NOT WRAP, AND THE FIRST ATTEMPT DID. Flex decides where to break
 * a line from the items' max-content sizes, before any shrinking - so
 * `min-width: 0` does not stop a break, and the three cards whose area name is
 * long broke while the three whose name is short did not. One grid, two card
 * shapes, and the difference was the length of a word. A row that never breaks
 * plus a name that may shrink gives one shape at every width.
 *
 * THE GRID FLOOR ROSE FROM 15rem TO 20rem IN THE SAME BREATH, and it has to:
 * a row card needs room for a name AND a count, where a stacked card needed
 * room for the wider of the two. At 20rem the full-width grid gives two tracks
 * at 768 and three at 1440 instead of three and four, and the rail still
 * resolves to one - which is the case this component was rebuilt for.
 *
 * THE PADDING, THE EDGE AND THE HOVER ARE THE QUICK-ACCESS CARD'S, taken
 * deliberately rather than by coincidence: the two grids sit on the same page,
 * and a reader should not have to work out whether they are the same kind of
 * thing. What is NOT taken is the drawing - these cards carry a number, and a
 * mark beside a number is decoration competing with data.
 *
 * ⚠️ THE GRID CLOSES ITSELF WITH A MARGIN NOW, AND UNTIL NOW IT DID NOT. It
 * was written for a front-page band, and the band's own padding is what opened
 * the space under its last row, so this rule never needed a margin of its own.
 * The site template then moved the component onto the full register (T-1310),
 * as a block placed in the content region directly above the block that holds
 * the register. There is no band there. The last row of cards sat on the
 * exposed filter panel with nothing between the two edges - found by eye on
 * the running site, then measured there at 0px, at a 1280 viewport and at 390
 * alike.
 *
 * THE MARGIN IS THE ONE EVERY OTHER COMPONENT IN THIS FILE ALREADY CLOSES WITH.
 * The register cards, the filter panel, the table scroller, the quick-access
 * list and the CSV note each end in --agora-space-l, and that is the step the
 * rest of the page puts between one component and the next. Measured the same
 * day on the front page, the institution page and all eight registers, every
 * other junction between one component and the next read 36px or more; this
 * one now reads 36px as well. A rule spacing the region's blocks from each
 * other would have moved every page to fix one of them. The defect was one
 * component missing the line its siblings all carry.
 */
.agora-area-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
  gap: var(--agora-space-s);
  margin-block-end: var(--agora-space-l);
}

/**
 * Inside a front-page band the band's own padding closes the grid, so the grid
 * gives its margin back there - otherwise the same gap is charged twice, which
 * is the quick-access list's argument and the reason its rule has this shape.
 * The selector is the band rule's own, so the margin comes off exactly where
 * that padding goes on and nowhere else. A block placed ABOVE the main content
 * block, which is how the register page places this one, is inside no band and
 * keeps its margin, on the front page as much as anywhere.
 */
.agora-page--front #block-agora-theme-content > div:has(.agora-area-cards) .agora-area-cards {
  margin-block-end: 0;
}

/**
 * ⚠️ THE MORE-LINK WAS A GRID ITEM AND LANDED IN THE NEXT FREE CELL, beside
 * the last two cards, reading as a seventh area that had lost its border. Views
 * puts it inside the same container it puts the rows in, so a grid declared on
 * that container catches it. It spans the row instead. Seen at 1440 in a
 * render, and invisible at every width where the cards happen to fill their
 * last row - which is why it survived this long.
 */
.agora-area-cards .more-link {
  grid-column: 1 / -1;
  font-size: var(--agora-font-size-sm);
}

/**
 * The card.
 *
 * `position: relative` is the containing block for the stretched link below.
 * `justify-content: space-between` rather than an auto margin on the count: the
 * two are equivalent while the row holds two items, and space-between is the
 * one that keeps behaving if the display ever exposes a third field.
 */
.agora-area-cards .views-row {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--agora-space-s);
  min-height: var(--agora-target-size);
  padding: var(--agora-space-s);
  border: var(--agora-border-width) solid var(--agora-color-border);
  border-radius: var(--agora-radius);
  background-color: var(--agora-color-surface);
}

.agora-area-cards .views-row:hover {
  border-color: var(--agora-color-border-strong);
  background-color: var(--agora-color-surface-subtle);
}

/**
 * The area's name. `flex: 0 1 auto` and NOT `1 1 auto`: a name that grew would
 * eat the free space that space-between needs in order to have anywhere to push
 * the count to.
 */
.agora-area-cards .views-field-field-agora-base-area {
  flex: 0 1 auto;
  min-width: 0;
}

/**
 * The name is the card's link and the whole card is its target.
 *
 * THE STRETCH IS A PSEUDO-ELEMENT OVER THE CARD, NEVER A WRAPPING ANCHOR - the
 * register cards' technique and their argument, which applies here with one
 * more reason of its own. An anchor around this card would take the COUNT into
 * the link's accessible name, and a screen reader would announce the link as
 * "Finance and Budget Records published 17". The ::after is the real link's own
 * box stretched to the card's edges: the pointer target becomes the card while
 * the accessible name stays exactly the area's name.
 *
 * THIS CARD HAD THE SAME HOLE THE QUICK-ACCESS CARDS HAD, and it is written up
 * here as well as there because the two were found separately and only one of
 * them was reported. The rule set the weight, the line height and the
 * underline and said nothing about colour, so the base layer's visited rule
 * reached it and an area a reader had opened once came back tinted for the rest
 * of the session. Six service areas in a grid go over one at a time, which is
 * worse than all of them going over at once: the grid ends up in two colours
 * with nothing to say about the difference.
 *
 * THE THIRD GRID IN THIS FILE, .agora-register-cards, DID NOT HAVE IT. It
 * already declares --agora-color-link on its own selector, which weighs three
 * classes and an element and therefore outranks the base layer's rule without
 * needing to restate the visited state at all. That is why the fix here is one
 * declaration rather than a second selector: this rule weighs two classes and
 * an element, so it wins on its own too. The quick-access card needed the extra
 * selector because its own weighs ONE class and nothing.
 */
.agora-area-cards .views-row a {
  text-decoration: none;
  color: var(--agora-color-link);
  font-weight: var(--agora-font-weight-bold);
  line-height: var(--agora-line-height-heading);
}

.agora-area-cards .views-row a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.agora-area-cards .views-row a:hover,
.agora-area-cards .views-row a:focus-visible {
  text-decoration: underline;
  color: var(--agora-color-link-hover);
}

/**
 * The count sits at the inline end of the card and ENDS there, which is what
 * `text-align: end` buys and it is arithmetic rather than tidiness: these are
 * tabular numerals, so a right-aligned column of them lines its units digits up
 * down the whole rail, and a left-aligned one lines up the TENS of a
 * double-digit count with the units of a single-digit one. The register cards
 * align theirs to the start, correctly - there the numeral sits under a name
 * rather than beside one, and there is no column for it to join.
 */
.agora-area-cards .views-field-nid {
  flex: 0 0 auto;
  text-align: end;
}

/**
 * THE LABEL STAYS VISIBLE, by the register cards' reason: a large bare number
 * that only a screen reader can name is the usual accessibility failure turned
 * inside out, not fixed. `display: block` is also what keeps it off the numeral
 * it names - Views puts no separator between a label and its value, and the
 * note on the recent-activity date above is the long version of that.
 */
.agora-area-cards .views-label {
  display: block;
  letter-spacing: 0.02em;
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-sm);
}

/**
 * Tabular lining figures, the register cards' treatment restated for the
 * register cards' reason: the rule that pins them in css/typography.css is set
 * on `table`, and this count sits in a span.
 */
.agora-area-cards .views-field-nid .field-content {
  display: block;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--agora-color-text);
  font-size: var(--agora-font-size-xl);
  font-weight: var(--agora-font-weight-bold);
  line-height: var(--agora-line-height-heading);
}

/**
 * `agora-callout` - a statement block, on the panel surface.
 *
 * EXPECTS: a block of prose, optionally with a link at the end of it. The
 * accent rule at the inline start is the same 4px band that closes the banner
 * and opens the footer, so the brand arrives here as the thing it already is in
 * this theme rather than as a new gesture.
 *
 * ⚠️ THE ACCENT RULE IS GONE FROM HERE TOO, AND THIS ONE WAS NOT ASKED FOR BY
 * NAME. [andres] objected on 2026-09-05 to the coloured inline-start bar on the
 * exposed filter panel and on the key figures; this block is the third instance
 * of the identical declaration, and the paragraph above is what convicts it -
 * it says in as many words that this bar is the same 4px band as those. Leaving
 * it would have meant the theme kept exactly one copy of a gesture it had just
 * decided reads as generated decoration, waiting to reappear the first time
 * anything used this class.
 *
 * ⚠️ AND NOTHING USES THIS CLASS TODAY. Grepped across every template, the theme
 * file, PHP, YAML and JavaScript in this repository: `agora-callout` appears in
 * this stylesheet and nowhere else, so this rule currently renders on no page.
 * That makes the change unobservable rather than unimportant - it is the reason
 * this block gets the same edge as the exposed filter panel rather than a
 * carefully judged one, and the reason nobody should read a rendered screenshot
 * as evidence about it. Whoever first emits this class should look at it.
 *
 * WHAT IT IS NOW: a contained panel on the subtle surface, with the neutral
 * hairline and the radius the exposed filter panel and the register cards both
 * carry. A statement block that is quiet is still a statement block; the fill
 * against the page is what separates it, and the edge is what stops it floating.
 */
.agora-callout {
  padding: var(--agora-space-l);
  border: var(--agora-border-width) solid var(--agora-color-border);
  border-radius: var(--agora-radius);
  background-color: var(--agora-color-surface-subtle);
}

.agora-callout > :last-child {
  margin-block-end: 0;
}

/**
 * `agora-newsletter` - the sign-up block.
 *
 * ⚠️ IT DOES NOT SEND EMAIL, AND THE PAGE SAYS SO. This is demonstration
 * furniture on a demonstration site. The field and the button are drawn as
 * designed - NOT disabled, because a disabled control in a marketplace
 * screenshot reads as a broken feature rather than an honest one - and the
 * block carries one visible line stating that this site does not send email.
 * That line is CONTENT and belongs to whoever places the block; the theme only
 * gives it a class to be styled by. A form that silently does nothing is the
 * one thing this must never be.
 *
 * THERE IS NO JAVASCRIPT HERE AND THERE MUST NOT BE. No validation on keypress,
 * no success message injected after a submit, no request. If sign-up ever
 * becomes real it becomes real on the server, with a route and a page that
 * confirms it.
 */
.agora-newsletter {
  padding: var(--agora-space-l);
  background-color: var(--agora-color-surface-subtle);
}

.agora-newsletter__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--agora-space-2xs);
  margin-block-start: var(--agora-space-s);
}

.agora-newsletter__row input {
  flex: 1 1 12rem;
  min-width: 0;
}

/**
 * The disclosure line.
 *
 * MUTED BUT NOT HIDDEN. It is one step down and in the muted text token, a
 * declared pair on both surfaces this block can sit on, because it is a note
 * about the control above it rather than a warning. It is not `visually-hidden`
 * and must never become so: the whole point is that a sighted reader sees it
 * before typing an address into a field that goes nowhere.
 */
.agora-newsletter__note {
  margin-block: var(--agora-space-2xs) 0;
  color: var(--agora-color-text-muted);
  font-size: var(--agora-font-size-sm);
}

/**
 * `agora-quick-access` - the front page's row of register cards.
 *
 * EXPECTS: the menu whose id is `agora-base-quick-access`, rendered through
 * templates/menu--agora-base-quick-access.html.twig. One `<li>` per link, each
 * holding one anchor, each anchor holding a decorative drawing and a label.
 * The heading above the row is the block's own label and is not styled here.
 *
 * THE WHOLE CARD IS THE LINK, and that is an accessibility decision before it
 * is a visual one. The alternative - a card that is a box with a link inside
 * it - gives a pointer user a large target and a keyboard user a small one,
 * and it invites the JavaScript that makes the rest of the box respond to a
 * pointer, which is a click handler on a non-interactive element and a target
 * no screen reader can find. Here the anchor IS the box: one tab stop, one
 * accessible name, one focus ring around the thing that was focused, and no
 * script. WCAG 2.2 SC 2.5.8 asks 24 by 24 CSS pixels of a target and this
 * clears it by a wide margin, but the floor is written down anyway so that a
 * later change to the padding cannot quietly go under it.
 *
 * `auto-fill` RATHER THAN `auto-fit`, the same choice the other card grids in
 * this file make and the opposite of the one the footer columns make. A grid
 * of six cards and a grid of four should draw the SAME card, so the empty
 * tracks are kept rather than collapsed; a footer is a set of columns that
 * should share the width they have, so there they are collapsed. The
 * distinction is argued at length in css/layout.css.
 *
 * NOTHING HERE SAYS SIX AND THERE IS NO BREAKPOINT. The 11rem floor is what
 * decides how many fit, and it was chosen by arithmetic against this theme's
 * own container rather than by eye: the content column is 75rem less its
 * inline padding, so 72rem, and six 11rem tracks with five 1rem gaps need
 * 71rem and fit. At 768 the same rule yields three tracks and the six links
 * become two rows of three; at 390 the `min()` lets a track yield to the
 * container and they stack. A council that adds a seventh link gets a second
 * row rather than seven crushed cards.
 *
 * ONLY DECLARED PAIRS ARE COMBINED. The card sits on the page surface and
 * turns to --agora-color-surface-sunken under the pointer, and the label, the
 * rule around it and the drawing inside it are checked against BOTH: the link
 * tokens at 4.5:1 for the words, the border token at 3:1 for the rule, and
 * --agora-color-surface-inverse at 3:1 for the drawing, which is non-text and
 * governed by WCAG 2.2 SC 1.4.11. It measures 14.29:1 on the page surface and
 * 11.65:1 on the sunken one, so the mark has more headroom than it needs and
 * the threshold is not what decides anything here.
 *
 * THE POINTER GROUND USED TO BE --agora-color-surface-subtle AND IT CANNOT BE
 * ANY MORE, which is a consequence of the band below rather than a change of
 * taste. The row now stands on a full-width panel painted in that very token,
 * so a card that turned to it under the pointer would DISSOLVE INTO THE BAND
 * and leave its own border floating - the one hover state that reads as a
 * rendering fault rather than as a response. One step further down the surface
 * scale keeps the lift and keeps every pair declared.
 */
/**
 * THE STRIP IS A BAND, AND IT CONTINUES THE ONE ABOVE IT RATHER THAN FLOATING
 * UNDER IT.
 *
 * WHAT WAS WRONG. The masthead band ends, and the six cards began immediately
 * below it on the page surface, in a block with no ground of its own - a white
 * shelf between a dark band and a tinted one, holding the six most important
 * links on the page. The row read as something that had been added to the page
 * rather than as the bottom of the composition the band starts, and the six
 * links most likely to be wanted looked like the least considered thing on the
 * screen.
 *
 * WHAT IT IS NOW. The same block, on --agora-color-surface-subtle, bled to the
 * viewport by the one rule that paints every front-page band, with the
 * shadow-and-clip method the masthead band uses - which is why the rule below
 * holds only the strip's padding. The two bands meet with no gap because the
 * block is the first child of the main content block and the masthead band is
 * the element immediately before it, so no margin stands between them and none
 * is introduced here: the whole of the block-start padding is INSIDE the tint.
 * A reader coming down the page crosses one edge, from the masthead band into
 * the strip, instead of three.
 *
 * WHY IT IS SELECTED BY `:has()` AND NOT BY AN ID. The block is a `<nav>`,
 * because core wraps a menu block in one, and its element id is built from the
 * placement's own machine name - which for a menu placed on a Canvas page is a
 * UUID belonging to that page's content, not to this theme. A rule keyed on
 * that id would work here and nowhere else. `:has()` asks the only question
 * that is actually stable: does this block contain the quick-access list.
 *
 * `> nav` IS NAMED IN THE BAND LIST FOR THE SAME REASON, and it is worth
 * recording because leaving it out looked like a design decision for three
 * renders. Core wraps a menu block in a `nav` and every other front-page band
 * is a `div`, so a rule written for `div` children never reaches this block:
 * while the bands alternated on `div:nth-child`, the strip matched neither
 * rule and got no section padding and no ground. It was not given the page
 * surface; it was simply never dealt with. The band list names each block by
 * the component it holds, and the element with it.
 *
 * THE BLOCK AFTER IT IS TINTED TOO, AND THE TWO ARE MEANT TO MERGE. On the
 * front page as shipped that block is the summary figures, which stand on the
 * same warm panel because of what they are, and the result is one panel
 * running from the masthead band down through the figures: the strip is the
 * top of the at-a-glance zone rather than a band of its own with a seam under
 * it. The page surface resumes below the figures, so the rhythm below them is
 * unchanged.
 *
 * A BROWSER WITHOUT `:has()` GETS NO BAND AT ALL, which is a finished
 * composition rather than a broken one - one column on one ground, the same
 * degradation the pairing rules in this file are built for, and the reason the
 * band is painted by `:has()` rather than by giving the nav a class it cannot
 * have.
 *
 * ⚠️ THE PADDING IS SMALLER THAN A SECTION'S AT BOTH ENDS AND THAT IS
 * ARITHMETIC, NOT RESTRAINT. A band that continues another one should not open
 * with as much air as a section that starts on its own - the eye has already
 * been let into this zone by the band above. And at the other end the gap is
 * paid for THREE times over unless this rule gives some of it back: this
 * block's own block-end padding, then the section-rhythm padding on the block
 * after it, then the list's own block-end margin. The first render of this band
 * put all three together and opened a 144px hole of flat tint between the cards
 * and the next heading, which reads as a block that failed to load. Both ends
 * take --agora-space-l, the list gives up its margin below, and what is left
 * between the cards and the next heading is 36 plus the section's own 54 - a
 * section break, which is what it is.
 */
.agora-page--front #block-agora-theme-content > nav:has(> .agora-quick-access) {
  padding-block: var(--agora-space-l);
}

/**
 * The list gives up its block-end margin inside the band, for the reason the
 * paragraph above sets out: the band's padding is what opens the space there
 * now, and a margin as well would be the same gap charged twice. The
 * block-start margin stays, because that one separates the list from the
 * heading above it rather than from the next section.
 */
.agora-page--front #block-agora-theme-content > nav:has(> .agora-quick-access) .agora-quick-access {
  margin-block-end: 0;
}

/**
 * The heading the block carries, inside the band.
 *
 * It is the block's own label and the site owns whether it exists at all, so
 * this rule only removes the margin the base layer gives a heading when the
 * band's own padding has already opened the space above it.
 */
.agora-page--front #block-agora-theme-content > nav:has(> .agora-quick-access) > :first-child {
  margin-block-start: 0;
}

.agora-quick-access {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(11rem, 100%), 1fr));
  grid-auto-rows: 1fr;
  gap: var(--agora-space-s);
  margin-block: var(--agora-space-s) var(--agora-space-l);
  padding: 0;
  list-style: none;
}

/**
 * HOW MANY ACROSS, AND WHY THE ANSWER IS A CONTAINER QUERY AND NOT THE
 * `auto-fill` ABOVE ALONE. The auto-fill grid is kept as the layout every
 * browser gets, and it is right at the two ends: six across at the content
 * column's full width, one across on a narrow phone. It is wrong in the
 * middle, and it was measured rather than predicted: at a 1024 viewport the
 * column is 976px, five 11rem tracks fit and the sixth card wrapped alone onto
 * a second row; at 390 the column is 342px, one track fit, and six full-width
 * cards each holding a three-target floor stacked into some 800px of page
 * before a single figure appeared.
 *
 * SO THE COUNT FOLLOWS THE CONTAINER, in the pairing rule's own idiom: the
 * block wrapper is made a container and the grid asks it how wide it is.
 * Under 72rem - the content column's own inner width, so the full column and
 * only the full column keeps auto-fill - the grid is three across, which
 * turns six cards into two even rows from a tablet down to a small laptop.
 * Under 34rem it is two across, and the three-target floor comes off the
 * card: on a 163px track a card is as tall as its own mark and label, the
 * rows are still equalised by `grid-auto-rows`, and six cards take three
 * rows instead of six. A phone narrower than the two tracks' own minimum gets
 * the auto-fill rule's single column back through `min(11rem, 100%)`, because
 * `repeat(2, ...)` on a 15rem column would break "Budgets" across two lines.
 *
 * `minmax(0, 1fr)` AND NOT `1fr`, because a bare `1fr` track's minimum is its
 * content and one long label would widen its track and narrow the others.
 * The range syntax is what core's stylelint configuration asks for, and a
 * browser without container queries ignores both blocks and keeps auto-fill.
 */
nav:has(> .agora-quick-access) {
  container: agora-quick-access / inline-size;
}

@container agora-quick-access (width < 72rem) {
  .agora-quick-access {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container agora-quick-access (width < 34rem) {
  .agora-quick-access {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agora-quick-access__link,
  .agora-quick-access__link:visited {
    min-height: var(--agora-target-size);
  }
}

/**
 * SIX EQUAL CARDS, THE MARK CENTRED ABOVE ITS LABEL. Three declarations carry
 * that and each is named because each covers a case the others do not:
 * `grid-auto-rows: 1fr` on the list makes every ROW the height of the tallest
 * row, so a second row of cards stands as tall as the first; the item's
 * `display: flex` below stretches each anchor to its row, so a one-line label
 * and a two-line one draw the same card WITHIN a row; and the card's own
 * `min-height` - three target sizes, a mark plus two lines plus the padding -
 * is the floor under a row where every label is short, so the cards do not
 * turn squat the moment the copy does. That floor comes off on a narrow
 * container, where the grid is two across; see the container queries after
 * the grid rule for the measurement. The label is centred under the mark
 * rather than beside it because a row of six drawings each carrying a name
 * reads as a row of six things, and a mark tucked at the top-left of a card
 * read as a bullet.
 *
 * `display: flex` on the item, so that the anchor inside it is stretched to the
 * full height of its grid row. Without it a card whose label runs to one line
 * stands shorter than the card beside it whose label runs to two, and the row
 * reads as a set of mismatched boxes rather than as a row.
 *
 * `min-width: 0` is the SC 1.4.10 guard this theme sets on every flex or grid
 * item that holds text: a long unbroken label would otherwise push the track
 * wider than its share and the page would scroll sideways.
 */
.agora-quick-access__item {
  display: flex;
  min-width: 0;
}

/**
 * The card.
 *
 * THE COLOUR OF THE LABEL WAS NOT SET HERE AND THAT WAS A DEFECT. The
 * paragraph this replaces argued that css/base.css already styles an anchor and
 * its visited and hover states in the three link tokens, so restating one of
 * them here would pin the label to a single state and quietly drop the other
 * two. Every sentence of that is true of a link IN A LINE OF PROSE and none of
 * it is true of a card. The card inherited the visited rule, so the moment a
 * reader followed one of these six links its title came back in
 * --agora-color-link-visited and stayed there - a card the reader had opened
 * once was tinted for good, and with six cards in a row the whole strip turned
 * over within a minute of browsing.
 *
 * SO THE CARD TAKES ONE COLOUR ACROSS ITS STATES, which is the register cards'
 * precedent and their argument: these are section entry points a reader passes
 * through on every visit, not documents to be ticked off a list, so a visited
 * hue tells them nothing they wanted to know and costs them the row's evenness.
 * THE ELEMENT-LEVEL RULE IN css/base.css IS UNTOUCHED and stays exactly as it
 * is - in body text, and in the lists of documents this portal exists to
 * publish, knowing which records you have already opened is a real affordance
 * and this theme keeps it.
 *
 * THE SECOND SELECTOR BELOW IS LOAD-BEARING AND IS NOT DECORATION, and the
 * arithmetic is worth writing down because getting it wrong looks like it
 * worked. The base layer's visited rule weighs one class and one element; a
 * bare `.agora-quick-access__link` weighs one class and NOTHING, so the first
 * selector ALONE loses to it and the card would still have come back tinted.
 * Two classes beat one class and one element, which is what the second selector
 * buys. The pointer state is restated below for the same weighing.
 *
 * The underline is removed because a card is not a line of prose, and it is
 * given back under the pointer - so the affordance is never absent, only
 * deferred. The focus ring is the theme's own, from css/typography.css, and
 * nothing here may set `outline: none`.
 */
.agora-quick-access__link,
.agora-quick-access__link:visited {
  display: flex;
  flex-direction: column;
  gap: var(--agora-space-xs);
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: calc(var(--agora-target-size) * 3);
  padding: var(--agora-space-s);
  overflow-wrap: break-word;
  text-align: center;
  text-decoration: none;
  color: var(--agora-color-link);
  border: var(--agora-border-width) solid var(--agora-color-border);
  border-radius: var(--agora-radius);
  background-color: var(--agora-color-surface);
}

.agora-quick-access__link:hover {
  text-decoration: underline;
  color: var(--agora-color-link-hover);
  border-color: var(--agora-color-border-strong);
  background-color: var(--agora-color-surface-sunken);
}

/**
 * The box the drawing sits in.
 *
 * IT USED TO BE THE ONE PLACE THE BRAND ACCENT REACHED THIS COMPONENT, AND THAT
 * BROKE A RULE THIS THEME WROTE DOWN FOR ITSELF. css/tokens.css declares
 * --agora-color-accent for RULES, BARS AND EDGES - it reaches 3.41:1 on the
 * page surface, which clears the non-text threshold of WCAG 2.2 SC 1.4.11 and
 * comes nowhere near the 4.5:1 that body text needs - and the whole reason that
 * sentence is in the token file is that the accent is the one column of the
 * mark standing open. It is a focal detail. SIX MARKS IN A ROW, ONE PER CARD,
 * ARE THE DEFINITION OF A DEFAULT: the accent stopped being the thing the eye
 * goes to and became the colour the strip is painted in, which is exactly the
 * outcome the token file's own prose says it exists to prevent.
 *
 * SO THE MARKS TAKE --agora-color-surface-inverse, the tone of the masthead
 * band, of the contentinfo band and of the mark itself - the institutional one.
 * It measures 14.29:1 on the page surface and 11.65:1 on the ground the card
 * takes under the pointer, both declared. The accent is not gone from this
 * page: it still closes the banner, opens the contentinfo band, rules under the
 * headline and outlines the secondary control in the masthead band, which is
 * four appearances rather than six times two.
 *
 * IT IS SET AS `color` RATHER THAN AS A FILL, because the drawing inside is
 * stroked in `currentColor`. One declaration therefore colours six different
 * marks, and a change of token cannot leave one of them behind.
 *
 * COLOUR IS NOT THE CARRIER HERE AND THE DRAWING IS NOT EITHER. Each mark
 * duplicates the label beside it and is `aria-hidden` in the template; take
 * every one of them away and not a single card becomes ambiguous.
 *
 * ⚠️ THE BOX IS 2.75rem AND IT USED TO BE 2rem, and the reason is the drawing
 * inside it rather than the box. The marks were replaced by a supplied set that
 * carries roughly three times the internal detail - fluted columns, a
 * signature, a badge with ribbon tails, four stacked coins - drawn at a
 * 1-unit stroke on a 24 grid, which is what the sources measure. At 32px that
 * stroke is 1.33 device pixels and the finest gap in the set closes up; at 44px
 * it is 1.83 and the gap is 3.9. The number is --agora-target-size rather than
 * a new length, so the mark on a card stands exactly as tall as every control
 * in this theme, and a later change to the target floor moves both together.
 *
 * `flex: 0 0 auto` so the box keeps its size when the label beside it wraps to
 * three lines, which "Budgets, accounts and plans" does in a narrow track.
 */
.agora-quick-access__icon {
  display: block;
  flex: 0 0 auto;
  width: var(--agora-target-size);
  height: var(--agora-target-size);
  color: var(--agora-color-surface-inverse);
}

/**
 * `display: block` on the drawing itself, because an inline SVG sits on the
 * text baseline and reserves the descender space under it - a few stray pixels
 * that make the gap under the mark differ from the gap above it for no reason
 * a reader could name.
 */
.agora-quick-access__glyph {
  display: block;
  width: 100%;
  height: 100%;
}

/**
 * The label. It is the accessible name of the whole card, so it is the one
 * thing in here that must never be shortened, abbreviated or truncated with an
 * ellipsis: a name a reader cannot read in full is a link they cannot choose
 * between.
 */
.agora-quick-access__title {
  font-weight: var(--agora-font-weight-bold);
  line-height: var(--agora-line-height-heading);
}

/**
 * ---------------------------------------------------------------------------
 * THE SIGN-IN PAGE.
 *
 * WHAT WAS THERE BEFORE, because the size of the change is the argument for it.
 * /user/login rendered core's form dropped straight into the page's 75rem
 * column: a 60-character text input running most of the way across a desktop
 * window with its label butted against the left edge of it on the same line, a
 * second field under that, a button, and eight hundred pixels of empty white
 * below. It is the one screen a council's own staff open every working morning.
 *
 * THE COMPOSITION IS A CARD INSIDE THE ORDINARY PAGE, and every part of that
 * sentence is a decision. A card, so that the form is an object with a size
 * rather than a form the width of a window. Inside the ordinary page, so that
 * the banner, the breadcrumb and the footer band all stay exactly where they
 * are: stripping the navigation is the house style of hosted software and it is
 * backwards for a public body, where a citizen who followed a stale link has to
 * be able to get back to what they were reading. There is a mechanical reason
 * too and it is the stronger one - the accessibility gate counts the primary
 * navigation, the footer menu and the footer's seven social links on EVERY page
 * it scans, and this is one of them, so an auth layout that dropped them would
 * not be a different design but a measurement quietly getting smaller.
 *
 * TWO COLUMNS, AND THEY ARE THE SAME TWO THE MASTHEAD USES. The navy panel
 * carries the site's mark and its one sentence; the light panel carries the
 * heading, the status messages and the form. Inverse surface, cream text, the
 * mark quiet rather than loud, one amber rule - the front page's grammar at the
 * scale of an object rather than a band.
 *
 * NOTHING IS REORDERED AT ANY WIDTH. The panel is first in the markup and first
 * on the page in both states: two columns above the theme's own breakpoint, and
 * stacked in the same order below it. So what a screen reader reads and what
 * the page shows are the same sequence, and there is no tab order to reason
 * about separately from the layout.
 *
 * EVERY RULE BELOW IS SCOPED TO THE SIGN-IN PAGE, INCLUDING THE ONES THAT LOOK
 * LIKE GENERAL FORM FIXES, and that is a boundary rather than an oversight. A
 * form item's label is an inline element everywhere in this theme, which is why
 * the label and the input share a line here, and the same is true of every
 * other front-end form the theme renders. Fixing it everywhere is a real
 * improvement and a real risk in one rule - a checkbox's label must stay beside
 * its box, and templates/form-element.html.twig prints that label AFTER the
 * control - so it is a change with its own testing rather than a side effect of
 * designing this page. What is fixed here is fixed for the two text fields this
 * page has.
 */

/**
 * The card.
 *
 * THE PAGE GUTTER MOVES OUT TO THE MAIN LANDMARK so that this container can
 * become the card itself. The container normally carries both the centring and
 * the inline padding that keeps text off the edge of a phone; the card needs the
 * centring and must NOT have the padding, because its own two panels each pad
 * their own contents and a shared padding would sit inside the border, leaving
 * the navy panel floating in a frame of the page's own surface. Moving the
 * gutter one element out keeps the card off the screen edge at every width.
 *
 * `overflow: clip` AND NOT `hidden`. The panel on the inverse surface fills its
 * column corner to corner, so without clipping its two outer corners would sit
 * square inside the card's rounded ones. `hidden` would do the same clipping
 * and would also make this a scroll container, which changes what
 * `position: sticky` means for anything a site puts inside it; `clip` clips and
 * creates nothing.
 */
/**
 * THE CARD SITS IN THE MIDDLE OF THE PAGE'S OWN HEIGHT, and that is the answer
 * to the empty page rather than a bigger card.
 *
 * MEASURED FIRST: at a 900px viewport the document ran to 1109px with the card
 * at the top of it, so the whole of the leftover space fell in one block
 * between the card and the footer and the footer sat below the fold. The
 * emptiness is a property of the VIEWPORT - a sign-in page has two fields on
 * it and will always be shorter than a screen - so the honest remedy is to
 * stop putting all of it in one place. Centring splits it above and below,
 * which reads as a composition rather than as a page that stopped early.
 *
 * ⚠️ RE-MEASURED, AND THE SENTENCE ABOVE OVERSTATES WHAT THIS DECLARATION DOES
 * ON THE SCREEN MOST PEOPLE HAVE. `align-content` can only distribute space a
 * box actually has spare, and at 1440 x 900 this box has none: the main region
 * is `flex: 1` in a column that is `min-height: 100vh`, but the header is 64
 * tall and the FOOTER IS 467 - so header plus footer plus this region's own
 * content already came to 1151 against a 900px window, and the region sat at
 * its content height with nothing to centre. The centring is real and engages
 * on a tall window; the threshold is simply higher than the paragraph implies,
 * and after this round's change it is a window taller than 1241px rather than
 * 1151. Written down because the honest reading of "the card sits in the middle
 * of the page's own height" is "it does when there is a middle", and the
 * 467px footer is what usually decides there is not.
 *
 * `safe center` IS LOAD-BEARING AND `center` ALONE WOULD BE A BUG. Ordinary
 * centring on an overflowing box pushes the content off BOTH ends, and the top
 * one cannot be scrolled back to - so a short window, or a reader who has
 * raised their font size, would lose the heading with no way to reach it. The
 * `safe` keyword falls back to `start` at exactly that point. The plain value
 * is declared first so an engine that does not understand the keyword still
 * centres rather than ignoring the pair.
 */
.agora-page--signin .agora-page__main {
  display: grid;
  align-content: center;
  align-content: safe center;
  padding-inline: var(--agora-space-m);
}

/**
 * The card.
 *
 * ⚠️ 66rem, AND IT WAS 54rem UNTIL THE PAGE WAS LOOKED AT ON A REAL SCREEN,
 * then 64rem for one round. The extra twelve rem goes ENTIRELY to the navy
 * panel and none of it to the form, which is the part worth arguing. A sign-in
 * form stretched to the width of a window is not a better form: the label, the
 * field and the button stop being one scannable column and the eye has to
 * travel between them. So the fields keep the cap they had, and the card fills
 * more of the page by giving the identity half the room - which is the half
 * that is meant to be looked at.
 *
 * The page's own content column is 75rem, so the card is deliberately narrower
 * than the banner and the footer band above and below it. A card as wide as the
 * page would stop reading as an object on a page and start reading as the page.
 *
 * ⚠️ 66rem WAS RECONSIDERED WHEN THE CARD WAS ASKED TO LOOK BIGGER, AND KEPT ON
 * ARITHMETIC RATHER THAN ON THE PARAGRAPH ABOVE. The tempting move is the side
 * margin: at 1440 there is 384px of page surface beside this card, 192 each
 * side, and it is the largest empty area on the screen. It is also the axis
 * with nothing left to give. The page's content column measures 1152 inside its
 * gutter, so a card widened until it aligned with the banner and the footer
 * would gain 96px - 9.1% - and the round before this one moved the HEIGHT by
 * 8% and was reported back as not visible at all. The same size of change in
 * the other axis is the same invisible change. Height was taken instead, in the
 * two-column query at the foot of this file, where there was room for 17% and
 * for the card still to clear the fold.
 *
 * ⚠️ THERE IS NO `min-height` ANYWHERE IN THIS COMPOSITION, AND THAT IS A
 * DECISION RATHER THAN AN OMISSION. The obvious way to make a card taller is to
 * give it a height, and on this page it is the wrong one: a status message
 * appears above this form on EVERY failed sign-in, so a card pinned to a height
 * would either grow past it or clip it, on the one occasion the page is
 * carrying something urgent. The extra height comes from the card's own rhythm
 * instead - the padding of both panels and the space between the fields - which
 * grows with its content instead of fighting it.
 */
.agora-page--signin .agora-page__main .agora-page__container {
  overflow: clip;
  max-width: 66rem;
  padding-inline: 0;
  border: var(--agora-border-width) solid var(--agora-color-border);
  border-radius: var(--agora-radius);
  background-color: var(--agora-color-surface);
}

/**
 * The light half: the heading, the messages and the form.
 *
 * The region is the container's second child and needs no selector of its own
 * beyond its region class, which templates/region.html.twig exists to provide.
 */
.agora-page--signin .agora-region--content {
  padding: var(--agora-space-l) var(--agora-space-l) var(--agora-space-xl);
}

/**
 * The navy half.
 *
 * IT IS THE FOOTER BAND'S SURFACE AND THE FOOTER BAND'S TEXT, deliberately and
 * to the token: every colour on this panel is a pair css/tokens.css already
 * declares and has computed, so this composition added no token, no pair and no
 * new arithmetic. The amber rule at its block start is the same 4px band that
 * closes the banner and opens the footer.
 *
 * ⚠️ THE CONTENT IS CENTRED IN THE PANEL'S HEIGHT, AND IT WAS `start` UNTIL THE
 * CARD WAS MEASURED ON A REAL SCREEN. The paragraph that stood here argued for
 * the top edge on the grounds that "a council with a three-line note and a
 * council with none would otherwise get compositions that do not look like the
 * same product" - and that is precisely backwards, which only became obvious at
 * the size the card actually is. Measured: the panel is 542 by 486 and its
 * content occupies the top 230 of that, so top-alignment produced 256px of
 * empty inverse surface underneath, and a note one line longer moved the
 * boundary of that emptiness rather than the composition. Centred, the block
 * sits in the middle of the plate at every length of note, which is the
 * consistency the old paragraph wanted and did not get.
 *
 * ⚠️ THOSE THREE NUMBERS ARE THE PLATE AS IT WAS TWO ROUNDS AGO AND ARE LEFT
 * STANDING, because they are the evidence for the decision that paragraph
 * records and rewriting them would leave the argument citing nothing. The plate
 * today is 574 by 618 at 1440 with a content block of 272, which is the same
 * finding one size up: the emptiness is a property of a plate carrying a mark,
 * a sentence and a link, and centring is still what stops it pooling in one
 * place. What changed this round is that the mark now scales WITH the plate -
 * see the two-column query at the foot of this file - so the block holds its
 * share of the height instead of shrinking against it.
 */
.agora-page--signin .agora-signin {
  display: grid;
  align-content: center;
  gap: var(--agora-space-m);
  padding: var(--agora-space-l);
  color: var(--agora-color-text-inverse);
  border-block-start: var(--agora-rule-accent) solid var(--agora-color-accent);
  background-color: var(--agora-color-surface-inverse);
}

/**
 * The focus ring inside the navy panel.
 *
 * The ordinary ring is the pair computed against the PAGE surface, and this is
 * not that surface. The inverse ring is the one computed at the 3:1 non-text
 * threshold against the inverse surface - the same substitution css/layout.css
 * makes in the footer band and this file makes on the masthead, for the same
 * reason and with the same token.
 */
.agora-page--signin .agora-signin :focus-visible {
  outline-color: var(--agora-color-focus-inverse);
}

/**
 * The mark.
 *
 * A FIXED HEIGHT RATHER THAN A WIDTH, because the file behind it is whatever a
 * council uploaded: the theme's own inverse mark is square on a 120 grid, a
 * coat of arms is usually taller than it is wide, and a mark that spells the
 * council's name out is much wider than it is tall. A box with a height and an
 * automatic width lets each of those keep its own shape while all of them
 * occupy the same vertical space, which is the property the composition
 * actually needs.
 */
.agora-page--signin .agora-signin__mark img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 4.5rem;
}

/**
 * The sentence.
 *
 * The muted inverse tone rather than the full one, because this is the panel's
 * second weight and the mark is its first - the same pairing the masthead makes
 * between its headline and its lede, and the same token. Its pair against this
 * surface is declared at the 4.5 threshold, so it is body text and not a
 * caption.
 */
.agora-page--signin .agora-signin__message {
  max-width: var(--agora-measure);
  color: var(--agora-color-text-inverse-muted);
}

.agora-page--signin .agora-signin__message p {
  margin-block: 0 var(--agora-space-xs);
}

.agora-page--signin .agora-signin__message p:last-child {
  margin-block-end: 0;
}

/**
 * The way out, for a reader whose password is the thing that has gone wrong.
 *
 * IT IS A LINK IN THE FOOTER BAND'S CLOTHES - inverse text, underlined - for
 * the reason css/layout.css gives where it does the same thing to the footer's
 * links: the link tokens carry no computed pair against this surface, and
 * inventing one by eye is exactly what the token file exists to prevent. The
 * underline is therefore doing real work rather than decorating: with the hue
 * fixed to the surrounding text colour it is the only thing left that says this
 * is a link, which is SC 1.4.1 read literally.
 */
.agora-page--signin .agora-signin__help {
  margin-block: 0;
}

.agora-page--signin .agora-signin__help a,
.agora-page--signin .agora-signin__help a:visited,
.agora-page--signin .agora-signin__help a:hover {
  color: var(--agora-color-text-inverse);
}

/**
 * The form.
 *
 * THE LABEL GOES ABOVE ITS FIELD, which is the whole of what was wrong with
 * this page's typography: a label is an inline element and core emits it
 * immediately before an input sized at sixty characters, so the two shared a
 * line and the pair overflowed the column. Stacking them is also the
 * arrangement WCAG's own technique G162 describes for a text input, and the one
 * every browser's autofill heuristic expects.
 *
 * THE FIELD IS CAPPED AS WELL AS FILLED. A full-width field alone would set a
 * username control four hundred pixels wide inside this column, which is four
 * times the longest username anybody types; the cap keeps the control the size
 * of its content while the percentage is what makes it shrink on a phone.
 *
 * THE INPUTS ARE NAMED BY TYPE RATHER THAN BY CLASS so that the rule holds for
 * the password field, whose markup carries the same class as the text field and
 * would be indistinguishable from it either way, and for whatever a site's own
 * authentication module adds beside them.
 */
.agora-page--signin .agora-form-item > label {
  display: block;
  margin-block-end: var(--agora-space-3xs);
  font-weight: var(--agora-font-weight-bold);
}

.agora-page--signin .agora-form-item input[type="text"],
.agora-page--signin .agora-form-item input[type="email"],
.agora-page--signin .agora-form-item input[type="password"] {
  width: 100%;
  max-width: 24rem;
}

/**
 * The button.
 *
 * It is as wide as the field above it rather than as wide as its own label,
 * which is the one place this page departs from the theme's ordinary button.
 * The reason is that this form has exactly one action and no ambiguity about
 * what to do next: a control the width of the thing you have just filled in is
 * the largest available target for the only thing there is to press, which is
 * SC 2.5.8 answered generously rather than minimally.
 */
.agora-page--signin .form-actions {
  margin-block-start: var(--agora-space-m);
}

.agora-page--signin .form-actions input[type="submit"] {
  width: 100%;
  max-width: 24rem;
}

/**
 * The links under an account form - T-0740.
 *
 * Gin Login, which Drupal CMS installs, puts a `.more-links` container after
 * the actions of the sign-in, password request and registration forms: "Create
 * new account", "Log in", "Already have an account? Log in". Under this theme
 * each link was the height of its line, 19px, below the 24 that WCAG 2.2 SC
 * 2.5.8 asks of a target that is not inside a sentence. The re-review of
 * 2026-10-28 found all three.
 *
 * Each link gets the theme's own target size, 44px, the box the password
 * reveal control below and the menu links already have. `min-height` and not
 * `height`, so a link that wraps at 320px or under WCAG text spacing grows
 * rather than clips. One link to a row, at its own width, so the focus ring
 * outlines the link and not the column.
 *
 * Scoped by the class core gives each of the three forms rather than by the
 * sign-in page, because the registration page carries no sign-in panel. It
 * names a container this repository does not own: if Gin Login renames it,
 * the links go back to their line height - a degradation, not a break.
 */
:is(.user-login-form, .user-pass, .user-register-form) .more-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

:is(.user-login-form, .user-pass, .user-register-form) .more-links a {
  display: inline-flex;
  align-items: center;
  min-width: var(--agora-target-size);
  min-height: var(--agora-target-size);
}

/**
 * ---------------------------------------------------------------------------
 * THE PASSWORD REVEAL CONTROL, WHICH THIS THEME DOES NOT SHIP AND DID BREAK.
 *
 * WHAT IS ON THE PAGE. A module the site template depends on mounts a button
 * on every password field so a reader can see what they have typed. It is a
 * real usability affordance, it is not this theme's, and it is not being
 * removed: taking it away to tidy a layout would be a worse product than the
 * layout was.
 *
 * ⚠️ THE DEFECT WAS OURS EVEN THOUGH THE CONTROL IS NOT. Measured at a 1440
 * viewport: the field is 384 by 44, and the button was 48 by 44 sitting at
 * `left: 357` inside it - so it ended at 405 against a field that ends at 384
 * and hung 21px past the border, half in and half out. The module positions it
 * by pulling it back over the field with a negative margin of 2em, which is
 * correct against a browser's default button and wrong against this one: the
 * element layer of this theme dresses EVERY `button` as a solid control, with a
 * 44px minimum and 24px of inline padding on each side, so a 24px glyph became
 * a 48px slab and the module's 26.67px pull no longer covered it.
 *
 * THE FIX IS ARITHMETIC, NOT A GUESS. The control is given the target-size box
 * exactly - 44 by 44, no padding, no border - and pulled back by its own width
 * plus one step of the spacing scale, so its right edge lands 4px inside the
 * field's border rather than 21px outside it. The field reserves the same
 * distance as padding, so a long password runs up to the glyph and never under
 * it.
 *
 * IT IS SCOPED TO THE FIELD AND NOT TO THE SIGN-IN PAGE, because the cause is
 * an element-layer rule that applies on every page this theme renders, and so
 * does the control. `:has()` keeps the reserved padding on the fields that
 * actually carry one: the button is mounted by script after the page loads, and
 * `:has()` is live, so a field whose control never arrived keeps its ordinary
 * padding.
 *
 * ⚠️ IT NAMES A CLASS THIS REPOSITORY DOES NOT OWN, which is a coupling and is
 * declared rather than hidden. The failure mode if that class is ever renamed
 * is that these rules stop matching and the control goes back to the layout the
 * module gives it - the state before this block existed. That is a degradation
 * and not a break, which is what makes the coupling acceptable; a patch or a
 * fork of the module would be neither, and non-negotiable rule 1 forbids the
 * first of those outright.
 *
 * ⚠️ NOTHING IN THIS REPOSITORY EXECUTES THESE RULES, AND THAT IS STATED SO
 * THAT SILENCE IS NOT READ AS COVERAGE. The accessibility gate scans the
 * sign-in page on a fixture site built from this theme alone, and the module
 * that mounts this control is not a dependency of the theme - it must not be,
 * because the theme has to work without it. So the numbers above were measured
 * by hand on a running site and are recorded here rather than asserted by a
 * suite: 384 by 44 field, 48 by 44 control at `left: 357` before, 44 by 44 at
 * `left: 336` after, which puts its right edge 4px inside the border instead of
 * 21px outside it. The keyboard path was walked in the same run - the control
 * takes focus, its ring is drawn whole and clipped by nothing, its accessible
 * name changes from "Show password" to "Hide password", and the field's type
 * changes from `password` to `text`.
 *
 * ⚠️ THE GLYPH KEEPS ITS OWN COLOUR AND THAT IS DELIBERATE. It is a 24 by 16
 * SVG inside the other package, drawn with no fill and therefore black, loaded
 * through `background-image` - which makes it an isolated document that inherits
 * nothing from this page. Recolouring it would mean either writing that
 * module's file path into this stylesheet, which breaks the day it is installed
 * anywhere else, or forking the module. Black on the field's own surface
 * measures 21:1, far above the 3:1 that SC 1.4.11 asks of a control, so what is
 * left is a tone this theme did not choose rather than a tone it got wrong.
 * What this block CAN give it is a size, a position and a state: the glyph is
 * set to the theme's own glyph token, and the control takes the sunken surface
 * under the pointer so that it reads as part of the field rather than as
 * something resting on it.
 */
.agora-form-item:has(button.shwpd) input[type="password"] {
  padding-inline-end: calc(var(--agora-target-size) + var(--agora-space-3xs));
}

button.shwpd {
  width: var(--agora-target-size);
  min-width: var(--agora-target-size);
  height: var(--agora-target-size);
  min-height: var(--agora-target-size);
  /* Its own width plus one step, so the right edge sits inside the border. */
  margin-inline-start: calc((var(--agora-target-size) + var(--agora-space-3xs)) * -1);
  padding: 0;
  vertical-align: middle;
  /* THE RESTING TONE. See the block below for the whole of this decision. */
  opacity: 0.7;
  border: 0;
  border-radius: var(--agora-radius);
  /* The element layer paints every button with the inverse surface. Here that
     would be a navy plate behind a black glyph, inside a light field. */
  background-color: transparent;
  background-position: center;
  /* The module asks for `contain`, which at this box would blow a 24px glyph up
     to 44. The token is the same length the banner's magnifier takes, so every
     glyph inside a control in this theme is one size. */
  background-size: var(--agora-glyph-size);
}

/**
 * THE HOVER AFFORDANCE IS THE GLYPH AND NOT A PLATE, AND THIS REPLACES A RULE
 * THAT PAINTED ONE.
 *
 * WHAT WAS WRONG WITH THE PLATE. The first version of this block gave the
 * control `background-color: var(--agora-color-surface-sunken)` on hover, and
 * the objection is right: a control that sits INSIDE a field must not paint a
 * second surface on top of it, because the field already is the surface. A
 * cream rectangle appearing inside a white box reads as a seam, not as a state.
 *
 * ⚠️ THE DECLARATION IS REPLACED AND NOT DELETED. Removing it would have left
 * this control with no hover state at all, which is a small loss for a pointer
 * user and a real one for anyone who reads interactivity from state changes.
 * What moves is the mechanism: the glyph is the control, so the glyph is what
 * changes.
 *
 * `opacity` AND NOT A TOKEN, WHICH IS THE OPPOSITE OF WHAT THIS THEME DOES
 * EVERYWHERE ELSE, so the exception is argued. D-048 refused `opacity` for the
 * hero mark because the mark is painted in a TOKEN, and dimming a token
 * produces a rendered colour that tests/bin/contrast-check has never computed -
 * the checker goes on certifying a value the page no longer paints. Nothing of
 * that applies here: this glyph is an SVG inside another package, drawn with no
 * fill and therefore black, loaded through `background-image` as an isolated
 * document. It is not a token, it is in no declared pair, and there is no way
 * to make it one without writing that module's file path into this stylesheet.
 * So `opacity` invalidates nothing the checker knows about, and its 68 pairs
 * are untouched by this block.
 *
 * THE RESTING RATIO IS COMPUTED RATHER THAN ASSUMED. Black at 0.7 over the page
 * surface composites to a channel value of 76.5, whose relative luminance is
 * 0.0733, giving 8.52:1 against the surface - well above the 3:1 SC 1.4.11 asks
 * of a control. Hovering takes it to full strength, so interaction INCREASES
 * salience, which is the direction a state change should move in.
 *
 * ⚠️ `:focus-visible` RESTORES FULL OPACITY AND THAT LINE IS LOAD-BEARING.
 * `opacity` applies to an element's whole rendering, its outline included, so a
 * focused control left at 0.7 would draw a focus ring at seven tenths strength.
 * The focus ring is not the hover affordance and neither substitutes for the
 * other; this is what keeps the first of them exactly as visible as it was.
 */
button.shwpd:hover,
button.shwpd:focus-visible {
  opacity: 1;
}

/**
 * Forced colours.
 *
 * ⚠️ THE MECHANISM CHANGES HERE BECAUSE THE PROPERTY IT USES IS THE WRONG ONE
 * IN THIS MODE. A reader in forced colours has asked for maximum contrast, so
 * dimming anything at rest is precisely what they switched the mode on to
 * prevent - the resting glyph goes back to full strength, and with it the
 * difference between resting and hovered disappears.
 *
 * It is replaced rather than dropped. A hairline outline inside the control's
 * own box is a SHAPE, which forced colours preserves where it discards an
 * author's colours, and `ButtonText` is a system colour the user agent
 * guarantees against whatever ground it puts behind a button. It cannot be
 * confused with the focus ring: that is drawn by the user agent in this mode,
 * at its own width, outside the box rather than inside it.
 *
 * The precedent in this file is the trend line, which swaps its token for
 * `CanvasText` here for the same reason, and the key-figure rules, which drop a
 * decorative layer outright. Neutralising without substituting was available
 * and was not taken: a control with no hover state is what this whole block
 * exists to avoid.
 */
@media (forced-colors: active) {
  button.shwpd {
    opacity: 1;
  }

  button.shwpd:hover {
    outline: var(--agora-border-width) solid ButtonText;
    outline-offset: calc(var(--agora-border-width) * -1);
  }
}

/**
 * Two columns, at the theme's own breakpoint and at no new one.
 *
 * 60rem is where the header lifts its second row and where the record sheet
 * takes its label column; reusing it means the page has two states rather than
 * four and there is no second number to keep in step with the first.
 *
 * A MINIMUM OF ZERO ON BOTH TRACKS, because a grid track's automatic minimum is
 * its content: a long unbroken word in a council's sentence, or a wide autofill
 * dropdown in the username field, would otherwise refuse to shrink and push the
 * card wider than the page - the SC 1.4.10 rounding error this theme has
 * already met twice, in the masthead and in the record sheet.
 *
 * THE PANEL'S RULE MOVES FROM THE TOP EDGE TO THE INLINE END, because in two
 * columns it is no longer a band across the top of anything: it is the seam
 * between the two halves of the card, and a 4px amber seam is the same gesture
 * turned through ninety degrees.
 */
@media (min-width: 60rem) {
  /*
    THE FORM COLUMN IS A FIXED TRACK AND THE PANEL TAKES WHAT IS LEFT, which is
    the inverse of how this started and is what lets the card grow without the
    form growing with it. 30rem holds the 24rem field plus the column's own
    padding with a little slack; every rem the card gains beyond that goes to
    the navy panel, so widening the card is a decision about the panel alone.
  */
  .agora-page--signin .agora-page__main .agora-page__container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  }

  /*
    THE PANEL'S GAP TAKES THE SAME STEP AS EVERYTHING ELSE IN THIS QUERY - m to
    l - and it is set here rather than on the base rule because the stacked card
    must not move: below this breakpoint the panel is a 340 by 292 block on a
    phone, measured at exactly that before and after this change.
  */
  .agora-page--signin .agora-signin {
    gap: var(--agora-space-l);
    border-block-start: 0;
    border-inline-end: var(--agora-rule-accent) solid var(--agora-color-accent);
  }

  /*
    THE MARK GROWS WITH THE PANEL, and the number is the panel's and not a
    taste. In two columns the plate is over five hundred pixels wide; a mark
    drawn at the stacked size sits in the corner of it like a stamp.

    ⚠️ 8rem, AND IT WAS 6.5rem, AND THE STEP IS NOT DECORATION - IT IS WHAT
    STOPS A TALLER CARD FROM BEING AN EMPTIER ONE. This is the diagnosis the
    round before this one got wrong: the card was not too small, it was too
    empty, so 42px of extra height went into nothing and was reported back as
    invisible. Measured before this round at 1440: the plate was 574 by 528 and
    the block inside it - mark, sentence, way out - was 224 tall, so 304px of
    the plate carried nothing, split 152 above and 152 below by the centring.

    THE COUNTERFACTUAL WAS RUN RATHER THAN REASONED, because "it would have
    looked emptier" is exactly the kind of claim that is easier to assert than
    to check. With this query's new padding in place and the mark and the gap
    left at their old values, the plate measures 618 tall carrying the same 224
    - occupancy 36.2%, down from 42.4%, with 394px of empty inverse surface
    instead of 304. A bigger card that is measurably more deserted. With the
    mark and the gap taking the same step as everything else the block measures
    272 in the same 618, which is 44.0%: the plate ends up FULLER than it
    started, at 90px more height. The mark holds its share rather than gaining
    one - 104 of 528 was 19.7%, 128 of 618 is 20.7% - so this is the same
    composition at a larger size, which is the whole intent.

    The sentence beside it is left alone deliberately. It is a council's own
    text of unknown length; enlarging it would make a three-line note the size
    of the heading in the column beside it, and that column is where the reader
    is going.
  */
  .agora-page--signin .agora-signin__mark img {
    height: 8rem;
  }

  /*
    ⚠️ THE CARD'S EXTRA HEIGHT LIVES ENTIRELY IN THIS QUERY, and that placement
    is the whole of the answer to "does it reintroduce scrolling on a phone".
    Below 60rem the card is a single column whose height is already the sum of
    its content, and every rem added to it is a rem a reader has to scroll past
    on the smallest screen with the least room to spare. So the rhythm opens up
    where there is space for it and nowhere else.

    NOTHING HERE TOUCHES THE FIELDS THEMSELVES. The input keeps its 24rem cap
    and its 44px height; what changes is the air around them - the padding of
    both panels and the space between one field and the next. A taller field is
    a worse field, and a wider one is worse still, so the height is bought from
    the composition rather than from the controls.

    ⚠️ THE WHOLE RHYTHM MOVES ONE STEP UP THE SAME SCALE, AND THAT IS WHY THIS
    IS A SIZE CHANGE RATHER THAN A REDESIGN. Padding goes xl to 2xl, the space
    between one field and the next goes l to xl, and the panel's own gap goes m
    to l. Every one of those is the next value on the 1.5 scale in css/base.css,
    so the ratio between the card's outer padding and its internal gaps is
    exactly what it was - the proportions are untouched and only the size moves.
    Measured at 1440: the card goes from 1056 x 530 to 1056 x 620.

    ⚠️ THAT IS +90 AND NOT THE +108 THE THREE STEPS ADD UP TO, and the missing
    18 is margin collapsing rather than a mistake. The last field's
    `margin-block-end` and the actions' `margin-block-start` are adjacent
    sibling margins, so they collapse to one, and one 54 replaces one 36 where
    two 36s had already collapsed to one. It is left collapsing: the space
    before the button reading the same as the space between the fields is the
    rhythm this block is for.

    ⚠️ THE PADDING IS TWO VALUES AND NOT ONE, AND THE SECOND ONE IS THE POINT.
    Only the BLOCK padding takes the new step; the inline padding stays at xl.
    The card is short in one axis and not the other, and the inline axis is
    already spoken for: the form track is 30rem, so 2xl on all four sides takes
    54px off the field's rendered width - measured, not predicted: 372 to 318 -
    which is the controls paying for the composition, the exact trade the
    paragraph above refuses. Widening the track to compensate was the other way
    out and is worse: the card's width is capped, so every pixel the form track
    gains is a pixel off the navy plate, and shrinking the plate is the opposite
    of what this round is for.

    ⚠️ WHY THE HEIGHT AND NOT THE WIDTH, since the emptier-looking number is the
    width. Measured at 1440: 384px of page surface either side of the card, 192
    each. It is the larger hole and it is the smaller problem, for an arithmetic
    reason rather than a taste one. The page's own content column is 1152 wide,
    so a card widened until it aligned with the banner above it and the footer
    below it would gain 96px - 9.1% - and the round before this one moved the
    height by 8% and was reported as invisible. The width axis cannot deliver a
    step anyone would see; it runs out before it gets there. It would also
    flatten the card: at 1056 x 530 this is a 1.99:1 letterbox already spanning
    73% of the viewport's width and 59% of its height, so width is the axis it
    is NOT short in, and adding to it moves the shape away from reading as an
    object rather than towards it. 1056 x 620 is 1.70:1 and 69% of the height.

    IT STILL CLEARS THE FOLD, which is the constraint that decides how far this
    could go. At 1440 x 900 the card's last pixel is at 720 with the window
    ending at 900, so the whole composition is visible without scrolling and
    there is room for the status message a failed sign-in puts above the form.
    The document grows 1151 to 1241 - the footer moves down, the card does not
    move off the screen.
  */
  .agora-page--signin .agora-signin,
  .agora-page--signin .agora-region--content {
    padding: var(--agora-space-2xl) var(--agora-space-xl);
  }

  .agora-page--signin .agora-form-item {
    margin-block-end: var(--agora-space-xl);
  }

  .agora-page--signin .form-actions {
    margin-block-start: var(--agora-space-xl);
  }
}
