/* Build — MTL brand colours, as Cost Control and WhereAreYou. */
:root {
    --cargo-tank-black: #262626;
    --water-ballast-white: #EBEBEB;
    --marine-blue: #128FA5;
    --marine-blue-hover: #0F7F93;
    --hull-red: #932F3E;
    --north-sea-blue: #7BA1A6;
    --oxidized-orange: #EF8354;
    /* The tile colour of brand/ and the accentColor of capabilities.json and the Teams manifest (brand/build-icons.py). */
    --app-accent: #128FA5;

    --page-bg: var(--water-ballast-white);
    --surface: #FFFFFF;
    --text: var(--cargo-tank-black);
    --text-muted: #5F6B6D;
    --border: #D6D6D6;

    --radius: 8px;
    --shadow: 0 1px 3px rgba(38, 38, 38, .12), 0 1px 2px rgba(38, 38, 38, .08);
    --font-head: "Montserrat", "Segoe UI", Arial, sans-serif;
    --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--page-bg);
    color: var(--text);
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0 0 .5rem; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .95rem; margin-top: 1.2rem; }

a { color: var(--marine-blue); text-decoration: none; }

/* Shell */
/* The UAT test system banner (MainLayout.razor; the platform skill's standard): fixed across the top of every screen, so
   it's there wherever you scroll. --banner-h moves anything pinned to the top below it; it's 0 on production data, where
   there's no banner. Build pins nothing to the top today (the header scrolls away), so only the shell's padding uses it. */
:root { --banner-h: 0px; }
.app-shell.has-test-banner { --banner-h: 2rem; padding-top: var(--banner-h); }
.test-system-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 2000; height: 2rem;
    display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 0 1rem;
    background: repeating-linear-gradient(-45deg, #FFD23F 0 14px, #F5C400 14px 28px);
    color: #1A1A1A; border-bottom: 2px solid #1A1A1A; font-size: .85rem; white-space: nowrap; overflow: hidden;
}
.test-system-banner strong { text-transform: uppercase; letter-spacing: .06em; }
.test-system-banner .detail { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 767px) { .test-system-banner .detail { display: none; } }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-header {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border);
}
.app-header img { height: 28px; width: 28px; }
.app-header .title { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; margin-right: 1rem; }
.app-nav { display: flex; flex-wrap: wrap; gap: .2rem; min-width: 0; }
.app-nav a { padding: .35rem .7rem; border-radius: var(--radius); color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.app-nav a.active { color: var(--marine-blue); background: #e8f4f6; }
.app-content { flex: 1; padding: 1rem; max-width: 1280px; width: 100%; margin: 0 auto; }

.page-head, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.page-head h1, .section-head h2 { margin: 0; }

/* Cards */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1rem; margin-bottom: 1rem;
}
.muted { color: var(--text-muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.notice { background: #fff8f0; border: 1px solid var(--oxidized-orange); border-radius: var(--radius); padding: .6rem .8rem; }
.saved-note { color: var(--marine-blue); font-weight: 600; }
.spinner { color: var(--text-muted); padding: .5rem 0; }

/* Buttons */
.btn {
    display: inline-block; font-family: var(--font-body); font-weight: 600; font-size: .95rem;
    border: none; border-radius: var(--radius); padding: .55rem 1rem; cursor: pointer;
    background: var(--marine-blue); color: #fff;
}
.btn:hover { background: var(--marine-blue-hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--marine-blue); border: 1px solid var(--marine-blue); }
.btn.small { font-size: .85rem; padding: .35rem .7rem; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }

/* Forms */
label { display: block; font-weight: 600; font-size: .85rem; margin: .8rem 0 .25rem; }
select, textarea, input[type="text"], input[type="number"], input[type="search"], input[type="email"], input[type="date"] {
    width: 100%; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: var(--radius);
    font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--text);
}
.search-row { display: flex; gap: .5rem; margin-bottom: .6rem; }
.search-row select { width: auto; flex: 0 0 auto; min-width: 10rem; }
/* In a table cell, 100% of a narrow column clipped the Kind choices to two letters. */
.grid select { width: auto; min-width: 7.5rem; padding: .3rem .4rem; font-size: .9rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.grid th, table.grid td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.grid th { font-weight: 600; color: var(--text-muted); font-size: .8rem; }
table.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid .detail { min-width: 16rem; }

/* Status chips */
.chip { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.chip.good { background: #e3f2ec; color: #1d6b4a; }
.chip.wait { background: #eef1f2; color: var(--text-muted); }
.chip.bad { background: #fbe9ec; color: var(--hull-red); }
.chip.warn { background: #fff1e8; color: #a14e22; }
/* Category types (core.CategoryType): outlined, so they never read as a status. */
.chip.type { background: transparent; border: 1px solid currentColor; font-weight: 600; }
.chip.type-part { color: var(--marine-blue); }
.chip.type-service { color: #6a4c93; }
.chip.type-rental { color: #a14e22; }
.chip.type-none { color: var(--text-muted); }

/* Facts list */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0 0 1rem; }
.facts dt { font-weight: 600; color: var(--text-muted); }
.facts dd { margin: 0; }

/* Pick lists */
.pick-list { list-style: none; padding: 0; margin: 0; max-height: 18rem; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.pick-list li + li { border-top: 1px solid var(--border); }
.pick { display: flex; align-items: center; gap: .5rem; margin: 0; padding: .45rem .6rem; font-weight: 400; font-size: .95rem; cursor: pointer; }
.pick.inactive { color: var(--text-muted); cursor: default; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(38, 38, 38, .45); z-index: 40; }
.modal {
    position: fixed; z-index: 50; top: 8vh; left: 50%; transform: translateX(-50%);
    width: min(640px, calc(100vw - 2rem)); max-height: 84vh; overflow-y: auto;
    background: var(--surface); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0, 0, 0, .25); padding: 1rem 1.2rem;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.modal-head h2 { margin: 0; }
.modal-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--text-muted); }

/* Failed API calls (ErrorState.razor): a `panel` that replaces a section whose load failed, an `inline`
   strip beside a refused action. `benign` is the signing-in transition, which is not a fault. */
.error-state {
    display: flex; gap: .7rem; align-items: flex-start;
    border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem;
    background: var(--surface); border: 1px solid var(--border);
}
.error-state.problem { background: #fdf5f6; border-color: var(--hull-red); }
.error-state.benign { background: var(--surface); border-color: var(--border); }
.error-state.inline { padding: .5rem .7rem; font-size: .9rem; }
.error-mark { font-size: 1.1rem; line-height: 1.4; flex: none; }
.error-body { min-width: 0; }
.error-title { font-family: var(--font-head); font-weight: 600; margin: 0; }
.error-detail { color: var(--text-muted); margin: .2rem 0 0; }
.error-state .btn.small { margin-top: .6rem; }

.app-loading { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }

#blazor-error-ui {
    background: var(--hull-red); color: #fff; bottom: 0; display: none; left: 0; right: 0;
    padding: .8rem 1rem; position: fixed; z-index: 1000;
}
#blazor-error-ui .reload { color: #fff; text-decoration: underline; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .8rem; }

a.btn { display: inline-block; }

/* Blazor focuses the page heading after navigation (FocusOnNavigate) for screen readers; no ring is needed on a heading. */
h1:focus { outline: none; }

/* Help: cards grouped by the category SharePoint sends. */
.help-group { margin-top: 1.2rem; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.help-card { margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.help-card h3 { margin: 0; }
.help-video { width: 100%; border-radius: var(--radius); background: #0d1b2a; aspect-ratio: 16 / 10; }
.help-meta { margin: auto 0 0; display: flex; gap: .5rem; align-items: center; }

/* A chip that follows text in the same cell. */
.chip.beside { margin-left: .4rem; }

/* Period filter (PeriodPicker.razor): sits in the page head beside the title. */
.period-picker { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 600; font-size: .85rem; color: var(--text-muted); }
.period-picker select { width: auto; min-width: 9rem; padding: .35rem .5rem; font-size: .9rem; }
.page-head { flex-wrap: wrap; }

/* A phase opened on the workscope screen: its activities beside its months. */
tr.phase-detail > td { background: #f7fafb; }
.phase-detail-grid { display: grid; grid-template-columns: minmax(18rem, 2fr) minmax(12rem, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 720px) { .phase-detail-grid { grid-template-columns: 1fr; } }

/* Contract: one block per billable line in "Time against the proposal's estimate". */
.estimate-line + .estimate-line { margin-top: 1.2rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.estimate-line h3 { margin-top: 0; }

/* Unallocated spend: the two headline figures side by side. */
.spend-heads { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 720px) { .spend-heads { grid-template-columns: 1fr; } }
.spend-heads h2 { margin-bottom: .2rem; }
.big { font-family: var(--font-head); font-size: 1.6rem; font-weight: 600; margin: 0 0 .2rem; font-variant-numeric: tabular-nums; }
.section-head input.spend-filter { width: 16rem; max-width: 50vw; flex: 0 0 auto; }

/* Income: the four headline figures, two by two on narrow screens. */
.income-heads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .income-heads { grid-template-columns: 1fr 1fr; } }
.income-heads h2 { margin-bottom: .2rem; }

/* ---------------------------------------------------------------- worklist (R2-20) */
.worklist-controls { display: flex; flex-wrap: wrap; gap: 12px; }
.worklist-controls label, .worklist-toolbar label, .worklist-rule label { display: inline-flex; align-items: center; gap: 6px; }
.worklist-toolbar, .worklist-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 12px; }
.worklist-rule { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.worklist-done { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.worklist-items:focus { outline: 2px solid var(--marine-blue); outline-offset: 2px; }
.grid tr.selected td { background: rgba(18, 143, 165, .10); }
.grid.compact td { padding-top: 2px; padding-bottom: 2px; }
.progress { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; margin: 4px 0 8px; }
.progress-done { height: 100%; background: var(--marine-blue); }
button.link { background: none; border: 0; padding: 0; color: var(--marine-blue); font: inherit; text-align: left; cursor: pointer; }
button.link:hover { text-decoration: underline; }
.grid tr.worklist-expanded > td { background: var(--page-bg); padding: 10px 12px 14px; }
.grid tr.worklist-expanded table.grid { background: var(--surface); }
.worklist-items select { max-width: 13rem; }
.worklist-items td:nth-child(2) { min-width: 14rem; }

/* Structure (R2-19): a budget per <details>, its lines beneath. */
.structure-budget { border-top: 1px solid var(--border); padding: .6rem 0; }
.structure-budget > summary { cursor: pointer; }
.structure-line { margin: .6rem 0 .6rem 1rem; }
.structure-line h3 { font-size: .95rem; margin: 0; }
.modal label { display: block; margin: .5rem 0; }
.modal label.check { display: flex; gap: .4rem; align-items: center; }

/* ---- Criticality (slice 1). Rank colours are the Power App's, so its users read them at a glance. ---- */
:root {
    --rank-1: #B5F9BC; --rank-2: #6DAD74; --rank-3: #FACB9D; --rank-4: #FA5893;
}
.rank-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .55rem; border-radius: 999px;
    font-size: .8rem; font-weight: 600; white-space: nowrap; color: var(--cargo-tank-black); }
.rank-chip .rank-num { font-variant-numeric: tabular-nums; }
.rank-chip.rank-1 { background: var(--rank-1); }
.rank-chip.rank-2 { background: var(--rank-2); }
.rank-chip.rank-3 { background: var(--rank-3); }
.rank-chip.rank-4 { background: var(--rank-4); }
.rank-chip.rank-none { background: transparent; border: 1px dashed var(--text-muted); color: var(--text-muted); }

.criticality-layout { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 767px) { .criticality-layout { grid-template-columns: 1fr; } }

.matrix { display: grid; grid-template-columns: 2rem repeat(4, 1fr); grid-auto-rows: minmax(3.2rem, auto);
    gap: 4px; padding: 6px; background: #3E5C80; border-radius: var(--radius); position: relative; padding-bottom: 1.6rem; }
.matrix-corner { }
.matrix-axis { display: flex; align-items: center; justify-content: center; color: #C9E2FF; font-size: .75rem; font-weight: 600; }
.matrix-effect { min-height: 1.4rem; }
.matrix-cell { position: relative; border: 0; border-radius: 4px; padding: .25rem .35rem; text-align: left;
    font: inherit; color: var(--cargo-tank-black); display: flex; align-items: flex-start; justify-content: flex-start; }
button.matrix-cell { cursor: pointer; }
button.matrix-cell:hover { outline: 2px solid #7DB7FF; }
.matrix-cell.rank-1 { background: var(--rank-1); }
.matrix-cell.rank-2 { background: var(--rank-2); }
.matrix-cell.rank-3 { background: var(--rank-3); }
.matrix-cell.rank-4 { background: var(--rank-4); }
.matrix-rank { font-size: .85rem; font-weight: 600; }
.matrix-marker { position: absolute; inset: 0; margin: auto; width: 1.6rem; height: 1.6rem; border-radius: 50%;
    background: #7DB7FF; border: 2px solid #1d3a5c; }
.matrix-label { position: absolute; color: #C9E2FF; font-size: .7rem; }
.matrix-label-chance { left: .4rem; bottom: .3rem; }
.matrix-label-effect { right: .5rem; bottom: .3rem; }

.factor-pickers { display: grid; gap: 1rem; }
.factor-picker select { width: 100%; }
.level-row { display: flex; align-items: center; gap: .6rem; margin-top: .4rem; }
.level-row input[type=range] { flex: 1; }
.level-name { min-width: 5.5rem; font-weight: 600; }
.scenario { margin: .3rem 0 0; font-size: .9rem; }
.rank-actions ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.proposal { border-left: 4px solid var(--oxidized-orange); }
.queue-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.queue-tab { background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius); padding: .35rem .7rem; font: inherit; font-size: .9rem; cursor: pointer; }
.queue-tab.on { border-color: var(--marine-blue); color: var(--marine-blue); font-weight: 600; }
.queue-count { margin-left: .25rem; font-weight: 600; }
.finding { border-left: 3px solid var(--border); padding-left: .8rem; margin: .8rem 0; }
.finding p { margin: .2rem 0; }
.decide { display: grid; gap: .5rem; margin-top: 1rem; max-width: 32rem; }
label.block { display: block; margin-top: 1rem; }
label.block textarea { display: block; width: 100%; margin-top: .3rem; font: inherit; }
.chip.active { background: var(--marine-blue); color: #fff; }
button.chip { border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.taxonomy-filters .btn-row { margin-top: .4rem; }
.taxonomy-filters .btn-row { align-items: center; }
/* Batch approval (Approvals.razor): the panel stays in view while lines are ticked further up the list. */
.decide-batch { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -4px 16px rgba(0, 0, 0, .12); }

/* Subcategory picker (SubcategoryPicker.razor): search, chosen chips, then matches. */
.subcategory-picker { display: grid; gap: .4rem; margin-top: .3rem; }
.subcategory-picker .pick-list { max-height: 18rem; overflow-y: auto; }
label.check { display: block; margin-top: 1rem; }
details { margin-top: 1rem; }

/* Purchasing and delivery: the headline figures, wrapping to fit. */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.2rem; margin-bottom: .4rem; }
.metric-label { font-weight: 600; font-size: .85rem; color: var(--text-muted); margin-bottom: .2rem; }
.page-head .btn-row:has(.period-filter) { align-items: center; }
.period-filter { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.period-filter select { width: auto; }
.outcome-filter { margin-bottom: .6rem; flex-wrap: wrap; }
.outcome-filter .chip { border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; }
.outcome-filter .chip.active { background: var(--marine-blue); border-color: var(--marine-blue); color: #fff; }


/* ================================================================ Widths and touch
   Phone < 768 px, tablet 768-1279 px, desktop from 1280 px: Work Management's widths. One app at every width: the
   same pages and links, laid out to fit. Each screen group's own rules are in css/screens/, one file per group.

   Shared patterns for the screens:
   - table.grid.stack-phone: on a phone each row becomes a block, each cell a line with its column's name from the
     cell's data-label. Give the row's main cell (the name, the link) class "stack-title" and no data-label; it
     leads the block. Cells with class "hide-phone" are left out on a phone.
   - .hide-phone, .phone-only: show or hide anything by width.
   - table.grid.fixed with <colgroup>: the same column widths in every table of a list, so cards line up. */
:root { --touch: 44px; }

.menu-toggle { display: none; }

@media (max-width: 767px) {
    .app-header { padding: .5rem .75rem; gap: .5rem; }
    .app-header .title { margin-right: auto; font-size: 1rem; }
    .menu-toggle {
        display: inline-flex; align-items: center; gap: .45rem; min-height: var(--touch); padding: 0 .8rem;
        background: transparent; border: 1px solid var(--border); border-radius: var(--radius);
        font: inherit; font-weight: 600; color: var(--text); cursor: pointer;
    }
    .menu-icon, .menu-icon::before, .menu-icon::after {
        display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; position: relative;
    }
    .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
    .menu-icon::before { top: -5px; }
    .menu-icon::after { top: 5px; }
    .app-nav { display: none; flex-basis: 100%; flex-direction: column; gap: 0; padding-top: .25rem; }
    .app-nav.open { display: flex; }
    .app-nav a { display: flex; align-items: center; min-height: var(--touch); padding: 0 .75rem; }

    .app-content { padding: .75rem; }
    .card { padding: .8rem; }
    h1 { font-size: 1.25rem; }

    /* Search beside a filter doesn't fit: stack them. */
    .search-row { flex-wrap: wrap; }
    .search-row > * { flex: 1 1 100%; }
    .search-row select { width: 100%; min-width: 0; }

    .hide-phone { display: none !important; }

    table.grid.stack-phone, table.grid.stack-phone tbody, table.grid.stack-phone tr, table.grid.stack-phone td { display: block; width: 100%; }
    /* The header row is hidden visually but kept for screen readers. */
    table.grid.stack-phone thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    table.grid.stack-phone tr { padding: .55rem 0; border-bottom: 1px solid var(--border); }
    /* Block, not flex: a cell's text and elements keep flowing as text ("1 of 2" stays together), and the
       column's name sits in the left gutter. */
    table.grid.stack-phone td { position: relative; padding: .15rem 0; border: 0; }
    table.grid.stack-phone td[data-label] { padding-left: 8.25rem; min-height: 1.5rem; }
    table.grid.stack-phone td[data-label]::before {
        content: attr(data-label); position: absolute; left: 0; top: .2rem; width: 7.5rem;
        color: var(--text-muted); font-size: .8rem; font-weight: 600;
    }
    table.grid.stack-phone td.stack-title { font-weight: 600; font-size: 1rem; padding-bottom: .25rem; }
    table.grid.stack-phone td.num { text-align: left; }
    table.grid.stack-phone td:empty { display: none; }
}

@media (min-width: 768px) {
    .phone-only { display: none !important; }
}

table.grid.fixed { table-layout: fixed; }
table.grid.fixed td, table.grid.fixed th { overflow-wrap: anywhere; }

/* Fingers: on a touch screen every control is at least 44 x 44 px. */
@media (pointer: coarse) {
    .btn, .btn.small, button.chip, .queue-tab, a.btn { min-height: var(--touch); }
    .btn.small, button.chip { padding-left: .9rem; padding-right: .9rem; }
    select, input[type="text"], input[type="number"], input[type="search"], input[type="email"], input[type="date"] { min-height: var(--touch); }
    .app-nav a { min-height: var(--touch); display: inline-flex; align-items: center; }
}

/* Joints and torque */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .6rem 1rem; align-items: end; margin-bottom: .6rem; }
.form-grid label { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
.form-grid label.check { flex-direction: row; align-items: center; gap: .4rem; }
.joint-form { border-top: 1px solid var(--border, #dde3e6); margin-top: 1rem; padding-top: .8rem; }
.joint-form h3 { margin: 0 0 .6rem; font-size: 1rem; }
.end-input { border: 1px solid var(--border, #dde3e6); border-radius: var(--radius); padding: .4rem .6rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.end-input legend { font-size: .9rem; padding: 0 .2rem; }
.fixing { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .5rem 0; border-bottom: 1px dashed var(--border, #dde3e6); }
.fixing-part { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding-left: 1.5rem; }
.fixing input[type=number] { width: 7rem; }

/* Help and training (Pages/Help.razor): a group per SharePoint category, cards that wrap to one column on a phone. */
.help-group { margin-top: 1.2rem; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr)); gap: 1rem; }
.help-card { margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.help-card h3 { margin: 0; }
.help-video { width: 100%; border-radius: var(--radius); background: var(--cargo-tank-black); aspect-ratio: 16 / 10; }
.help-meta { margin: auto 0 0; display: flex; gap: .5rem; align-items: center; }
