/* Cost backup (Bradbury Company section, FR-527 to FR-538, AD-43): the search, an order's or job's four tabs, a part's
   history and the standard rates. Built from the site's own panels, tables, chips and tokens, so light and dark come
   from the theme. Layout is CSS alone (AD-12): figure tiles and cards wrap from a row to one column, and every wide
   table scrolls inside its own box with its first column kept in view. Read at 390, 820, 1180 and 1440 wide. */

.cb-page h2.panel-title, .cb-page h3 { margin: 0; }
.cb-page .cb-panel-header { gap: 8px 10px; flex-wrap: wrap; }
.cb-page .cb-notice { margin-block-end: 10px; }
.cb-page .cb-notice a { margin-inline-start: 6px; }
.cb-header-link { font-weight: 600; white-space: nowrap; }

/* Dense data tables: figures right-aligned and tabular, descriptions allowed to wrap but never squeezed to nothing. */
.cb-table th, .cb-table td { padding: 6px 8px; }
.cb-table td.num, .cb-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-table .cb-desc { min-width: 160px; overflow-wrap: anywhere; }
.cb-table tr.cb-total td, .cb-table tr.cb-total th { font-weight: 600; border-top: 1px solid var(--colorNeutralStroke1, #d1d1d1); }
.cb-table tfoot td { background: var(--app-surface); }
.cb-table tr.cb-unticked td { color: var(--app-muted); }
.cb-table tr.cb-unfinished td { color: var(--app-text-2); }
/* A row's own heading (a figure's name, a group) reads as text, not as the column headings' small capitals. */
.cb-table tbody th {
    text-align: left; font-weight: 400; font-size: 14px; letter-spacing: normal; text-transform: none; color: var(--app-text);
    padding: 6px 8px; border-bottom: var(--app-border); position: static; background: none; white-space: normal;
}
.cb-table tbody tr:last-child th { border-bottom: 0; }
.cb-mark { margin-inline-start: 6px; height: auto; min-height: 20px; line-height: 18px; white-space: normal; }
.cb-lines { min-width: 220px; color: var(--app-text-2); font-size: 13px; }

/* A wide table scrolls in its own box; its first column (the job or part) stays in view as it does. */
.cb-scroll { max-width: 100%; }
.cb-sticky-first :is(th:first-child, td:first-child) {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    box-shadow: 1px 0 0 var(--colorNeutralStroke2, #e0e0e0);
}
.cb-sticky-first td:first-child { background: var(--app-surface); }
.cb-sticky-first thead th:first-child { z-index: 2; background: var(--app-inset, var(--app-surface)); }

/* ---------- The search ---------- */

.cb-search { display: flex; align-items: center; gap: 8px; max-width: 720px; margin-block-end: 6px; }
.cb-search .cb-search-box { flex: 1 1 auto; height: 36px; font-size: 15px; }
.cb-search fluent-button { flex: none; }
.cb-groups { display: grid; gap: 12px; margin-block-start: 12px; }
.cb-group .panel-header { min-height: 40px; }
.cb-group-note { margin: 0; padding: 10px 14px; }
.cb-group fluent-progress-bar { display: block; margin: 8px 14px; }

/* ---------- An order or a job ---------- */

.cb-order .record-sub .cb-price { color: var(--app-text); font-variant-numeric: tabular-nums; }
/* The tab strip scrolls sideways on its own on a phone, where the four tabs are wider than the screen. */
.cb-tabs { margin-block-end: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.cb-tabs::-webkit-scrollbar { display: none; }
.cb-tabs > fluent-tablist { width: max-content; }
.cb-panel { display: grid; gap: 12px; min-width: 0; }
.cb-panel > * { min-width: 0; }
.cb-loading { display: grid; gap: 12px; padding-block: 8px; }
.cb-loading.panel { padding: 12px 14px; }
.cb-loading p { margin: 0; }

/* The figures that matter: a row of tiles, kept in view while the page scrolls on a screen with room for it. */
.cb-figures-wrap { display: grid; gap: 6px; }
/* Each tile draws its own right and bottom line and reaches a pixel past its cell, so the box clips the lines at its
   edges and a row that isn't full leaves plain surface, not a grey block. */
.cb-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    border: var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-surface);
    overflow: hidden;
}
.cb-figures > div {
    display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; min-width: 0;
    margin: 0 -1px -1px 0; background: var(--app-surface); box-shadow: inset -1px -1px 0 var(--colorNeutralStroke2, #e0e0e0);
}
.cb-figures strong { font-size: 20px; line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cb-figures > .cb-figure-price { background: var(--colorBrandBackground2, #ebf3fc); }
.cb-figure-label { font-size: 12px; color: var(--app-muted); }
.cb-tried { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }

/* ---------- The report's pages (Dan, 2026-11-29: laid out as the Power BI report "for now") ---------- */

/* The Cost Backup page as one canvas: the report's boxes on a grid whose tracks are the report's own widths on its
   1280 x 720 page, so each box sits where the report has it, with the workspace's Jobs and Items lists in a column down
   the right, where the report keeps its lists (design D12). The estimate takes the report's table of counted jobs, top
   left, with more height than the report gives it, as it is where rows are ticked. On a laptop or wider the canvas
   takes the screen's height left under the tabs, as the report fits its page, and each box and list scrolls inside
   itself; narrower, everything reflows by the canvas's own width (a container query), the lists first, then the
   report's reading order. */
.cb-panel { container-type: inline-size; }
.cb-canvas-wrap { container-type: inline-size; }
.cb-canvas {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "lists" "est" "ref" "eng" "mfg" "assy" "test" "sof" "avg" "mech" "mat" "figs";
}
.cb-canvas > * { min-width: 0; min-height: 0; }
.cb-area-lists { grid-area: lists; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 0; }
.cb-area-est { grid-area: est; }
.cb-area-ref { grid-area: ref; }
.cb-area-eng { grid-area: eng; }
.cb-area-mfg { grid-area: mfg; }
.cb-area-assy { grid-area: assy; }
.cb-area-test { grid-area: test; }
.cb-area-mat { grid-area: mat; }
.cb-area-sof { grid-area: sof; }
.cb-area-avg { grid-area: avg; }
.cb-area-mech { grid-area: mech; }
.cb-area-figs { grid-area: figs; }
@container (min-width: 560px) {
    .cb-canvas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: "lists lists" "est est" "ref ref" "eng mfg" "assy test" "sof avg" "mech mech" "mat figs";
    }
    .cb-area-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 720px) {
    .cb-canvas {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-areas: "lists lists lists" "est est ref" "eng mfg assy" "test sof avg" "mech mech mech" "mat figs figs";
    }
}
/* Narrower than a laptop, a box or list grows with its rows up to a height, then scrolls inside itself. */
@container (max-width: 879px) {
    .cb-canvas .cb-box-body { max-height: 260px; }
    .cb-canvas .cb-area-est .cb-box-body { max-height: 380px; }
    .cb-canvas .cb-list { min-height: 200px; max-height: 380px; }
}
@container (min-width: 880px) {
    .cb-canvas {
        grid-template-columns: 200fr 200fr 200fr 100fr 100fr 241fr minmax(260px, 27%);
        grid-template-rows: minmax(0, 220fr) minmax(0, 185fr) minmax(0, 185fr) minmax(0, 75fr);
        grid-template-areas:
            "est est est est est ref lists"
            "eng mfg assy test test mat lists"
            "sof mech mech mech figs figs lists"
            "avg mech mech mech figs figs lists";
        height: clamp(560px, calc(100dvh - 240px), 860px);
    }
    .cb-area-lists { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
}
@container (min-width: 1400px) {
    .cb-canvas { grid-template-columns: 200fr 200fr 200fr 100fr 100fr 241fr minmax(300px, 25%); }
}

/* A box: the report's title, and a body that scrolls when its rows don't fit. */
.cb-box { display: flex; flex-direction: column; overflow: hidden; }
.cb-box-title { margin: 0; padding: 7px 10px 4px; font-size: 13px; font-weight: 650; line-height: 1.3; }
.cb-box-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 5px 10px 4px; flex: none; }
.cb-box-head .cb-box-title { padding: 0; }
.cb-box-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.cb-box-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cb-box-table th {
    position: sticky; top: 0; z-index: 1; padding: 3px 8px; text-align: left; font-size: 11px; font-weight: 600;
    color: var(--app-muted); background: var(--app-surface); border-bottom: var(--app-border); white-space: nowrap;
}
.cb-box-table td { padding: 3px 8px; border-bottom: var(--app-border); vertical-align: top; overflow-wrap: anywhere; }
.cb-box-table :is(th, td).num { text-align: right; white-space: nowrap; overflow-wrap: normal; }
.cb-box-table tfoot td { position: sticky; bottom: 0; font-weight: 650; background: var(--app-surface); border-top: 1px solid var(--colorNeutralStroke1, #d1d1d1); border-bottom: 0; }
.cb-box-note { margin: 0; padding: 4px 8px 6px; font-size: 11px; overflow-wrap: anywhere; }

/* Reference: the order number and customer, values over their names, as the report's card has them; one over the other
   when the card is narrow. */
.cb-area-ref { container-type: inline-size; }
.cb-ref { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 20px; align-content: center; padding: 0 12px 8px; }
@container (min-width: 300px) {
    .cb-ref { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr); }
}
.cb-ref > div, .cb-avg { display: flex; flex-direction: column; min-width: 0; }
.cb-ref strong, .cb-avg strong { font-size: 17px; line-height: 1.25; font-weight: 650; overflow-wrap: anywhere; }
.cb-avg { padding: 0 10px 6px; }
.cb-avg strong { font-size: 18px; }
.cb-avg .small { font-size: 11px; }
.cb-box > .cb-box-title, .cb-box > .cb-tick-choice { flex: none; }
.cb-box-head .cb-tick-choice button { padding: 2px 8px; font-size: 12px; line-height: 18px; }
.cb-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The estimate: the report's table of counted jobs grown to a row a job and item, each with its tick. A row not
   counted is muted; one already inside a counted row says so. Narrow, the quantity and then the kind give way. */
.cb-area-est { container-type: inline-size; }
.cb-estimate .cb-tick-cell { width: 22px; padding-inline-end: 0; }
.cb-estimate .cb-tick-cell input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--colorBrandBackground, #0f6cbd); }
.cb-estimate tbody tr.off td { color: var(--app-muted); }
.cb-estimate tbody tr.off a { color: inherit; }
.cb-estimate .cb-est-desc { min-width: 110px; }
.cb-estimate .cb-under { font-size: 11px; color: var(--app-muted); }
.cb-estimate .cb-under.cb-warn { color: var(--app-warning); }
.cb-estimate tr.cb-est-group td {
    padding: 6px 8px 3px; font-size: 11.5px; font-weight: 650; color: var(--app-text);
    background: var(--colorNeutralBackground2, #fafafa); border-bottom: var(--app-border);
}
.cb-estimate tr.cb-est-note td { padding-top: 6px; border-bottom: 0; }
@container (max-width: 560px) {
    .cb-estimate .cb-est-qty { display: none; }
}
@container (max-width: 440px) {
    .cb-estimate .cb-est-kind { display: none; }
}

/* An item's kind, as small as a word can be: components brand, made parts neutral, materials warm. */
.cb-kindmark {
    display: inline-block; padding: 0 6px; border-radius: 9px; font-size: 10.5px; font-weight: 600; line-height: 16px;
    white-space: nowrap; color: var(--app-text-2); background: var(--colorNeutralBackground3, #f0f0f0);
}
.cb-kindmark-1 { color: var(--colorBrandForeground1, #0f6cbd); background: var(--colorBrandBackground2, #ebf3fc); }
.cb-kindmark-3 { color: var(--colorPaletteMarigoldForeground2, #8a5a00); background: var(--colorPaletteMarigoldBackground1, #fdf6e7); }

/* The Jobs and Items lists: Dan's searchable filter lists (design D12), each a title with its count and Clear, a search
   box, and rows with a tick; ticked rows at the top. Each takes half the column and scrolls inside itself. */
.cb-list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.cb-list-head { display: flex; align-items: baseline; gap: 8px; padding: 7px 10px 2px; flex: none; }
.cb-list-head .cb-box-title { padding: 0; }
.cb-list-search { flex: none; margin: 4px 10px 6px; width: calc(100% - 20px); min-height: 30px; font-size: 13px; }
.cb-kinds { flex: none; margin: 0 10px 6px; align-self: flex-start; max-width: calc(100% - 20px); flex-wrap: wrap; }
.cb-kinds button { padding: 2px 8px; font-size: 12px; line-height: 18px; }
.cb-list-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding-block-end: 4px; }
.cb-pick { display: flex; align-items: flex-start; gap: 8px; padding: 4px 10px; }
.cb-pick + .cb-pick { border-top: 1px solid var(--colorNeutralStroke3, #f0f0f0); }
.cb-pick.on { background: var(--colorBrandBackground2, #ebf3fc); }
.cb-pick input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--colorBrandBackground, #0f6cbd); }
.cb-pick label { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; cursor: pointer; font-size: 12.5px; line-height: 1.35; }
.cb-pick-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cb-pick-line strong { font-weight: 650; white-space: nowrap; }
.cb-pick-name, .cb-pick-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-pick-name { color: var(--app-text-2); }
.cb-pick-meta { color: var(--app-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.cb-pick-open { flex: none; display: inline-flex; padding: 2px; border-radius: 4px; opacity: 0.65; }
.cb-pick-open:hover, .cb-pick-open:focus-visible { opacity: 1; }
.cb-list-divider { margin: 4px 10px; border-top: var(--app-border); }
.cb-list-note { margin: 6px 10px; font-size: 12px; line-height: 1.35; }
.cb-clear {
    padding: 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
    color: var(--colorBrandForeground1, #0f6cbd);
}
.cb-clear:disabled { color: var(--app-muted); cursor: default; font-weight: 400; }

/* Narrowing you can see (Dan, 2026-12-01, FR-539, FR-540): a line under a list's title naming what narrows it, how many rows
   are left and the control that undoes it; the list's edge in the brand colour while narrowed; and a short highlight
   when the narrowing changes, drawn again by a fresh element each time, CSS only and none under reduced motion. The
   list the workspace opens with has the same line, quieter. */
.cb-list { position: relative; }
.cb-list.narrowed { border-color: var(--colorBrandStroke1, #479ef5); }
.cb-list-narrow {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; flex: none;
    margin: 2px 10px 0; padding: 4px 8px; border-radius: 6px; font-size: 12px; line-height: 1.35;
    color: var(--colorBrandForeground1, #0f6cbd); background: var(--colorBrandBackground2, #ebf3fc);
}
.cb-list-narrow > span { min-width: 0; font-weight: 600; }
.cb-list-narrow .cb-clear { font-size: 12px; }
.cb-list-narrow.cb-list-default { color: var(--app-muted); background: transparent; padding-block: 0; }
.cb-list-narrow.cb-list-default > span { font-weight: 400; }
.cb-list-flash {
    position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
    animation: cb-list-flash 900ms ease-out both;
}
@keyframes cb-list-flash {
    from { box-shadow: inset 0 0 0 2px var(--colorBrandStroke1, #479ef5); background: color-mix(in srgb, var(--colorBrandBackground2, #ebf3fc) 55%, transparent); }
    to { box-shadow: inset 0 0 0 2px transparent; background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .cb-list-flash { display: none; animation: none; }
}

/* The report's figure cards: Total Base Cost and Warranty, Total Cost alone under them, then the two divisors. The
   figures size to the cards' column, so a seven-figure price stays on one line beside the lists. */
.cb-figure-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "base warranty" "total total" "a b" "tools tools";
    align-content: start;
    gap: 6px 8px;
    container-type: inline-size;
}
.cb-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0;
    padding: 6px 8px; text-align: center; background: var(--app-surface); border: var(--app-border);
    border-radius: var(--app-radius); box-shadow: var(--app-shadow, none);
}
.cb-card strong {
    font-size: clamp(15px, 7.4cqi, 22px); line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.cb-card-base { grid-area: base; }
.cb-card-warranty { grid-area: warranty; }
.cb-card-total { grid-area: total; justify-self: center; width: calc(50% - 5px); }
.cb-card-a { grid-area: a; }
.cb-card-b { grid-area: b; }
.cb-card-price { background: var(--colorBrandBackground2, #ebf3fc); }
.cb-figure-tools { grid-area: tools; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; }
@container (min-width: 880px) {
    .cb-figure-cards { grid-template-rows: repeat(3, minmax(0, 1fr)) auto; height: 100%; }
}

.cb-beyond { margin: 18px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--app-muted); }

/* The Materials page: its table on the left and its four lists stacked on the right, as the report has them; above the
   table when the panel is narrower than a laptop's. */
.cb-materials-page { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; align-items: start; }
.cb-materials-page > .cb-filters {
    flex-direction: column; flex-wrap: nowrap; padding: 12px; border: var(--app-border); border-radius: var(--app-radius);
    background: var(--app-surface);
}
.cb-materials-page > .cb-filters > label { flex: none; min-width: 0; }
@container (max-width: 879px) {
    .cb-materials-page { grid-template-columns: minmax(0, 1fr); }
    .cb-materials-page > .cb-filters { order: -1; flex-direction: row; flex-wrap: wrap; }
    .cb-materials-page > .cb-filters > label { flex: 0 1 220px; min-width: min(100%, 160px); }
}

/* Ref OE performance: the report's two cards across, values over their names. */
.cb-oe { display: grid; gap: 14px; margin-block-end: 4px; }
.cb-oe-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; padding: 18px 24px; }
.cb-oe-card > div { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; }
.cb-oe-card strong { font-size: 24px; line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@container (max-width: 559px) {
    .cb-oe-card { grid-template-columns: minmax(0, 1fr); padding: 14px; }
}

/* The component jobs: the part number over its description, so the twelve columns fit a laptop's width. */
.cb-jobs .cb-table { font-size: 13px; }
.cb-jobs .cb-part-cell { min-width: 190px; }
.cb-part-desc { display: block; color: var(--app-text-2); }
.cb-part-desc > .muted { margin-inline-start: 4px; }
.cb-tick { display: inline-flex; align-items: center; gap: 8px; }
.cb-tick input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--colorBrandBackground, #0f6cbd); }
.cb-tick label { font-weight: 600; cursor: pointer; }
.cb-tick-choice button { font-size: 13px; padding: 4px 12px; }
.cb-tick-choice button:disabled { color: var(--app-muted); cursor: default; opacity: 0.6; }

/* How the total base cost is made, the rates and the materials by group: cards that wrap. */
.cb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; align-items: start; }
.cb-cards > .panel { min-width: 0; }
.cb-buildup-table td.muted { color: var(--app-muted); font-size: 13px; }
.cb-card-foot { margin: 0; padding: 8px 14px; }
.cb-card-foot + .cb-card-foot { padding-block-start: 0; }
.cb-average { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; border-top: var(--app-border); padding-block-start: 10px; }
.cb-average strong { font-size: 16px; }

.cb-rates.tried { border-color: var(--app-warning); }
.cb-rates-body { display: grid; gap: 10px; }
.cb-rate-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; margin: 0; font-size: 13px; }
.cb-rate-list > div { display: flex; justify-content: space-between; gap: 8px; min-width: 0; padding: 2px 0; border-bottom: var(--app-border); }
.cb-rate-list dt { color: var(--app-muted); }
.cb-rate-list dd { margin: 0; font-weight: 600; }
.cb-rate-list > .differs dd, .cb-rate-fields > .differs > span:first-child { color: var(--app-warning); }
.cb-rate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.cb-rate-fields > label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; color: var(--app-text-2); }
.cb-rate-fields .field-error { margin: 0; }
.cb-rates-link { justify-self: start; }
.cb-rate-list-wide, .cb-rate-fields-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); max-width: 980px; }
.cb-rate-list-wide { font-size: 14px; }
@media (max-width: 479px) {
    .cb-rate-list, .cb-rate-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Hours by group: one card a group, wrapping from a row to one column. */
.cb-hours { display: grid; gap: 8px; }
.cb-section-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cb-hour-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; align-items: start; }
.cb-hour-card { min-width: 0; overflow: hidden; }
.cb-hour-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: var(--app-border); }
.cb-hour-head h3 { font-size: 14px; font-weight: 650; }
.cb-hour-head strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.cb-hour-none { margin: 0; padding: 6px 12px 8px; overflow-wrap: anywhere; }
.cb-hour-rows + .cb-hour-none { border-top: var(--app-border); }
.cb-hour-rows { width: 100%; border-collapse: collapse; font-size: 13px; }
.cb-hour-rows th, .cb-hour-rows td { padding: 4px 12px; border-bottom: var(--app-border); vertical-align: top; }
.cb-hour-rows tr:last-child :is(th, td) { border-bottom: 0; }
.cb-hour-rows th { text-align: left; font-weight: 400; overflow-wrap: anywhere; }
.cb-hour-rows td.num { width: 1%; padding-inline-start: 4px; }
.cb-hour-key { font-weight: 600; margin-inline-end: 6px; }

/* The Components tab: a component's row opens its sub-jobs, indented under the one each was made for. */
.cb-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 4px; margin-inline-start: -4px;
    border: 0; border-radius: 4px; background: transparent; color: var(--app-text); font: inherit; cursor: pointer;
}
.cb-toggle:hover { background: var(--colorNeutralBackground1Hover, #f5f5f5); }
.cb-toggle:focus-visible { outline: 2px solid var(--app-brand); outline-offset: 0; }
.cb-toggle .nav-caret { color: var(--app-muted); }
.cb-tree tr.cb-component-row td { background: var(--colorNeutralBackground2, #fafafa); }
.cb-tree tr.cb-component-row td:first-child { background: var(--colorNeutralBackground2, #fafafa); }
.cb-tree tr.cb-sub-row td { font-size: 13px; }
.cb-indent { display: inline-block; padding-inline-start: calc(var(--depth, 0) * 14px); }

/* A part's history: the line saying the builds are narrowed to the search's words, and the builds' ten columns with the
   status, customer and a piece's figures under the job's, so the table fits 1440 with the menu open. */
.cb-narrowed { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; font-size: 14px; }
.cb-narrowed a { font-weight: 600; }
.cb-builds-table { font-size: 13px; }
.cb-builds-table .cb-desc { min-width: 150px; }
.cb-builds-table .cb-order-cell { min-width: 140px; overflow-wrap: anywhere; }
.cb-under { display: block; font-size: 12px; font-weight: 400; }
.cb-kind { display: inline-flex; margin-top: 3px; }

/* The Materials tab's filters: one row on a wide screen, stacked on a phone. */
.cb-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; border-bottom: var(--app-border); }
.cb-filters > label { display: flex; flex-direction: column; gap: 4px; flex: 0 1 220px; min-width: min(100%, 160px); font-size: 12px; color: var(--app-text-2); }
.cb-filters > .cb-filter-text { flex: 1 1 260px; }
.cb-materials .list-footer { padding: 8px 14px; }

/* A Beacon link: a quiet icon beside a number, or the icon and the word in a header. */
body a.cb-beacon { display: inline-flex; align-items: center; gap: 4px; color: var(--app-brand); vertical-align: middle; }
a.cb-beacon.compact { margin-inline-start: 4px; padding: 2px; border-radius: 4px; opacity: 0.7; }
a.cb-beacon.compact:hover, a.cb-beacon.compact:focus-visible { opacity: 1; }
.record-actions a.cb-beacon { font-weight: 600; font-size: 13px; }

@media (pointer: coarse) {
    .cb-tick input, .cb-pick input, .cb-estimate .cb-tick-cell input { width: 22px; height: 22px; }
    .cb-pick { padding-block: 8px; }
    .cb-toggle { min-height: 44px; }
    a.cb-beacon.compact { min-width: 32px; min-height: 32px; justify-content: center; }
    .cb-search .cb-search-box { height: 44px; }
}

@media screen and (max-width: 743px) {
    .cb-search { flex-wrap: wrap; }
    .cb-search .cb-search-box { flex-basis: 100%; }
    .cb-figures strong { font-size: 17px; }
    .cb-table .cb-desc { min-width: 160px; }
}
