h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Sign-in, registration and placeholder home page. Interim styling until
   the application's design system is in place. */
body { font-family: system-ui, sans-serif; color: #1b1f24; background: #f6f5f1; margin: 0; }
main.auth { max-width: 420px; margin: 64px auto; padding: 0 16px; }
main.auth form { display: grid; gap: 14px; margin: 18px 0; }
main.auth label { display: grid; gap: 4px; font-weight: 500; }
main.auth input { font: inherit; padding: 8px 10px; border: 1px solid #c9c6bc; border-radius: 6px; background: #fff; }
main.auth small { font-weight: 400; color: #6e7477; }
main.auth button { font: inherit; padding: 9px 14px; border: 0; border-radius: 6px; background: #1b1f24; color: #fff; cursor: pointer; }
.auth-error { color: #b3261e; background: #fbeae8; padding: 8px 10px; border-radius: 6px; }

/* Interim page styles for account and membership screens (D41 direction:
   light, dense, colour only for meaning). Replaced by the design system. */
main.page { max-width: 880px; margin: 40px auto; padding: 0 16px; }
main.page h2 { font-size: 16px; margin-top: 28px; }
.auth-ok { color: #0e6027; background: #e7f4ea; padding: 8px 10px; border-radius: 6px; }
.tip { background: var(--accent-soft); border: 1px solid #c7e0f4; border-radius: 6px; padding: 4px 16px 6px; margin-bottom: 18px; }
.tip h2 { margin-top: 12px; }
.notice { background: #fff8e1; border: 1px solid #f0d58a; border-radius: 6px; padding: 4px 14px 12px; margin-bottom: 18px; }
table.list { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #e1dfdd; }
table.list th { background: #faf9f8; font-weight: 600; color: #605e5c; }
table.list form { margin: 0; }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 3px; background: #edebe9; color: #605e5c; margin-left: 4px; }
button.secondary, main.page button.secondary { background: #fff; color: #1b1f24; border: 1px solid #c9c6bc; }
main.page button { font: inherit; padding: 7px 12px; border: 0; border-radius: 6px; background: #1b1f24; color: #fff; cursor: pointer; }
main.page input, main.page select { font: inherit; padding: 7px 9px; border: 1px solid #c9c6bc; border-radius: 6px; background: #fff; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { display: grid; gap: 4px; font-weight: 500; }
ul.workspaces { list-style: none; padding: 0; }
ul.workspaces li { padding: 6px 0; }
ul.workspaces form { display: inline; }
a.button { display: inline-block; padding: 9px 14px; border-radius: 6px; background: #1b1f24; color: #fff; text-decoration: none; }

/* ==========================================================================
   Application shell and planning grid (D41): business-software styling.
   Light surfaces, dense tables, tabular numbers, colour only for meaning:
   blue = selection and primary action, green/red = plus/minus deltas.
   ========================================================================== */
:root {
    --bg: #f3f2f1; --surface: #ffffff; --border: #e1dfdd; --border-strong: #c8c6c4;
    --text: #242424; --muted: #605e5c; --accent: #0f6cbd; --accent-soft: #ebf3fc;
    --pos: #107c10; --pos-soft: #dff6dd; --neg: #c50f1f; --neg-soft: #fde7e9; --warn-soft: #fff4ce;
}
body { font-family: "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--text); }

.shell { display: grid; grid-template-columns: 180px 1fr; grid-template-rows: 44px 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / 3; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: #1b1a19; color: #fff; }
.topbar .brand { color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
.topbar .brand span { color: #6cb8f6; }
.topbar-workspace { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; margin-left: 2px; border-radius: 4px;
    border: 1px solid #605e5c; color: #fff; text-decoration: none; font-size: 13px; }
.topbar-workspace:hover { border-color: #c8c6c4; }
.topbar-workspace strong { font-weight: 600; font-size: 14px; }
.topbar-workspace-label { color: #c8c6c4; }
.topbar-workspace.is-sandbox { background: #2d5a3c; border-color: #4f8a62; }
.topbar-workspace.is-sandbox:hover { background: #366b48; }
.topbar-spacer { flex: 1; }
.topbar-user { font-size: 13px; }
.topbar .tag { background: #3b3a39; color: #e1dfdd; }
.topbar form { margin: 0; }
.topbar-link { background: none; border: 0; color: #c8c6c4; cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.topbar-link:hover { color: #fff; text-decoration: underline; }
.sidenav { background: var(--surface); border-right: 1px solid var(--border); padding: 10px 0; }
.sidenav a { display: block; padding: 8px 18px; color: var(--text); text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
.sidenav a:hover { background: var(--bg); }
.sidenav a.active { border-left-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.content { min-width: 0; overflow: hidden; }
.content main.page { margin: 24px; max-width: 980px; }
.muted { color: var(--muted); }
.num, table.list td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag-warn { background: var(--warn-soft); color: #835b00; }

/* Planner layout */
.planner { display: flex; flex-direction: column; height: calc(100vh - 44px); }
.planner-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: 13px; }
.planner-title { font-size: 14px; display: flex; gap: 6px; align-items: center; }
.planner-title a { text-decoration: none; }
.toolbar-spacer { flex: 1; }
.toolbar-field { display: flex; gap: 6px; align-items: center; }
.planner select, .planner input[type=text] { font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--border-strong); border-radius: 4px; background: #fff; }
.planner button { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 4px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.planner button.secondary { background: #fff; color: var(--text); border-color: var(--border-strong); }
.planner button:disabled { opacity: .5; cursor: default; }
.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 4px; overflow: hidden; }
.planner .segmented button { border: 0; border-radius: 0; background: #fff; color: var(--text); padding: 4px 10px; }
.planner .segmented button + button { border-left: 1px solid var(--border-strong); }
.planner .segmented button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.segmented.small { margin-bottom: 10px; }
.levels { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.toolbar-break { flex-basis: 100%; height: 0; }

/* A step's note in History (D95), and the Why box */
ol.history .step-note { margin: 2px 0 0 30px; font-size: 12.5px; font-style: italic; color: var(--text); white-space: pre-wrap; }
.op-panel textarea { font: inherit; font-size: 13px; padding: 5px 8px; resize: vertical; }

/* Start new items (D94): what to model on */
.op-panel .like-chip { margin-top: 4px; align-self: flex-start; }
.op-panel .like-matches { list-style: none; margin: 4px 0 0; padding: 0; max-height: 220px; overflow-y: auto; font-size: 12.5px; }
.op-panel .like-matches li { padding: 2px 0; display: flex; gap: 6px; align-items: baseline; }
.op-panel .like-matches .muted { margin-left: auto; }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 8px; border: 1px solid var(--border-strong); border-radius: 12px; background: #fff; }
.planner .chip-btn { border: 0; background: none; color: var(--muted); padding: 0 4px; font-size: 14px; line-height: 1; }
.planner .chip-btn:hover { color: var(--accent); }
.planner .chip-add { border-style: dashed; border-radius: 12px; }

.planner-body { flex: 1; display: flex; min-height: 0; }
.grid-scroll { flex: 1; overflow: auto; background: var(--surface); }

/* The grid */
table.plan-grid { border-collapse: separate; border-spacing: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 100%; }
.plan-grid th { position: sticky; top: 0; z-index: 2; background: #faf9f8; color: var(--muted); font-weight: 600; text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.plan-grid td { text-align: right; padding: 0 10px; height: 29px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.plan-grid .col-name { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--surface); min-width: 320px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--border); }
.plan-grid th.col-name { z-index: 3; background: #faf9f8; }
.plan-grid .col-total { font-weight: 600; background: #faf9f8; }
.plan-grid tr { cursor: pointer; }
.plan-grid tr.group td { font-weight: 600; }
.plan-grid tr.leaf td { color: #3b3a39; }
.plan-grid tr:hover td { background: #f5f5f5; }
.plan-grid tr.affected td { background: #fbfdff; }
.plan-grid tr.selected td { background: var(--accent-soft); }
.plan-grid tr.selected td.col-name { box-shadow: inset 3px 0 0 var(--accent); }
.plan-grid .caret { border: 0; background: none; color: var(--muted); width: 16px; padding: 0; margin-right: 2px; font-size: 11px; cursor: pointer; }
.plan-grid .count, .plan-grid .unit { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--muted); }
.plan-grid .delta { display: block; font-size: 10.5px; line-height: 1; margin-top: -3px; font-weight: 600; }
.plan-grid .delta.pos { color: var(--pos); }
.plan-grid .delta.neg { color: var(--neg); }
.plan-grid tr.affected td { height: 34px; }

/* Operation panel */
.op-panel { width: 300px; flex-shrink: 0; overflow: auto; background: var(--surface); border-left: 1px solid var(--border); padding: 14px 16px; font-size: 13px; }
.op-panel h2 { font-size: 15px; margin: 0 0 8px; }
.op-panel .selection { background: var(--bg); border-radius: 4px; padding: 8px 10px; margin: 0 0 12px; font-weight: 600; }
.op-panel .field { display: grid; gap: 4px; margin-bottom: 10px; font-weight: 600; color: var(--muted); }
.op-panel .field select, .op-panel .field input { width: 100%; box-sizing: border-box; }
.op-panel .field-row { display: flex; gap: 8px; }
.op-panel .field-row .field { flex: 1; }
.preview-summary { background: var(--accent-soft); color: #0c3b5e; border-radius: 4px; padding: 8px 10px; font-weight: 600; }
.panel-actions { display: flex; gap: 8px; margin: 12px 0; }

/* Imports */
.content main.page.page-wide { max-width: 1280px; }
table.list.mapping td { vertical-align: middle; }
table.list.mapping tr.ignored td { color: var(--muted); }
table.list.mapping select, table.list.mapping input { font-size: 13px; }
.samples { color: var(--muted); font-size: 12px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-summary { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin: 14px 0; }
.import-summary > div { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 10px 16px; min-width: 120px; }
.import-summary strong { display: block; font-size: 22px; }
.import-summary span { color: var(--muted); font-size: 12px; }
.import-summary .neg strong { color: var(--neg); }
.import-summary .reasons { margin: 0; padding: 8px 0 0 18px; font-size: 13px; }
.tag-ok { background: var(--pos-soft); color: var(--pos); }
.inline-form label.check { display: flex; flex-direction: row; gap: 6px; align-items: center; font-weight: 400; }
.page-actions { align-items: center; flex-wrap: wrap; }
main.page button:disabled { opacity: .5; cursor: default; }

/* A slow form at work (wwwroot/busy-forms.js): the pressed button keeps full
   strength, so it reads as working rather than unavailable. */
main.page button.busy:disabled { opacity: 1; cursor: progress; }
button.busy { display: inline-flex; align-items: center; gap: 8px; }
button.busy::before {
    content: ""; width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: busy-spin .8s linear infinite;
}
@keyframes busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button.busy::before { animation-duration: 2.4s; } }

/* Workspace settings (D61) */
.settings-form section { max-width: 640px; margin-bottom: 8px; }
.settings-form label { display: flex; flex-direction: column; gap: 4px; max-width: 280px; }

/* "Show password" eye on password fields (wwwroot/password-toggle.js) */
.password-field { position: relative; display: block; }
.password-field input { width: 100%; box-sizing: border-box; padding-right: 38px; }
.password-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center;
                   width: 28px; height: 28px; padding: 0; background: none; border: 0; color: #8a8886; cursor: pointer; }
main.auth .password-toggle, main.page .password-toggle { padding: 0; background: none; color: #8a8886; }
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: #1b1f24; }

/* Deleting a workspace (D63): danger styling, used only for irreversible actions */
.danger-zone { max-width: 640px; margin-top: 32px; padding-top: 4px; border-top: 1px solid #f1c9c4; }
.danger-box { max-width: 640px; background: #fbeae8; border: 1px solid #f1c9c4; border-radius: 6px; padding: 4px 16px; margin-bottom: 18px; }
main.page button.danger, a.button.danger { background: #b3261e; color: #fff; }
a.button.secondary-link { background: #fff; color: #1b1f24; border: 1px solid #c9c6bc; padding: 7px 12px; }
.panel-actions a.button { padding: 7px 12px; }

/* Plan vs actuals (D52, D64): variance shading, colour only for meaning (D41) */
.compare-note { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 6px 16px; font-size: 12.5px;
                background: var(--surface); border-bottom: 1px solid var(--border); color: var(--muted); }
.compare-note .legend span { padding: 1px 6px; border-radius: 3px; margin-left: 4px; }
.plan-grid td.heat-pos-1, .compare-note .heat-pos-1 { background: #e3f1e6; }
.plan-grid td.heat-pos-2 { background: #c4e3cb; }
.plan-grid td.heat-neg-1, .compare-note .heat-neg-1 { background: #fbe5e2; }
.plan-grid td.heat-neg-2 { background: #f5c7c1; }

/* Plan export (D67): a strip under the toolbar, like the comparison note */
.export-panel { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 8px 16px; font-size: 13px;
                background: var(--surface); border-bottom: 1px solid var(--border); }
.export-panel .check { display: flex; gap: 6px; align-items: center; }
.export-panel a.button { padding: 6px 12px; }

/* Approved baseline and New / Dropped rows (D69) */
.planner-title button.small { padding: 2px 8px; font-size: 12px; margin-left: 6px; }
.tag-new { background: #e1ecf7; color: #1c4f87; }
.tag-dropped { background: #edebe9; color: #605e5c; text-decoration: line-through; }

/* Plan history (D54, D74): the steps beside the grid */
.panel-tabs { display: flex; margin-bottom: 10px; }
.panel-tabs button { flex: 1; }
.history-filter { display: flex; gap: 6px; align-items: center; font-size: 12.5px; margin-bottom: 8px; }
.history-download { font-size: 12.5px; margin: 0 0 8px; }
ol.history { list-style: none; padding: 0; margin: 0; }
ol.history li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
ol.history .step-head { display: flex; gap: 8px; align-items: baseline; }
ol.history .step-number { min-width: 22px; color: var(--muted); font-variant-numeric: tabular-nums; }
ol.history .step-text { font-weight: 600; }
ol.history li.removed .step-text { text-decoration: line-through; color: var(--muted); font-weight: 400; }
ol.history li.marker .step-text { font-weight: 400; font-style: italic; }
ol.history .muted { margin-left: 30px; }
ol.history .remove-preview, ol.history .link-button, ol.history .small-note { margin-left: 30px; margin-top: 4px; }
.link-button { background: none; border: none; padding: 0; color: var(--accent, #0f6cbd); cursor: pointer; font-size: 12.5px; }
.remove-preview { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 6px 8px; }
.remove-preview p { margin: 0 0 6px; }
.op-panel button.small { padding: 3px 10px; font-size: 12px; }
.op-panel button.danger { background: #b3261e; color: #fff; }

/* Explain: why actual differs from plan (D75) */
.explain-sentence { font-weight: 600; margin: 6px 0 8px; }
table.explain { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0; }
table.explain th, table.explain td { padding: 4px 6px; border-bottom: 1px solid var(--border); }
table.explain th { color: var(--muted); font-weight: 500; text-align: left; }
table.explain .num { text-align: right; font-variant-numeric: tabular-nums; }
table.explain tr.total td { font-weight: 600; }
.small-note { font-size: 12px; }

/* Platform admin area (D77) */
.admin-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 16px; }
.admin-nav a { padding: 5px 10px; border-radius: 4px; color: var(--text); text-decoration: none; }
.admin-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.admin-badge { background: #3b3a39; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 3px; margin-right: 8px; text-transform: uppercase; letter-spacing: .04em; }
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 18px; }
.admin-tiles > div { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; display: grid; gap: 2px; }
.admin-tiles strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.admin-tiles span { color: var(--muted); font-size: 12.5px; }
.admin-tiles small { color: var(--muted); font-size: 11.5px; }
.admin-tiles > div.neg strong { color: #b3261e; }
.tag-error { background: #fbe5e2; color: #b3261e; }
td.clip { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.errors pre { white-space: pre-wrap; font-size: 11.5px; max-height: 300px; overflow: auto; background: var(--surface); padding: 6px; }
.sidenav a.nav-admin { margin-top: 18px; border-top: 1px solid var(--border); }
.sidenav a.nav-version { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

/* Member management (D78) */
.confirm-strip { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; background: var(--warn-soft); border: 1px solid #f0d58a; border-radius: 6px; padding: 8px 12px; margin: 8px 0 14px; }
.confirm-strip form { display: flex; gap: 8px; align-items: center; }
td.member-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
td.member-actions form { display: flex; gap: 4px; align-items: center; }
td.member-actions button, td.member-actions select { padding: 3px 8px; font-size: 12.5px; }

/* Subscription strip (D84): colour only for meaning (D41). */
.sub-strip { font-size: 13px; line-height: 1.45; padding: 7px 12px; border-radius: 4px; margin-bottom: 14px; border: 1px solid; }
.sub-info { background: #eff6fc; border-color: #c7e0f4; color: #1f3a52; }
.sub-warn { background: #fff8e5; border-color: #f1d98f; color: #5c4400; }
.sub-critical { background: #fdecec; border-color: #f1bbbb; color: #7a1c1c; }
.seats { margin: 6px 0 14px; }
.tag-warn { background: #fff8e5; border-color: #f1d98f; color: #5c4400; }

/* In-app help (D91): guides rendered from Markdown, readable at a comfortable line length. */
.help-bar { display: flex; align-items: center; gap: 16px; padding: 0 16px; height: 48px; background: #1b1a19; color: #fff; }
.help-bar a { color: #fff; text-decoration: none; font-size: 13.5px; }
.help-bar .brand { font-weight: 600; font-size: 15px; }
.help-bar .brand span { color: #6cb8f6; }
.help-bar .brand small { font-weight: 400; color: #c8c6c4; margin-left: 6px; }
main.page.help { max-width: 760px; }
.help-crumbs { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.help-crumbs a, .help-more a, .help-article a { color: var(--accent); }
.help-article { line-height: 1.6; }
.help-article h2 { font-size: 18px; margin: 28px 0 8px; }
.help-article h3 { font-size: 15px; margin: 20px 0 6px; }
.help-article ol, .help-article ul { padding-left: 24px; margin: 8px 0 14px; }
.help-article li { margin: 6px 0; }
.help-article li > p { margin: 4px 0; }
.help-article code { background: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; font-size: 90%; }
.help-article table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; margin: 10px 0 18px; }
.help-article th, .help-article td { text-align: left; vertical-align: top; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.help-article th { background: #faf9f8; font-weight: 600; color: var(--muted); }
.help-more { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 12px; }
a.help-link { font-size: 13px; font-weight: 400; margin-left: 10px; color: var(--accent); text-decoration: none; vertical-align: middle; }
a.help-link:hover { text-decoration: underline; }

/* Grid filters (D93): chips beside Group by, and the value picker under the toolbar */
.planner .chip-label { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.planner button.link-button { background: none; border: 0; padding: 0; color: var(--accent); font-size: 12.5px; }
.planner button.link-button:hover { text-decoration: underline; }
.planner .chip-open { border-color: var(--accent); }
.filter-panel { flex-direction: column; align-items: stretch; }
.filter-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.filter-head input[type="search"] { padding: 4px 8px; min-width: 180px; }
.filter-values { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 18px; max-height: 260px; overflow-y: auto; }
.filter-values .check { display: flex; gap: 6px; align-items: center; font-weight: 400; }
.filter-values .muted { margin-left: auto; font-size: 12px; }
.planner .levels button.small { padding: 2px 8px; font-size: 12px; }

/* The Sandbox (D102): a strip saying it's sample data, and the guided tour's bubbles. */
.sub-sandbox { background: #eef7f1; border-color: #bfe0cb; color: #1e4a2e; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.sub-sandbox form { display: inline; margin: 0; }
.sub-sandbox .link-button { font-size: 13px; font-weight: 600; }
.tour-target { outline: 3px solid #0f6cbd; outline-offset: 3px; border-radius: 4px; }
.tour-bubble { position: absolute; z-index: 1000; width: 320px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid #c7e0f4;
    border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); padding: 12px 14px; font-size: 13px; line-height: 1.45; }
.tour-bubble p { margin: 6px 0 10px; }
.tour-foot { display: flex; align-items: center; gap: 8px; }
.tour-foot .muted { margin-right: auto; }
.tour-bubble button.small { padding: 3px 10px; font-size: 12px; }

/* Get started (D103): the steps to a first plan, ticked off as the data arrives. */
.tip-line { background: #eff6fc; border: 1px solid #c7e0f4; border-radius: 4px; padding: 7px 12px; font-size: 13px; }
.start-steps { list-style: none; padding: 0; max-width: 820px; }
.start-steps > li { border: 1px solid #e1dfdd; border-radius: 6px; padding: 4px 16px 10px; margin-bottom: 10px; background: #fff; }
.start-steps > li h2 { font-size: 15px; margin: 8px 0 6px; }
.start-steps > li.done { background: #f6fbf7; border-color: #cfe7d6; }
.start-steps > li.done h2 { color: #1e6b3a; }
.start-steps > li.current { border-color: #0f6cbd; box-shadow: 0 0 0 1px #0f6cbd; }
.start-steps > li.todo h2 { color: #8a8886; }
.source-choice label { display: block; margin: 6px 0; }
.source-choice button { margin-top: 8px; }

/* The Home checklist (D104). */
.checklist { border: 1px solid #c7e0f4; background: #f7fbfe; border-radius: 6px; padding: 4px 16px 8px; margin-bottom: 18px; max-width: 640px; }
.checklist h2 { font-size: 15px; margin: 10px 0 6px; }
.checklist ul { list-style: none; padding: 0; margin: 0 0 6px; }
.checklist li { padding: 3px 0; }
.checklist .check { display: inline-block; width: 1.4em; }
.checklist li.done { color: #1e6b3a; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Home's workspace cards (D105): the open one outlined, the Sandbox in green. */
.ws-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; max-width: 900px; margin-bottom: 24px; }
.ws-card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid #e1dfdd; border-radius: 8px; padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.ws-card.ws-current { border-color: #0f6cbd; box-shadow: 0 0 0 1px #0f6cbd, 0 2px 8px rgba(15, 108, 189, 0.12); }
.ws-card.ws-sandbox { background: #f6fbf7; }
.ws-card.ws-sandbox.ws-current { border-color: #2e7d4a; box-shadow: 0 0 0 1px #2e7d4a, 0 2px 8px rgba(46, 125, 74, 0.14); }
.ws-card.ws-placeholder { border-style: dashed; border-color: #9fcfae; box-shadow: none; }
.ws-card-head { display: flex; align-items: center; gap: 10px; }
.ws-card-head h3 { margin: 0; font-size: 15px; }
.ws-initial { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 6px;
    background: #e8f1fa; color: #0f6cbd; font-weight: 700; flex: none; }
.ws-sandbox .ws-initial { background: #dff1e5; color: #2e7d4a; }
.ws-tags { display: flex; gap: 6px; min-height: 20px; }
.tag.tag-current { background: #e8f1fa; color: #0f548c; }
.tag.tag-sandbox { background: #dff1e5; color: #1e6b3a; }
.ws-text { margin: 0; font-size: 13px; color: #605e5c; flex: 1; }
.ws-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ws-actions form { margin: 0; }
