/* Styles that only the building contractor's example (builder.js) uses. Everything shared is in ../index.html.
   One colour (the owner's word, 2026-10-12). Purple is what is measured: how well a tender fits, a mark on the
   timeline, what was won. Where two things share a chart the second is the quieter purple (--chart-2) or a grey
   (--chart-3, --chart-4), the same shades the other examples use, and each is named. Red comes only from the shared
   dot for a date that falls today or tomorrow; nothing in this file asks for it.
   On a wide window no page scrolls: the page is as tall as its frame, the card that matters most takes the room
   that is left (.ab-grow), a chart fills its card (.ab-fill) and a list is ruled into the lines that fit (--lines,
   worked out in builder.js). All of that is in the block for wide frames near the end; a phone has the block after. */

/* ---------- parts used on several pages ---------- */
.still[data-example="builder"] .ab-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.still[data-example="builder"] .ab-two > .card { min-width: 0; }
.still[data-example="builder"] .ab-end { margin-left: auto; }
.still[data-example="builder"] .k-meter { display: block; }
.still[data-example="builder"] .k-bar[style*="height:0%"] { display: none; }
.still[data-example="builder"] .k-cols.stacked .k-bar { border-radius: 2px; }
.still[data-example="builder"] .k-legend + .s-plot { margin-top: 4px; }
.still[data-example="builder"] .ab-name { display: block; max-width: 100%; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.still[data-example="builder"] button.ab-name:hover { text-decoration: underline; }
.still[data-example="builder"] .ab-none { min-height: 0; flex: 1; padding: 32px 24px; }
.still[data-example="builder"] .ab-quiet { color: var(--subtle-foreground); }
/* How well a tender fits: a meter, its score out of 100, and the word for it. */
.still[data-example="builder"] .ab-fit { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.still[data-example="builder"] .ab-fit .k-meter { width: 40px; flex: none; }
.still[data-example="builder"] .ab-fit b { min-width: 2ch; font-weight: 600; font-variant-numeric: tabular-nums; }
.still[data-example="builder"] .ab-fit > span { color: var(--muted-foreground); }
/* A deadline: a dot, how long is left, and the day. */
.still[data-example="builder"] .ab-due { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.still[data-example="builder"] .ab-due .dot { margin-left: 3px; }
.still[data-example="builder"] .ab-due span { font-size: 12px; color: var(--subtle-foreground); }
.still[data-example="builder"] .ab-due.off { color: var(--subtle-foreground); }
/* What stands over a page: the switch on the left, the search on the right, 36 high on every page. */
.still[data-example="builder"] .ab-tools { min-height: 36px; }
.still[data-example="builder"] .ab-tools .seg { margin-left: 0; }
/* A table drawn as a grid, so that a whole row can open its record. */
.still[data-example="builder"] .ab-table { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; }
.still[data-example="builder"] .ab-plans { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.still[data-example="builder"] .ab-th, .still[data-example="builder"] .ab-tr { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; column-gap: 16px; padding: 0 16px; }
.still[data-example="builder"] .ab-th { height: 40px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); border-bottom: 1px solid var(--border); white-space: nowrap; }
.still[data-example="builder"] .ab-th button { display: inline-flex; align-items: center; gap: 4px; }
.still[data-example="builder"] .ab-th button:hover, .still[data-example="builder"] .ab-th [aria-sort] { color: var(--foreground); }
.still[data-example="builder"] .ab-th svg { width: 12px; height: 12px; }
.still[data-example="builder"] .ab-tr { position: relative; min-height: 56px; }
.still[data-example="builder"] .ab-tr + .ab-tr { border-top: 1px solid var(--border); }
.still[data-example="builder"] .ab-tr:hover { background: color-mix(in srgb, var(--muted) 50%, transparent); }
.still[data-example="builder"] .ab-what { min-width: 0; }
.still[data-example="builder"] .ab-what .s-open, .still[data-example="builder"] .ab-what .s-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.still[data-example="builder"] .ab-what .s-open { font-weight: 600; }
.still[data-example="builder"] .ab-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.still[data-example="builder"] .ab-stagecell { min-width: 96px; }

/* ---------- Overview ---------- */
/* The headline numbers: one card in four parts, each leading on to the next. */
.still[data-example="builder"] .ab-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: none; }
.still[data-example="builder"] .ab-stage { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 16px; }
.still[data-example="builder"] .ab-stage:first-child { border-radius: 17px 0 0 17px; }
.still[data-example="builder"] .ab-stage:last-child { border-radius: 0 17px 17px 0; }
.still[data-example="builder"] .ab-stage + .ab-stage { border-left: 1px solid var(--border); }
.still[data-example="builder"] .ab-stage:hover { background: color-mix(in srgb, var(--muted) 50%, transparent); }
.still[data-example="builder"] .ab-stage + .ab-stage::before { content: ""; position: absolute; left: -10px; top: 50%; width: 18px; height: 18px; margin-top: -10px; border: 1px solid var(--border); border-radius: 50%; background: var(--card); }
.still[data-example="builder"] .ab-stage + .ab-stage::after { content: ""; position: absolute; left: -4px; top: 50%; width: 5px; height: 5px; margin-top: -3px; border: solid var(--muted-foreground); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.still[data-example="builder"] .ab-stage .label { color: var(--muted-foreground); white-space: nowrap; }
.still[data-example="builder"] .ab-figure { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.still[data-example="builder"] .ab-figure span { color: var(--muted-foreground); }
.still[data-example="builder"] .ab-stage .s-meta { margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.still[data-example="builder"] .ab-target { display: flex; align-items: center; gap: 8px; min-width: 0; height: 16px; }
.still[data-example="builder"] .ab-target .k-meter { flex: 1; min-width: 32px; }
/* What needs doing today, the biggest card on the page: the tender, what it is waiting on, how long is left, and
   the button that does it, every button the same width so that they stand in one column. */
.still[data-example="builder"] .ab-todo { display: grid; }
.still[data-example="builder"] .ab-do { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 96px 148px; align-items: center; column-gap: 16px; min-height: 52px; padding: 0 16px; }
.still[data-example="builder"] .ab-do + .ab-do { border-top: 1px solid var(--border); }
.still[data-example="builder"] .ab-whom, .still[data-example="builder"] .ab-ask { min-width: 0; }
.still[data-example="builder"] .ab-ask b { display: block; font-weight: 500; }
.still[data-example="builder"] .ab-ask b, .still[data-example="builder"] .ab-do .s-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.still[data-example="builder"] .ab-do .btn { justify-content: center; }
/* The next four weeks: a column for each day, a lane for each kind of date, weekends shaded. */
.still[data-example="builder"] .ab-ahead { display: flex; flex-direction: column; gap: 12px; }
.still[data-example="builder"] .ab-lanes { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: repeat(3, minmax(32px, 1fr)) auto; column-gap: 12px; font-size: 12px; line-height: 16px; color: var(--subtle-foreground); }
.still[data-example="builder"] .ab-lane-name { align-self: center; color: var(--muted-foreground); white-space: nowrap; }
.still[data-example="builder"] .ab-days { display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); border-top: 1px solid var(--chart-grid); }
.still[data-example="builder"] .ab-day { display: flex; flex-direction: column-reverse; align-items: center; justify-content: center; gap: 1px; min-width: 0; }
.still[data-example="builder"] .ab-day.we { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.still[data-example="builder"] .ab-day.mon { box-shadow: inset 1px 0 0 var(--chart-grid); }
.still[data-example="builder"] .ab-axis span { padding-top: 4px; white-space: nowrap; overflow: hidden; }
/* A mark is as wide as its day, so that it is easy to point at; the dot is drawn inside it. */
.still[data-example="builder"] .ab-mark { display: grid; place-items: center; width: 100%; height: 12px; flex: none; }
.still[data-example="builder"] .ab-mark::before, .still[data-example="builder"] .ab-key { content: ""; display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--chart-1); }
.still[data-example="builder"] .ab-mark.soft::before, .still[data-example="builder"] .ab-key.soft { background: var(--card); box-shadow: inset 0 0 0 2px var(--chart-1); }
.still[data-example="builder"] .ab-mark:hover::before, .still[data-example="builder"] .ab-mark:focus-visible::before { outline: 2px solid color-mix(in srgb, var(--chart-1) 34%, transparent); }
.still[data-example="builder"] .ab-mark:focus-visible { outline: none; }

/* ---------- a tender's own page ---------- */
/* Everything about one tender on one screen: the blocks stand a little closer than on a record of the shared kind. */
.still[data-example="builder"] .s-main { max-width: 760px; padding: 20px 24px 16px; gap: 12px; }
.still[data-example="builder"] .s-main > .s-meta { margin-top: -8px; }
.still[data-example="builder"] .s-box-body textarea { min-height: 88px; }
.still[data-example="builder"] .ab-link { display: inline-flex; align-items: center; gap: 2px; color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; }
.still[data-example="builder"] .ab-link svg { width: 12px; height: 12px; }
.still[data-example="builder"] .ab-words { color: var(--foreground); }
.still[data-example="builder"] .ab-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.still[data-example="builder"] .ab-status .pill { justify-self: auto; }
.still[data-example="builder"] .ab-steps { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; font-size: 12px; line-height: 16px; color: var(--subtle-foreground); }
.still[data-example="builder"] .ab-steps li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.still[data-example="builder"] .ab-steps li + li::before { content: ""; width: 16px; height: 1px; margin: 0 4px; background: var(--border); }
.still[data-example="builder"] .ab-steps li svg { width: 12px; height: 12px; stroke-width: 2; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-steps li i { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--input); }
.still[data-example="builder"] .ab-steps li.done, .still[data-example="builder"] .ab-steps li.next { color: var(--foreground); font-weight: 500; }
.still[data-example="builder"] .ab-steps li.next i { box-shadow: inset 0 0 0 2px var(--foreground); }
.still[data-example="builder"] .ab-steps li span { color: var(--subtle-foreground); font-weight: 400; }
.still[data-example="builder"] .ab-verdict { margin-left: auto; display: flex; font-weight: 400; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-verdict .ab-fit b { color: var(--foreground); }
.still[data-example="builder"] .ab-parts { display: grid; grid-template-columns: auto 64px auto minmax(0, 1fr); align-items: center; gap: 8px 12px; padding: 12px 14px; }
.still[data-example="builder"] .ab-part { color: var(--muted-foreground); white-space: nowrap; }
.still[data-example="builder"] .ab-parts .n { font-size: 12px; line-height: 16px; color: var(--subtle-foreground); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.still[data-example="builder"] .ab-reason.ruled { display: flex; gap: 6px; }
.still[data-example="builder"] .ab-reason.ruled svg { margin-top: 2px; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-bid { margin-right: auto; align-self: center; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-bid b { font-weight: 600; color: var(--foreground); }
.still[data-example="builder"] .ab-aside { margin-left: auto; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--subtle-foreground); white-space: nowrap; }
.still[data-example="builder"] .ab-docs { display: flex; flex-direction: column; gap: 10px; }
.still[data-example="builder"] .ab-docs p { color: var(--foreground); }
.still[data-example="builder"] .ab-ref { margin-left: 4px; font-size: 12px; line-height: 16px; color: var(--subtle-foreground); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.still[data-example="builder"] .ab-ref:hover { color: var(--foreground); }
.still[data-example="builder"] .s-box-head + .s-box-foot { border-top: 0; }
.still[data-example="builder"] .ab-diary { align-items: flex-start; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-diary svg { flex: none; color: var(--muted-foreground); }

/* ---------- Bids: the board ---------- */
/* A column for each stage. A card is two lines: the tender and its date, then its value, its fit and the buttons
   that move it on. Where the page is tall enough (.roomy) the buyer has a line between them. */
.still[data-example="builder"] .s-body > .seg { display: none; }
.still[data-example="builder"] .ab-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.still[data-example="builder"] .ab-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.still[data-example="builder"] .ab-col-head { display: flex; align-items: center; gap: 8px; height: 20px; padding: 0 4px; white-space: nowrap; }
.still[data-example="builder"] .ab-col-head b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.still[data-example="builder"] .ab-col-head span { margin-left: auto; font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.still[data-example="builder"] .ab-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; height: 74px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.still[data-example="builder"] .ab-card-top { display: flex; align-items: center; gap: 8px; height: 20px; }
.still[data-example="builder"] .ab-card-top .ab-name { flex: 1; min-width: 0; }
.still[data-example="builder"] .ab-card-top .ab-due { gap: 6px; font-size: 12px; line-height: 16px; }
.still[data-example="builder"] .ab-who { display: none; margin-top: -4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.still[data-example="builder"] .ab-card-line { display: flex; align-items: center; gap: 8px; height: 28px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-card-line .ab-fit { gap: 6px; }
.still[data-example="builder"] .ab-card-line .ab-fit .k-meter { width: 32px; }
.still[data-example="builder"] .ab-sum { color: var(--foreground); font-variant-numeric: tabular-nums; }
.still[data-example="builder"] .ab-card-acts { display: flex; gap: 6px; margin-left: auto; }
.still[data-example="builder"] .ab-card-acts .btn { padding: 0 8px; }
.still[data-example="builder"] .ab-card-acts .btn:first-child { color: var(--foreground); }
.still[data-example="builder"] .ab-board.roomy .ab-card { height: 94px; }
.still[data-example="builder"] .ab-board.roomy .ab-who { display: block; }
.still[data-example="builder"] .ab-col-none { padding: 20px 12px; border: 1px solid var(--border); border-radius: 14px; text-align: center; font-size: 12px; line-height: 16px; color: var(--subtle-foreground); }
.still[data-example="builder"] .ab-more { align-self: flex-start; }

/* ---------- Calendar ---------- */
.still[data-example="builder"] .ab-sq { width: 32px; padding: 0; justify-content: center; }
.still[data-example="builder"] .ab-sq.back svg { transform: rotate(180deg); }
.still[data-example="builder"] .ab-month-name { min-width: 124px; margin-left: 4px; font-weight: 600; white-space: nowrap; }
.still[data-example="builder"] .ab-check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground); white-space: nowrap; cursor: pointer; }
.still[data-example="builder"] .ab-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.still[data-example="builder"] .ab-caltools .k-legend svg { width: 12px; height: 12px; }
.still[data-example="builder"] .ab-week, .still[data-example="builder"] .ab-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, 0.55fr)); }
.still[data-example="builder"] .ab-week { height: 32px; flex: none; align-items: center; border-bottom: 1px solid var(--border); font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-week span { padding: 0 8px; }
.still[data-example="builder"] .ab-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 104px; padding: 6px 8px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.still[data-example="builder"] .ab-cell:nth-child(7n + 1) { border-left: 0; }
.still[data-example="builder"] .ab-cell:nth-child(-n + 7) { border-top: 0; }
.still[data-example="builder"] .ab-cell.we { background: color-mix(in srgb, var(--muted) 40%, transparent); }
.still[data-example="builder"] .ab-date { display: flex; align-items: center; gap: 6px; height: 20px; flex: none; font-size: 12px; line-height: 16px; white-space: nowrap; }
.still[data-example="builder"] .ab-date b { padding: 2px 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.still[data-example="builder"] .ab-date span { color: var(--muted-foreground); }
.still[data-example="builder"] .ab-date .badge { margin-left: auto; }
.still[data-example="builder"] .ab-cell.out .ab-date b { font-weight: 400; color: var(--subtle-foreground); }
.still[data-example="builder"] .ab-cell.today .ab-date b { padding: 2px 6px; border-radius: 6px; background: var(--foreground); color: var(--background); }
.still[data-example="builder"] .ab-ev { display: flex; align-items: center; gap: 6px; min-width: 0; height: 22px; flex: none; padding: 0 4px; border: 1px solid transparent; border-radius: 6px; background: var(--muted); font-size: 12px; line-height: 16px; }
.still[data-example="builder"] .ab-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.still[data-example="builder"] .ab-ev svg { width: 12px; height: 12px; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-ev.soft { background: none; border-color: var(--border); color: var(--muted-foreground); }
.still[data-example="builder"] .ab-ev.past { opacity: 0.6; }
.still[data-example="builder"] .ab-ev:hover { border-color: var(--input); }
.still[data-example="builder"] .ab-rest { height: 22px; flex: none; padding: 3px 4px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.still[data-example="builder"] .k-legend .ab-ev { width: 20px; height: 12px; padding: 0; }
.still[data-example="builder"] .ab-agenda { display: none; }

/* ---------- Councils ---------- */
.still[data-example="builder"] .ab-src { display: grid; grid-template-columns: minmax(0, 1fr) 328px; gap: 16px; }
.still[data-example="builder"] .ab-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.still[data-example="builder"] .ab-nat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 12px; }
.still[data-example="builder"] .ab-tile { display: flex; align-items: center; gap: 12px; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; }
.still[data-example="builder"] .ab-tile b { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.still[data-example="builder"] .ab-tile span { font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-tile:hover, .still[data-example="builder"] .ab-site:hover { background: color-mix(in srgb, var(--muted) 50%, transparent); }
.still[data-example="builder"] .ab-tile.on, .still[data-example="builder"] .ab-site.on { background: var(--muted); }
.still[data-example="builder"] .ab-sub { display: none; margin: 0 0 8px; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
/* The thirty councils run down three columns, each with a bar for what was found there, all on one scale. */
.still[data-example="builder"] .ab-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(10, auto); grid-auto-flow: column; gap: 2px 24px; margin: 0 -8px; }
.still[data-example="builder"] .ab-site { display: grid; grid-template-columns: minmax(0, 100px) minmax(16px, 1fr) 18px; align-items: center; gap: 12px; height: var(--site, 28px); padding: 0 8px; border-radius: 8px; }
.still[data-example="builder"] .ab-site b { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.still[data-example="builder"] .ab-site > span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-site .ab-down { grid-column: span 2; font-size: 12px; line-height: 16px; }
.still[data-example="builder"] .ab-site.on .k-meter { background: var(--card); }
.still[data-example="builder"] .ab-chosen { display: flex; flex-direction: column; min-width: 0; }
.still[data-example="builder"] .ab-chosen .ab-foot { margin-top: auto; }
.still[data-example="builder"] .ab-strong { font-weight: 600; color: var(--foreground); }
.still[data-example="builder"] .ab-facts dd { font-weight: 400; }
.still[data-example="builder"] .ab-found { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.still[data-example="builder"] .ab-found button { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 16px; }
.still[data-example="builder"] .ab-found button + button { border-top: 1px solid var(--border); }
.still[data-example="builder"] .ab-found button:hover { background: color-mix(in srgb, var(--muted) 50%, transparent); }
.still[data-example="builder"] .ab-found button > svg { flex: none; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-found button > span:not(.ab-fit) { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.still[data-example="builder"] .ab-foot { padding: 10px 16px 12px; border-top: 1px solid var(--border); }
.still[data-example="builder"] .ab-foot .btn { color: var(--foreground); }
.still[data-example="builder"] .ab-dates { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; }
.still[data-example="builder"] .ab-dates span { white-space: nowrap; overflow: hidden; }

/* ---------- Results ---------- */
.still[data-example="builder"] .ab-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.still[data-example="builder"] .ab-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* When a bid was lost: a dot for each, by how far the winner's price was under (or over) the firm's own. */
.still[data-example="builder"] .ab-gaps { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 16px; }
.still[data-example="builder"] .ab-gap-name { white-space: nowrap; }
.still[data-example="builder"] .ab-gap-lane { position: relative; align-self: stretch; min-height: 28px; margin: 0 8px; }
.still[data-example="builder"] .ab-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--chart-grid); }
.still[data-example="builder"] .ab-tick.zero { background: var(--input); }
.still[data-example="builder"] .ab-dot { position: absolute; top: 50%; display: grid; place-items: center; width: 16px; height: 14px; margin: -7px 0 0 -8px; }
.still[data-example="builder"] .ab-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--chart-1); box-shadow: 0 0 0 2px var(--card); }
.still[data-example="builder"] .ab-dot.l1 { margin-top: -13px; }
.still[data-example="builder"] .ab-dot.l2 { margin-top: -1px; }
.still[data-example="builder"] .ab-dot:hover, .still[data-example="builder"] .ab-dot:focus-visible { z-index: 1; outline: none; }
.still[data-example="builder"] .ab-dot:hover::before, .still[data-example="builder"] .ab-dot:focus-visible::before { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--foreground); }
.still[data-example="builder"] .ab-gap-axis { position: relative; height: 16px; margin: 6px 8px 0; font-size: 12px; line-height: 16px; color: var(--subtle-foreground); }
.still[data-example="builder"] .ab-gap-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.still[data-example="builder"] .ab-gap-axis span:first-child { transform: none; }
/* Won and lost by the size of the job: one bar for each size, the won part purple and the lost part the quieter purple. */
.still[data-example="builder"] .ab-bands { grid-template-columns: auto 1fr auto; row-gap: 10px; margin-top: 12px; font-size: 14px; }
.still[data-example="builder"] .ab-pair { display: flex; gap: 2px; min-width: 8px; }
.still[data-example="builder"] .ab-pair i { flex: 1 0 0; border-radius: 6px; background: var(--chart-1); }
.still[data-example="builder"] .ab-pair i:hover { outline: 1px solid var(--foreground); outline-offset: 1px; }
.still[data-example="builder"] .ab-pair .lost { background: var(--chart-2); }
/* Who won what: the contract and the day, then how it ended. */
.still[data-example="builder"] .ab-awards { display: grid; }
.still[data-example="builder"] .ab-award { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; gap: 4px 12px; min-height: 58px; padding: 6px 16px; }
.still[data-example="builder"] .ab-award + .ab-award { border-top: 1px solid var(--border); }
.still[data-example="builder"] .ab-award b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.still[data-example="builder"] .ab-when { font-size: 12px; line-height: 20px; color: var(--subtle-foreground); font-variant-numeric: tabular-nums; white-space: nowrap; }
.still[data-example="builder"] .ab-out { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.still[data-example="builder"] .ab-out span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- a wide frame: nothing scrolls ---------- */
@container still (min-width: 621px) {
  .still[data-example="builder"] .s-body { height: 100%; }
  .still[data-example="builder"] .ab-grow { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  /* A chart fills the card it is in: the kit's plot gives up its fixed height and takes the room that is left. */
  .still[data-example="builder"] .ab-fill { display: flex; flex-direction: column; min-height: 0; }
  .still[data-example="builder"] .ab-fill > .s-pad { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .still[data-example="builder"] .ab-fill .k-legend { flex: none; }
  .still[data-example="builder"] .ab-fill .k-plot { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr) auto; }
  .still[data-example="builder"] .ab-fill .k-plot .y, .still[data-example="builder"] .ab-fill .k-plot .s-area, .still[data-example="builder"] .ab-fill .k-colarea { height: auto; min-height: 0; }
  /* The names at the ends of the lines are placed by hundredths of that height. */
  .still[data-example="builder"] .ab-fill .k-ends { position: relative; display: block; width: 92px; height: auto; }
  .still[data-example="builder"] .ab-fill .k-ends span { position: absolute; left: 0; top: calc(var(--y) * 1%); margin-top: -8px; }
  /* A list ruled into equal lines. */
  .still[data-example="builder"] .ab-grow > .ab-table { flex: 1; min-height: 0; grid-template-rows: 40px repeat(var(--lines, 1), minmax(0, 1fr)); }
  .still[data-example="builder"] .ab-grow > .ab-table .ab-tr { min-height: 0; }
  .still[data-example="builder"] .ab-grow > .ab-awards { flex: 1; min-height: 0; grid-template-rows: repeat(var(--lines, 1), minmax(0, 1fr)); }
  .still[data-example="builder"] .ab-grow > .ab-awards .ab-award { min-height: 0; padding-top: 0; padding-bottom: 0; }
  .still[data-example="builder"] .ab-grow > .s-pager { flex: none; }
  /* Overview: what needs doing takes most of the room, between 52 and 72 for each thing; the charts have the rest. */
  .still[data-example="builder"] .ab-needs { flex: 7 1 0; display: flex; flex-direction: column; min-height: calc(49px + var(--n) * 52px); max-height: calc(50px + var(--n) * 72px); }
  .still[data-example="builder"] .ab-needs .ab-todo { flex: 1; min-height: 0; grid-template-rows: repeat(var(--n), minmax(0, 1fr)); }
  .still[data-example="builder"] .ab-needs .ab-do { min-height: 0; }
  .still[data-example="builder"] .ab-charts { flex: 5 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .still[data-example="builder"] .ab-ahead .ab-lanes { min-height: 0; }
  /* Calendar: the weeks share the height. */
  .still[data-example="builder"] .ab-grid { flex: 1; min-height: 0; grid-template-rows: repeat(var(--weeks), minmax(0, 1fr)); }
  .still[data-example="builder"] .ab-cell { min-height: 0; overflow: hidden; }
  /* Councils: the sites keep their height and the chart under them has what is left. */
  .still[data-example="builder"] .ab-src { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .still[data-example="builder"] .ab-left, .still[data-example="builder"] .ab-chosen { min-height: 0; }
  .still[data-example="builder"] .ab-left > .card:first-child { flex: none; }
  /* Results: two columns, and in each the card that can use the room has it. */
  .still[data-example="builder"] .ab-cols { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .still[data-example="builder"] .ab-stack { min-height: 0; }
  .still[data-example="builder"] .ab-won { flex: 3 1 0; }
  .still[data-example="builder"] .ab-lostby { flex: 2 1 0; }
  .still[data-example="builder"] .ab-sizes { flex: none; }
  .still[data-example="builder"] .ab-lostby .ab-gaps { flex: 1; min-height: 0; grid-template-rows: repeat(var(--n), minmax(24px, 1fr)) auto; }
  .still[data-example="builder"] .ab-lostby .ab-gap-lane { min-height: 0; }
}

/* ---------- on a phone ---------- */
@container still (max-width: 620px) {
  .still[data-example="builder"] .ab-two, .still[data-example="builder"] .ab-src, .still[data-example="builder"] .ab-cols { grid-template-columns: minmax(0, 1fr); }
  .still[data-example="builder"] .seg, .still[data-example="builder"] .s-body > .seg { display: flex; margin-left: 0; }
  .still[data-example="builder"] .seg button { flex: 1; text-align: center; white-space: nowrap; }
  .still[data-example="builder"] .ab-end { margin-left: 0; }
  /* Overview */
  .still[data-example="builder"] .ab-flow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .still[data-example="builder"] .ab-stage { padding: 12px 14px; }
  .still[data-example="builder"] .ab-stage:nth-child(1) { border-radius: 17px 0 0 0; }
  .still[data-example="builder"] .ab-stage:nth-child(2) { border-radius: 0 17px 0 0; }
  .still[data-example="builder"] .ab-stage:nth-child(3) { border-radius: 0 0 0 17px; }
  .still[data-example="builder"] .ab-stage:nth-child(4) { border-radius: 0 0 17px 0; }
  .still[data-example="builder"] .ab-stage:nth-child(odd) { border-left: 0; }
  .still[data-example="builder"] .ab-stage:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .still[data-example="builder"] .ab-stage::before, .still[data-example="builder"] .ab-stage::after { display: none; }
  .still[data-example="builder"] .ab-target { flex-direction: column; align-items: stretch; gap: 4px; height: auto; }
  .still[data-example="builder"] .ab-target .k-meter { flex: none; }
  /* What needs doing: the tender and how long is left, what it is waiting on, then the button. */
  .still[data-example="builder"] .ab-do { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding: 12px 16px; }
  .still[data-example="builder"] .ab-whom { grid-area: 1 / 1; }
  .still[data-example="builder"] .ab-do .ab-due { grid-area: 1 / 2; align-self: start; }
  .still[data-example="builder"] .ab-ask { grid-area: 2 / 1 / 3 / 3; }
  .still[data-example="builder"] .ab-ask b, .still[data-example="builder"] .ab-ask .s-meta { white-space: normal; }
  .still[data-example="builder"] .ab-do .btn { grid-area: 3 / 1 / 4 / 3; justify-self: start; }
  .still[data-example="builder"] .ab-lanes { column-gap: 8px; grid-template-rows: repeat(3, minmax(40px, 1fr)) auto; }
  .still[data-example="builder"] .ab-mark::before { width: 8px; height: 8px; }
  /* Tenders, and the planning applications */
  .still[data-example="builder"] .ab-tools { row-gap: 8px; }
  .still[data-example="builder"] .ab-tools .seg { width: 100%; }
  .still[data-example="builder"] .ab-table, .still[data-example="builder"] .ab-plans { grid-template-columns: minmax(0, 1fr) auto auto; }
  .still[data-example="builder"] .ab-table .ab-due span { display: none; }
  /* On the narrowest phones the meter gives way first, and then the word beside it. */
  .still[data-example="builder"] .ab-tr > div { min-width: 0; }
  .still[data-example="builder"] .ab-table .ab-fit { max-width: 100%; gap: 6px; }
  .still[data-example="builder"] .ab-table .ab-fit .k-meter { width: 32px; }
  .still[data-example="builder"] .ab-table .ab-fit > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .still[data-example="builder"] .ab-th { display: none; }
  .still[data-example="builder"] .ab-tr { column-gap: 12px; row-gap: 6px; padding-top: 12px; padding-bottom: 12px; }
  .still[data-example="builder"] .ab-tr > .n { display: none; }
  .still[data-example="builder"] .ab-what { grid-column: 1 / -1; }
  /* A name may run to two lines before it is cut (DESIGN.md section 4). */
  .still[data-example="builder"] .ab-what .s-open { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
  .still[data-example="builder"] .ab-what .s-meta { white-space: normal; }
  .still[data-example="builder"] .ab-stagecell { min-width: 0; justify-self: end; }
  .still[data-example="builder"] .ab-plans .ab-tr > div:nth-child(3) { grid-column: 2 / -1; justify-self: end; font-size: 12px; color: var(--muted-foreground); }
  /* A tender's own page */
  .still[data-example="builder"] .s-main { padding: 20px 16px; }
  .still[data-example="builder"] .ab-parts { grid-template-columns: minmax(0, 1fr) 64px auto; gap: 4px 12px; }
  .still[data-example="builder"] .ab-part { font-weight: 500; color: var(--foreground); }
  .still[data-example="builder"] .ab-reason { grid-column: 1 / -1; margin-bottom: 8px; color: var(--muted-foreground); }
  .still[data-example="builder"] .ab-verdict .ab-fit .k-meter { display: none; }
  .still[data-example="builder"] .ab-aside { display: none; }
  .still[data-example="builder"] .s-box-foot { flex-wrap: wrap; }
  .still[data-example="builder"] .ab-bid { width: 100%; }
  /* Bids: one column at a time, chosen from the switch above it */
  .still[data-example="builder"] .ab-board { grid-template-columns: minmax(0, 1fr); }
  .still[data-example="builder"] .ab-board[data-col="new"] .ab-col:not([data-stage="new"]), .still[data-example="builder"] .ab-board[data-col="bidding"] .ab-col:not([data-stage="bidding"]), .still[data-example="builder"] .ab-board[data-col="sent"] .ab-col:not([data-stage="sent"]) { display: none; }
  /* Calendar: the grid keeps the marks, and the list under it says what they are */
  .still[data-example="builder"] .ab-caltools .k-legend { order: 3; width: 100%; }
  .still[data-example="builder"] .ab-month-name { min-width: 0; margin-right: auto; }
  .still[data-example="builder"] .ab-cell { min-height: 60px; padding: 4px 3px; gap: 3px; align-items: center; }
  .still[data-example="builder"] .ab-date span, .still[data-example="builder"] .ab-date .badge, .still[data-example="builder"] .ab-ev span { display: none; }
  .still[data-example="builder"] .ab-ev { width: 100%; max-width: 32px; height: 18px; padding: 0; justify-content: center; }
  .still[data-example="builder"] .ab-week span { padding: 0; text-align: center; }
  .still[data-example="builder"] .ab-agenda { display: block; }
  .still[data-example="builder"] .ab-item { display: grid; grid-template-columns: 76px 16px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; padding: 10px 16px; }
  .still[data-example="builder"] .ab-item + .ab-item { border-top: 1px solid var(--border); }
  .still[data-example="builder"] .ab-item > svg { color: var(--muted-foreground); }
  .still[data-example="builder"] .ab-item b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .still[data-example="builder"] .ab-item .s-meta { display: block; margin-top: 0; }
  .still[data-example="builder"] .ab-item .ab-when { line-height: 16px; color: var(--muted-foreground); }
  /* Councils: the sites, then the one picked, then the chart */
  .still[data-example="builder"] .ab-left { display: contents; }
  .still[data-example="builder"] .ab-chosen { order: 1; }
  .still[data-example="builder"] .ab-daily { order: 2; }
  .still[data-example="builder"] .ab-sub { display: block; }
  .still[data-example="builder"] .ab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(15, auto); column-gap: 8px; }
  .still[data-example="builder"] .ab-site { grid-template-columns: minmax(0, 1fr) 28px 18px; gap: 8px; }
  /* Results */
  .still[data-example="builder"] .ab-gaps { column-gap: 8px; }
  .still[data-example="builder"] .ab-gap-name { max-width: 104px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  .still[data-example="builder"] .ab-gap-axis span:nth-child(2), .still[data-example="builder"] .ab-gap-axis span:nth-child(3), .still[data-example="builder"] .ab-gap-axis span:nth-child(5) { display: none; }
  .still[data-example="builder"] .ab-out { align-items: flex-start; }
  .still[data-example="builder"] .ab-out span:last-child { white-space: normal; }
}
