/*
  Custom builds' pictures (docs/pages/service_pages/pictures/custom_builds.py), for /services/custom-builds, linked after
  service-page.css as the page's picture_css. They follow service-page.css's rules for every picture: sizes in em, the font size
  from the box's width (100cqw divided by --w, set here and never inline), so each scales whole from 2560 px to 320, and a box
  under 480 px draws the wide ones 22 em wide with their parts stacked. They reuse its parts (.ui, .ui-box, .ui-label, .ui-kpis,
  .ui-kpi, .ui-value, .ui-tick, .ui-mark) and add their own: a top row, status chips, a platform's mark on a small tile, and the
  parts of Talus Concrete's screens: the owner dashboard, five places a contractor keeps the work, four platform cards, a dry run, a
  task view, an expense table, the readings behind a dashboard and three notes merged into one task. Flat fills only: no stripes,
  no grid, no street lines (Rahul's rule against busy line backgrounds).
*/

/* Each picture's width in em: the header's 34, the stages' 26, the parts of the work 34 */
.ui-own, .ui-today, .ui-exp, .ui-reads, .ui-merge { --w: 34; }
.ui-where, .ui-screens, .ui-switch { --w: 26; }

/* ── Shared parts ── */
/* The top row: the screen's title, a quieter line beside it, and at the right a word or the Example tag */
.ui-top { display: flex; align-items: flex-start; gap: 0.6em; margin-bottom: 0.85em; }
.ui p.ui-top__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1em 0.55em; min-width: 0; }
.ui-top__title b { font-size: 1.05em; font-weight: 650; letter-spacing: -0.015em; }
.ui-top__title span, .ui-top__right { color: var(--slate); font-size: max(0.76em, min(11px, 0.95em)); font-weight: 500; white-space: nowrap; }
.ui-top__right { flex: none; margin-left: auto; font-size: max(0.72em, min(11px, 0.9em)); }
.ui-example {
  flex: none; margin-left: auto; padding: 0.25em 0.6em; border: 0.0625em solid var(--ui-line); border-radius: 9999px;
  background-color: var(--ui-fill); color: var(--slate); font-size: max(0.64em, min(11px, 0.8em)); font-weight: 600; line-height: 1.2; white-space: nowrap;
}

/* A small status chip */
.ui-chip { display: inline-flex; align-items: center; gap: 0.3em; padding: 0.22em 0.65em; border-radius: 9999px; font-size: max(0.68em, min(11px, 0.85em)); font-weight: 650; line-height: 1.3; white-space: nowrap; }
.ui-chip svg { flex: none; width: 1em; height: 1em; stroke-width: 2.6; }
.ui-chip.is-gray { background-color: var(--ui-fill); color: var(--slate); }
.ui-chip.is-blue { background-color: var(--tint); color: var(--anchor-deep); }
.ui-chip.is-amber { background-color: #fef3c7; color: #a15c07; }
.ui-chip.is-red { background-color: #fee4e2; color: #b42318; }
.ui-chip.is-green { background-color: #dcfce7; color: #15803d; }

/* A platform's mark on a small white tile (Simple Icons' marks, in their own color), and the coded screen's code mark in Night */
.ui-brand { display: flex; align-items: center; gap: 0.45em; min-width: 0; }
.ui-brand__name { display: flex; flex-direction: column; min-width: 0; }
.ui-brand b { font-size: 0.82em; font-weight: 650; line-height: 1.2; }
.ui-brand small { color: var(--slate); font-size: max(0.68em, min(11px, 0.85em)); font-weight: 500; line-height: 1.25; }
.ui-brand__mark, .ui-src__mark { display: grid; place-items: center; flex: none; width: 1.8em; height: 1.8em; border-radius: 0.45em; background-color: #fff; box-shadow: inset 0 0 0 0.0625em var(--ui-line); }
.ui-brand__mark .ui-mark, .ui-src__mark .ui-mark { width: 1.1em; height: 1.1em; }
.ui-brand__mark.is-code { background-color: var(--night); color: #fff; box-shadow: none; }
.ui-brand__mark svg, .ui-src__mark svg { width: 1.1em; height: 1.1em; }
.ui-src__mark.is-receipt { color: var(--slate); }

/* A checkbox, drawn empty */
.ui-check { display: block; flex: none; width: 1.1em; height: 1.1em; border-radius: 0.3em; box-shadow: inset 0 0 0 0.13em #aab2c0; }

/* ── The header: the owner dashboard ── */
.ui-own .ui-kpis { margin-top: 0; }
.ui-own .ui-kpi { display: flex; flex-direction: column; align-items: flex-start; }
.ui-own .ui-value { font-size: 1.7em; }
.ui-kpi__sub { margin-top: 0.1em; color: var(--slate); font-size: max(0.72em, min(11px, 0.9em)); font-weight: 500; white-space: nowrap; }
.ui ul.ui-own__flags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5em; margin-top: 0.7em; padding: 0; list-style: none; }
.ui-own__flags li { display: flex; align-items: center; gap: 0.45em; padding: 0.5em 0.7em; border-radius: 0.65em; font-size: max(0.7em, min(11px, 0.875em)); font-weight: 650; line-height: 1.25; }
.ui-own__flags svg { flex: none; width: 1.25em; height: 1.25em; }
.ui-own__flags .is-amber { background-color: #fef3c7; color: #a15c07; }
.ui-own__flags .is-red { background-color: #fee4e2; color: #b42318; }
.ui-own__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em 0.7em; margin-top: 0.8em; }
.ui-own__foot > span { color: var(--slate); font-size: max(0.7em, min(11px, 0.875em)); font-weight: 500; }
.ui .ui-own__foot ul { display: flex; flex-wrap: wrap; gap: 0.4em; padding: 0; list-style: none; }
.ui-own__foot li { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.2em 0.65em 0.2em 0.25em; border: 0.0625em solid var(--ui-line); border-radius: 9999px; font-size: max(0.7em, min(11px, 0.875em)); font-weight: 600; white-space: nowrap; }
.ui-own__foot .ui-src__mark { width: 1.6em; height: 1.6em; box-shadow: none; }

/* ── The three stages. The three cards share one height and the card's bottom edge cuts the white under the last part ── */
.svc-shot--step:has(> :is(.ui-where, .ui-screens, .ui-switch)) { height: auto; }
.svc-shot--step > :is(.ui-where, .ui-screens, .ui-switch) { min-height: 23.2em; margin-bottom: -1em; }

/* Stage 1: five places, each drawn as it looks */
.ui-where__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5em; }
.ui-spot { min-width: 0; padding: 0.5em 0.6em 0.55em; border: 0.0625em solid var(--ui-line); border-radius: 0.65em; }
.ui-spot.is-board { grid-column: 1 / -1; }
.ui p.ui-spot__h { margin-bottom: 0.4em; color: var(--slate); font-size: max(0.68em, min(11px, 0.85em)); font-weight: 650; }
.ui-spot__row { display: flex; align-items: center; gap: 0.8em; }
.ui-board { flex: 1; min-width: 0; padding: 0.4em 0.7em; border: 0.14em solid #cbd2dc; border-radius: 0.4em; background-color: #fff; color: #1d4ed8; font-size: max(0.76em, min(11px, 0.95em)); font-weight: 650; line-height: 1.4; transform: rotate(-0.8deg); }
.ui p.ui-text { flex: none; padding: 0.45em 0.75em; border-radius: 1em 1em 1em 0.25em; background-color: #e9ecf1; font-size: max(0.74em, min(11px, 0.925em)); font-weight: 550; white-space: nowrap; }
.ui ul.ui-files { display: grid; gap: 0.25em; padding: 0; list-style: none; font-size: max(0.68em, min(11px, 0.85em)); }
.ui-files li { display: flex; align-items: center; gap: 0.4em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ui-files svg { flex: none; width: 1.25em; height: 1.25em; color: var(--slate); }
.ui-files li.is-more { padding-left: 1.65em; color: var(--slate); }
.ui-page { position: relative; padding: 0.5em 0.5em 0.5em 1.15em; border-radius: 0.35em; background-color: #fbfaf6; box-shadow: inset 0 0 0 0.0625em #e4e0d4; }
.ui-page::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0.6em; width: 0.0625em; background-color: #f0b8b8; }
.ui p.ui-sticky { padding: 0.4em 0.5em; background-color: #fde68a; color: #4a3b0b; font-size: max(0.72em, min(11px, 0.9em)); font-weight: 600; line-height: 1.3; transform: rotate(-2deg); box-shadow: 0 0.15em 0.3em rgb(12 14 18 / 0.14); }
.ui p.ui-mailrow { display: flex; align-items: center; gap: 0.45em; padding: 0.4em 0.55em; border-radius: 0.5em; background-color: var(--ui-fill); font-size: max(0.72em, min(11px, 0.9em)); font-weight: 550; }
.ui-mailrow svg { flex: none; width: 1.25em; height: 1.25em; color: var(--slate); }
.ui ul.ui-inv { display: grid; gap: 0.4em; padding: 0.15em 0 0; list-style: none; }
.ui-inv li { height: 0.55em; border-radius: 0.3em; background-color: #e3e7ed; }
.ui-inv li:nth-child(2) { width: 82%; }
.ui-inv li:nth-child(3) { width: 62%; }
.ui p.ui-where__foot { margin-top: 0.55em; }

/* Stage 2: four platform cards and what each opens on */
.ui-screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 0.6em; }
.ui-screens__card { min-width: 0; padding: 0.75em 0.8em 0.85em; border: 0.0625em solid var(--ui-line); border-radius: 0.75em; }
.ui-screens__card ul { display: flex; flex-wrap: wrap; gap: 0.3em; margin-top: 0.7em; padding: 0; list-style: none; }
.ui-screens__card li { padding: 0.25em 0.65em; border-radius: 9999px; background-color: var(--ui-fill); color: var(--slate); font-size: max(0.7em, min(11px, 0.875em)); font-weight: 600; line-height: 1.3; }
.ui-screens__card li.is-on { background-color: var(--tint); color: var(--anchor-deep); }

/* Stage 3: the dry run, ticked, and what it turned up, in amber */
.ui-switch { display: grid; align-content: start; gap: 0.6em; }
.ui-switch .ui-box { padding: 0.75em 0.85em; }
.ui-switch .ui-box.is-fix { border-color: #fcd98a; background-color: #fffbeb; }
.ui p.ui-box__head { margin-bottom: 0.65em; }
.ui .ui-switch__ok, .ui .ui-switch__fix { display: grid; gap: 0.45em; padding: 0; list-style: none; }
.ui-switch__ok li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.55em; font-size: max(0.76em, min(11px, 0.95em)); font-weight: 550; }
.ui-switch__ok b { font-weight: 700; font-variant-numeric: tabular-nums; }
.ui-switch__ok .ui-tick { width: 1.25em; height: 1.25em; }
.ui-switch__fix li { display: flex; align-items: flex-start; gap: 0.5em; color: #78450a; font-size: max(0.76em, min(11px, 0.95em)); font-weight: 600; line-height: 1.3; }
.ui-switch__fix svg { flex: none; width: 1.25em; height: 1.25em; margin-top: 0.02em; color: #b45309; }

/* ── Row 1: Talus HQ's Today view ── */
.ui .ui-today__tabs { display: flex; gap: 0.15em; margin: 0 0 0.85em; padding: 0; list-style: none; border-bottom: 0.0625em solid var(--ui-line); }
.ui-today__tabs li { padding: 0.35em 0.8em; color: var(--slate); font-size: max(0.76em, min(11px, 0.95em)); font-weight: 600; }
.ui-today__tabs li.is-on { color: var(--anchor-deep); box-shadow: inset 0 -0.16em 0 var(--chart); }
.ui-today__body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.1em; }
.ui ul.ui-tasks { display: grid; padding: 0; list-style: none; }
.ui-task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.5em; padding: 0.55em 0; border-top: 0.0625em solid var(--ui-line); font-size: max(0.78em, min(11px, 0.975em)); font-weight: 550; line-height: 1.25; }
.ui-task:first-child { padding-top: 0; border-top: 0; }
.ui-today__main .ui-today__h { margin-top: 1em; }
.ui-task__due { min-width: 2.7em; color: var(--slate); font-size: 0.86em; font-weight: 600; text-align: right; }
.ui-task__due.is-late { color: var(--bad); }
.ui-task .ui-chip { font-size: 0.86em; }
.ui p.ui-today__repeat { display: flex; align-items: center; gap: 0.5em; padding: 0.55em 0.7em; border-radius: 0.6em; background-color: var(--ui-fill); font-size: max(0.76em, min(11px, 0.95em)); font-weight: 600; }
.ui-today__repeat svg { flex: none; width: 1.25em; height: 1.25em; color: var(--chart); }
.ui-today__repeat small { margin-left: auto; color: var(--slate); font-size: 0.86em; font-weight: 500; white-space: nowrap; }
.ui p.ui-today__h { margin: 0 0 0.55em; color: var(--slate); font-size: max(0.68em, min(11px, 0.85em)); font-weight: 650; }
.ui p.ui-today__h:not(:first-child) { margin-top: 1.1em; }
.ui ul.ui-projects { display: grid; gap: 0.75em; padding: 0; list-style: none; }
.ui-projects p { display: flex; justify-content: space-between; gap: 0.4em; font-size: max(0.76em, min(11px, 0.95em)); line-height: 1.25; }
.ui-projects b { font-weight: 650; }
.ui-projects span { color: var(--slate); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ui-bar { display: block; height: 0.5em; margin-top: 0.4em; border-radius: 9999px; }
.ui-bar.is-4of6 { background: linear-gradient(90deg, var(--chart) 0 66.67%, var(--ui-fill) 66.67%); }
.ui-bar.is-2of6 { background: linear-gradient(90deg, var(--chart) 0 33.33%, var(--ui-fill) 33.33%); }
.ui p.ui-file { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.4em 0.75em; border: 0.0625em solid var(--ui-line); border-radius: 0.6em; font-size: max(0.76em, min(11px, 0.95em)); font-weight: 600; }
.ui-file svg { flex: none; width: 1.25em; height: 1.25em; color: var(--slate); }

/* ── Row 2: November's expenses ── */
.ui p.ui-exp__head, .ui-exp__row { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.1fr) minmax(0, 1fr) auto 1.3em; align-items: center; column-gap: 0.7em; }
.ui p.ui-exp__head { padding-bottom: 0.55em; color: var(--slate); font-size: max(0.64em, min(11px, 0.8em)); font-weight: 600; }
.ui-exp__head span:nth-child(4), .ui-exp__amt { min-width: 3.6em; text-align: right; }
.ui ul.ui-exp__list { display: grid; padding: 0; list-style: none; }
.ui-exp__row { padding: 0.55em 0; border-top: 0.0625em solid var(--ui-line); font-size: max(0.78em, min(11px, 0.975em)); font-weight: 550; line-height: 1.25; }
.ui-exp__vendor { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25em 0.5em; min-width: 0; }
.ui-exp__vendor b { font-weight: 650; }
.ui-exp__vendor .ui-chip { font-size: 0.86em; }
.ui-exp__cat, .ui-exp__pay { color: var(--slate); }
.ui-exp__amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.ui-exp__clip svg { display: block; width: 1.2em; height: 1.2em; color: var(--slate); }
.ui-exp__more { padding: 0.5em 0; border-top: 0.0625em solid var(--ui-line); color: var(--slate); font-size: max(0.7em, min(11px, 0.875em)); font-weight: 550; }   /* the bills not shown, under the same total */
.ui p.ui-exp__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 0.2em; padding-top: 0.7em; border-top: 0.0625em solid var(--night); font-size: 0.84em; font-weight: 600; }
.ui-exp__total b { font-size: 1.1em; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Row 3: where the numbers come from ── */
.ui ul.ui-reads__list { display: grid; gap: 0.6em; padding: 0; list-style: none; }
.ui-reads__row { display: grid; grid-template-columns: 8.6em 1.2em minmax(0, 1fr) 1.2em 8.2em; align-items: center; gap: 0.4em; }
.ui-reads__src, .ui-reads__fields, .ui-reads__tile { min-width: 0; padding: 0.6em 0.7em; border-radius: 0.65em; font-size: max(0.76em, min(11px, 0.95em)); font-weight: 600; line-height: 1.3; }
.ui-reads__src { display: flex; align-items: center; gap: 0.5em; border: 0.0625em solid var(--ui-line); }
.ui-reads__src .ui-src__mark { box-shadow: none; }
.ui-reads__fields { background-color: var(--ui-fill); color: var(--slate); font-weight: 500; }
.ui-reads__tile { background-color: var(--tint); color: var(--anchor-deep); text-align: center; }
.ui-reads__arrow { display: grid; place-items: center; color: #8a93a3; }
.ui-reads__arrow svg { width: 1.2em; height: 1.2em; }
.ui p.ui-reads__when { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3em 1em; margin-top: 0.9em; padding-top: 0.75em; border-top: 0.0625em solid var(--ui-line); color: var(--slate); font-size: max(0.72em, min(11px, 0.9em)); font-weight: 550; }
.ui-reads__when svg { width: 1.25em; height: 1.25em; }

/* ── Row 4: one job, three notes, one task ── */
.ui-merge__body { display: grid; grid-template-columns: minmax(0, 1fr) 2.2em minmax(0, 1fr); align-items: center; gap: 0.5em; }
.ui p.ui-merge__h { margin-bottom: 0.55em; color: var(--slate); font-size: max(0.68em, min(11px, 0.85em)); font-weight: 650; }
.ui ul.ui-notes { display: grid; gap: 0.55em; padding: 0; list-style: none; }
.ui-note { padding: 0.55em 0.7em; font-size: max(0.76em, min(11px, 0.95em)); font-weight: 550; line-height: 1.3; }
.ui-note.is-sticky { border-radius: 0.25em; background-color: #fde68a; color: #4a3b0b; transform: rotate(-1.5deg); box-shadow: 0 0.15em 0.3em rgb(12 14 18 / 0.14); }
.ui-note.is-book { border-radius: 0.25em; background-color: #fbfaf6; box-shadow: inset 0 0 0 0.0625em #e4e0d4, inset 0 -0.14em 0 #d9d4c5; }
.ui-note.is-text { border-radius: 1em 1em 1em 0.25em; background-color: #e9ecf1; }
.ui-merge__arrow { display: grid; place-items: center; color: var(--chart); }
.ui-merge__arrow svg { width: 1.7em; height: 1.7em; stroke-width: 2.4; }
.ui-merged { padding: 0.85em 0.9em; border: 0.0625em solid var(--ui-line); border-radius: 0.8em; box-shadow: 0 0.06em 0.15em rgb(12 14 18 / 0.06), 0 0.5em 1.2em rgb(12 14 18 / 0.08); }
.ui p.ui-merged__t { display: flex; align-items: center; gap: 0.55em; font-size: 0.88em; font-weight: 650; line-height: 1.3; }
.ui p.ui-merged__chips { display: flex; flex-wrap: wrap; gap: 0.35em; margin-top: 0.75em; }
.ui p.ui-merge__foot { margin-top: 1em; text-align: right; }

/* ── Narrow boxes ── */
/* The stages in a card under 340 px (phones, and the three side by side from 1024 to 1365 px): drawn 22 em wide so the words stay readable */
@container (max-width: 339px) {
  .ui-where, .ui-screens, .ui-switch { --w: 22; }
  .svc-shot--step > :is(.ui-where, .ui-screens, .ui-switch) { min-height: 24.5em; }
  .ui-chip { font-size: max(0.72em, min(11px, 0.9em)); }
}

/* The header's card under 440 px (phones, and from 1024 to about 1240 px): 22 em wide, the three tiles a size down */
@container (max-width: 439px) {
  .ui-own { --w: 22; }
  .ui-own .ui-value { font-size: 1.35em; }
  .ui-own .ui-kpi .ui-label { white-space: normal; }
  .ui-own .ui-kpi { padding: 0.6em 0.6em; }
  .ui ul.ui-own__flags { grid-template-columns: minmax(0, 1fr); }
  .ui-example, .ui-top__right { font-size: max(0.7em, min(11px, 0.875em)); }
  .ui-own__foot li { font-size: max(0.74em, min(11px, 0.925em)); }
}

/* A box under 480 px (a phone, and the rows from 1024 to 1249 px): the wide pictures 22 em wide, their parts stacked */
@container (max-width: 479px) {
  .ui-today, .ui-exp, .ui-reads, .ui-merge { --w: 22; }
  .ui-example { font-size: max(0.7em, min(11px, 0.875em)); }
  /* Today: the projects and resources under the tasks */
  .ui-today__body { grid-template-columns: minmax(0, 1fr); gap: 0.9em; }
  .ui-task { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 0.25em; }
  .ui-task .ui-check { grid-row: 1 / span 2; align-self: start; margin-top: 0.1em; }
  .ui-task__t { grid-column: 2 / span 2; }
  .ui-task .ui-chip { grid-column: 2; justify-self: start; }
  .ui-task__due { grid-column: 3; }
  /* Expenses: each bill on two lines, the vendor and amount over the category and how it was paid */
  .ui p.ui-exp__head { display: none; }
  .ui-exp__row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto 1.3em; row-gap: 0.2em; }
  .ui-exp__vendor { grid-column: 1 / span 2; }
  .ui-exp__amt { grid-column: 3; grid-row: 1; }
  .ui-exp__clip { grid-column: 4; grid-row: 1; }
  .ui-exp__cat { grid-column: 1; grid-row: 2; font-size: 0.9em; }
  .ui-exp__pay { grid-column: 2 / span 3; grid-row: 2; font-size: 0.9em; }
  /* Where the numbers come from: the source over its fields and tile */
  .ui-reads__row { grid-template-columns: minmax(0, 1fr) 1.2em minmax(0, 0.8fr); row-gap: 0.4em; }
  .ui-reads__src { grid-column: 1 / -1; }
  .ui-reads__row > .ui-reads__arrow:nth-child(2) { display: none; }
  .ui-reads__fields { grid-column: 1; }
  .ui-reads__tile { grid-column: 3; }
  /* One job, three notes: the arrow points down */
  .ui-merge__body { grid-template-columns: minmax(0, 1fr); gap: 0.4em; }
  .ui-merge__arrow { transform: rotate(90deg); height: 1.8em; }
}

/* The calm pass (2026-11-17): the step pictures hold fewer parts and draw larger; every picture larger on a phone */
.svc-calm :is(.ui-screens, .ui-switch) { --w: 18; }
.svc-calm .ui-where { --w: 18; }   /* a long file name ends in an ellipsis, as a file list does */
.svc-calm :is(.ui-today, .ui-exp) { --w: 31; }
@media (max-width: 767px) {
  .svc-calm :is(.ui-screens, .ui-switch) { --w: 16.5; }
  .svc-calm .ui-where { --w: 16.5; }
  .svc-calm :is(.ui-today, .ui-exp, .ui-reads, .ui-merge) { --w: 18; }
}
.svc-calm .svc-shot--step > :is(.ui-where, .ui-screens, .ui-switch) { min-height: calc(100% + 1.5em); }   /* fewer parts: no tall empty card */
