/* Scoped responsibility-map styles. The employee UI and existing navigation stay untouched. */
.rt-app {
    --rt-ink: #173e3b; --rt-text: #2f4845; --rt-muted: #687c77; --rt-green: #1e7463;
    --rt-pale: #edf5ef; --rt-line: #d7e3db; --rt-gold: #c99649; --rt-surface: #fff;
    color: var(--rt-text); background: #f5f7f2; border-radius: 20px; padding: 28px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5;
    min-width: 0; max-width: 100%; isolation: isolate;
}
.rt-app *, .rt-app *::before, .rt-app *::after { box-sizing: border-box; }
.rt-app [hidden] { display: none !important; }
.rt-app h1, .rt-app h2, .rt-app h3, .rt-app p { margin: 0; }
.rt-app button, .rt-app input, .rt-app select, .rt-app textarea { font: inherit; }
.rt-app button { cursor: pointer; border: 1px solid var(--rt-line); background: #fff; color: var(--rt-ink); border-radius: 9px; padding: 9px 13px; line-height: 1.3; min-height: 38px; }
.rt-app button:hover:not(:disabled) { border-color: #7ba99a; background: #f0f7f2; }
.rt-app button:focus-visible, .rt-app input:focus-visible, .rt-app select:focus-visible, .rt-app textarea:focus-visible, .rt-app summary:focus-visible, .rt-app .rt-canvas-scroll:focus-visible { outline: 3px solid #3b8fca; outline-offset: 3px; }
.rt-app button:disabled { cursor: not-allowed; opacity: .5; }
.rt-app .rt-primary { background: var(--rt-green); color: #fff; border-color: var(--rt-green); font-weight: 600; }
.rt-app .rt-primary:hover:not(:disabled) { color: #fff; background: #165949; border-color: #165949; }
.rt-app .rt-subtle { color: #786961; }
.rt-app .rt-text-button { border: 0; padding-left: 0; background: none; color: #8b5640; font-size: 12px; text-decoration: underline; }
.rt-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.rt-eyebrow { display: block; color: var(--rt-green); font-weight: 750; font-size: 10px; letter-spacing: .12em; line-height: 1.7; }
.rt-header h1 { color: var(--rt-ink); font-size: clamp(25px, 2.5vw, 35px); letter-spacing: -.045em; line-height: 1.15; margin: 8px 0 10px; }
.rt-header p { color: var(--rt-muted); font-size: 13px; }
.rt-header > button { flex-shrink: 0; }
.rt-scope { padding: 13px 17px; border-left: 3px solid #87b299; background: #e9f1e9; border-radius: 0 9px 9px 0; font-size: 11px; line-height: 1.7; color: #516a5e; }
.rt-scope strong { color: var(--rt-ink); }
.rt-scope > span { display: block; margin-top: 3px; }
.rt-toolbar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 20px 0 14px; }
.rt-toolbar-group { display: flex; align-items: center; gap: 7px; }
.rt-toolbar button { padding: 7px 10px; font-size: 12px; min-height: 34px; }
.rt-map-label { font-weight: 700; color: var(--rt-ink); }
.rt-revision { color: #86928b; font-size: 10px; margin-left: 5px; }
.rt-zoom { gap: 0; border: 1px solid var(--rt-line); border-radius: 9px; overflow: hidden; }
.rt-zoom button { border: 0; border-radius: 0; min-width: 35px; }
.rt-zoom button + button { border-left: 1px solid var(--rt-line); }
.rt-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 390px); align-items: start; gap: 18px; }
.rt-map { border: 1px solid #d7e3d9; border-radius: 14px; background: #f0f4ed; min-width: 0; overflow: hidden; background-image: radial-gradient(#cdd9ca .8px, transparent .8px); background-size: 18px 18px; }
.rt-map-hint { color: var(--rt-muted); font-size: 11px; margin: 0 0 12px !important; }
.rt-view-switch button[aria-pressed="true"] { background: #e3ede2; border-color: #7b9e80; font-weight: 650; }
.rt-canvas-scroll { overflow: auto; height: clamp(450px, 68vh, 760px); min-height: 450px; max-height: 820px; overscroll-behavior: contain; scrollbar-color: #a6beb0 transparent; scrollbar-width: thin; touch-action: pan-x pan-y; }
.rt-canvas-scroll[data-view="tree"] { cursor: grab; }
.rt-canvas-scroll.is-panning { cursor: grabbing; user-select: none; }
.rt-canvas { position: relative; margin: 0 auto; transform-origin: top left; }
.rt-forest, .rt-branch > ul { list-style: none; margin: 0; padding: 0; }
.rt-visual .rt-forest { position: absolute; left: 0; right: 0; bottom: 0; }
.rt-visual .rt-branch, .rt-visual .rt-branch > ul { display: contents; }
.rt-visual .rt-node-wrap { position: absolute; }
.rt-connections { position: absolute; left: 0; bottom: 0; overflow: visible; pointer-events: none; }
.rt-edge { fill: none; stroke: #83a28b; stroke-linecap: round; stroke-linejoin: round; }
.rt-root-trunk { fill: none; stroke: #947342; stroke-width: 10; stroke-linecap: round; }
.rt-root-ground { fill: none; stroke: #c8b992; stroke-width: 3; stroke-linecap: round; }
.rt-node-wrap { position: relative; flex-shrink: 0; }
.rt-app .rt-node { display: flex; flex-direction: column; align-items: flex-start; text-align: left; width: 240px; height: 224px; min-height: 224px; padding: 15px; border: 1px solid #cbd9cb; border-left: 4px solid #8cac8e; background: #fffefb; border-radius: 11px; box-shadow: 0 3px 8px #2f564308; transition: border-color .15s, box-shadow .15s; overflow: hidden; }
.rt-visual .rt-node strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; max-height: 57px; flex-shrink: 0; }
.rt-visual .rt-owner { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; flex-shrink: 0; }
.rt-visual .rt-node-kind, .rt-visual .rt-badge, .rt-visual .rt-node-totals { flex-shrink: 0; }
.rt-visual .rt-node-totals { margin-top: auto; }
.rt-outline { padding: 22px; width: 100%; }
.rt-outline .rt-forest { display: flex; flex-direction: column; gap: 20px; }
.rt-outline .rt-branch { display: block; padding: 5px 0; }
.rt-outline .rt-branch > ul { margin: 8px 0 0 14px; padding-left: 18px; border-left: 2px solid #a4b99c; }
.rt-outline .rt-depth-2 > ul { margin: 8px 0 0; padding-left: 0; border-left: 0; }
.rt-outline .rt-node-wrap { width: 100%; }
.rt-app .rt-outline .rt-node { width: 100%; height: auto; min-height: 140px; padding-right: 50px; }
.rt-outline .rt-node-depth { display: block; color: #7a866e; font-size: 10px; overflow-wrap: anywhere; }
.rt-app .rt-node:hover { background: #fff; box-shadow: 0 5px 15px #2f564319; }
.rt-app .rt-node.is-selected { border-color: var(--rt-green); box-shadow: 0 0 0 2px #1e746324; }
.rt-node strong { font-size: 14px; font-weight: 720; line-height: 1.35; margin: 5px 0; color: var(--rt-ink); overflow-wrap: anywhere; }
.rt-node-depth { display: none; }
.rt-node-kind { color: #64836a; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.rt-owner { color: var(--rt-muted); font-size: 11px; margin-bottom: 11px; overflow-wrap: anywhere; }
.rt-app .rt-depth-0 > .rt-node-wrap > .rt-node { background: #173f36; color: #fff; border: 1px solid #173f36; border-left: 6px solid #c9a567; }
.rt-depth-0 > .rt-node-wrap .rt-node strong { color: #fff; }
.rt-depth-0 > .rt-node-wrap .rt-node-kind { color: #cfb883; }
.rt-depth-0 > .rt-node-wrap .rt-owner { color: #cbdbd1; }
.rt-depth-0 > .rt-node-wrap .rt-node-totals { color: #d8e5dc; border-top-color: #ffffff20; }
.rt-app .rt-depth-0 > .rt-node-wrap > .rt-node.is-selected { box-shadow: 0 0 0 3px #c9a56777; }
.rt-app .rt-depth-0 > .rt-node-wrap > .rt-node:hover { background: #214f44; }
.rt-app .rt-collapse { display: flex; justify-content: center; align-items: center; gap: 4px; position: absolute; left: 50%; top: -22px; transform: translateX(-50%); z-index: 1; background: #fff; padding: 0 8px; border-radius: 50px; font-size: 15px; width: 44px; min-height: 44px; height: 44px; border-color: #abc1a9; }
.rt-app .rt-outline .rt-collapse { left: auto; right: 5px; top: 8px; transform: none; }
.rt-collapse small { font-size: 8px; color: #6f8371; }
.rt-node-totals { display: flex; flex-direction: column; gap: 3px; font-size: 9px; color: #70846f; border-top: 1px solid #e8eee5; margin-top: 10px; padding-top: 8px; width: 100%; line-height: 1.5; }
.rt-badge { display: inline-flex; align-items: center; max-width: 100%; font-size: 9px; font-weight: 650; padding: 4px 7px; line-height: 1.3; border-radius: 5px; background: #eef0ea; color: #637264; }
.rt-status-not_assessed { background: #f3eedf; color: #7b673f; }
.rt-status-overloaded { background: #fce6de; color: #a2452c; }
.rt-status-within_capacity { background: #dfefe3; color: #317049; }
.rt-editor { background: #fff; padding: 23px 21px; border-radius: 14px; border: 1px solid var(--rt-line); min-height: 610px; min-width: 0; box-shadow: 0 3px 10px #193e3105; }
.rt-editor-heading { display: flex; gap: 8px; justify-content: space-between; align-items: flex-start; margin-bottom: 21px; }
.rt-editor-heading h2 { margin-top: 5px; color: var(--rt-ink); font-size: 20px; line-height: 1.3; letter-spacing: -.025em; overflow-wrap: anywhere; }
.rt-editor-heading h2:focus { outline: none; }
.rt-dirty { flex-shrink: 0; font-size: 9px; color: #ae7433; padding-top: 4px; }
.rt-editor h3 { font-size: 12px; color: var(--rt-ink); }
.rt-form fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.rt-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; font-size: 11px; font-weight: 650; color: #61776d; min-width: 0; }
.rt-field input, .rt-field select, .rt-field textarea { padding: 10px 11px; border: 1px solid #dce4dc; border-radius: 7px; color: #29453a; background: #fcfdfb; min-height: 40px; width: 100%; min-width: 0; font-size: 12px; font-weight: 400; }
.rt-field select { padding-right: 22px; }
.rt-field textarea { resize: vertical; min-height: 72px; }
.rt-field input::placeholder { color: #99a399; }
.rt-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rt-hint { color: #7a887d; font-size: 10px; line-height: 1.65; margin: 9px 0 !important; }
.rt-form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; margin-bottom: 18px; }
.rt-form-actions button { font-size: 11px; }
.rt-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 17px 0; border-top: 1px solid #edf0e9; }
.rt-actions-grid button { font-size: 11px; padding: 9px 7px; }
.rt-metrics { display: grid; gap: 12px; margin-top: 5px; }
.rt-metric-card { padding: 14px; background: #f7f9f3; border: 1px solid #e6ebde; border-radius: 9px; }
.rt-metric-card h3 { margin-bottom: 9px; }
.rt-metric-card dl { margin: 12px 0 9px; }
.rt-metric-card dl > div { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 10px; }
.rt-metric-card dt { color: #738171; }
.rt-metric-card dd { margin: 0; text-align: right; font-weight: 650; color: #466046; white-space: normal; flex-shrink: 0; max-width: 47%; }
.rt-coverage { color: #7c8776; font-size: 9px; margin-top: 6px !important; }
.rt-warning-text { color: #a0642d; font-size: 11px; line-height: 1.6; margin: 10px 0 !important; }
.rt-flags { padding-left: 14px; color: #947649; margin: 10px 0 0; font-size: 9px; }
.rt-flags li + li { margin-top: 4px; }
.rt-section { border-top: 1px solid #e9eee5; padding-top: 20px; margin-top: 20px; }
.rt-section-heading { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rt-section-heading button { font-size: 10px; min-height: 31px; padding: 6px 8px; }
.rt-duty-list, .rt-member-list, .rt-allocation-list { list-style: none; padding: 0; margin: 12px 0 0; }
.rt-duty-list li + li { margin-top: 8px; }
.rt-duty-list button { display: flex; flex-direction: column; text-align: left; gap: 5px; width: 100%; padding: 11px !important; }
.rt-duty-list strong { font-size: 11px; overflow-wrap: anywhere; }
.rt-duty-list span, .rt-duty-list small { color: #768578; font-size: 10px; }
.rt-member-list li { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; border-bottom: 1px solid #edf0e8; padding: 9px 0; }
.rt-member-list button { border: 0; padding: 0; min-height: 28px; font-size: 12px; font-weight: 600; text-decoration: underline; }
.rt-member-list li > span:not(.rt-badge) { font-size: 10px; color: #7c887a; }
.rt-member-edit { border: 1px solid #e1e8df; background: #f8faf5; padding: 14px; border-radius: 9px; margin-bottom: 12px; }
.rt-member-edit .rt-field:last-child { margin-bottom: 0; }
.rt-check { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rt-check input { accent-color: var(--rt-green); }
.rt-person-title { font-size: 16px; color: var(--rt-ink); font-weight: 600; margin-bottom: 18px !important; }
.rt-capacity-summary { background: #f1f5ec; padding: 15px; border-radius: 9px; font-size: 12px; }
.rt-capacity-summary p { margin-bottom: 9px; }
.rt-allocation-list li { display: flex; flex-direction: column; gap: 4px; padding: 11px 0; border-bottom: 1px solid #e6ecdf; font-size: 12px; }
.rt-allocation-list small { color: #76846f; font-size: 10px; }
.rt-bottom { display: grid; gap: 10px; margin-top: 20px; }
.rt-bottom details { border: 1px solid var(--rt-line); border-radius: 10px; background: #fcfdfa; padding: 0 16px; }
.rt-bottom summary { padding: 15px 0; cursor: pointer; font-size: 12px; font-weight: 650; color: var(--rt-ink); }
.rt-bottom summary > span { background: #eaf0e5; color: #728567; border-radius: 5px; padding: 2px 6px; font-size: 10px; margin-left: 6px; }
.rt-bottom details[open] { padding-bottom: 14px; }
.rt-people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 8px; }
.rt-people-grid > button { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 6px; font-size: 11px; }
.rt-people-grid > button > span { font-size: 10px; color: #7e8d75; }
.rt-archive-list { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-archive-list button { font-size: 11px; }
.rt-audit { list-style: none; padding: 0; margin: 0; }
.rt-audit li { display: grid; grid-template-columns: 165px 1fr auto; gap: 16px; align-items: baseline; padding: 9px 0; border-top: 1px solid #e8eee1; font-size: 11px; }
.rt-audit time, .rt-audit small { color: #7e8b77; font-size: 10px; }
.rt-alert, .rt-inline-warning { background: #fff2df; border: 1px solid #efcf9c; color: #775227; border-radius: 10px; padding: 16px; font-size: 12px; margin: 14px 0; }
.rt-alert p { margin: 7px 0 12px; }
.rt-alert button { margin: 7px 8px 0 0; color: #775227; border-color: #ddc196; font-size: 11px; }
.rt-notice { margin: 14px 0 0 !important; padding: 11px 15px; background: #e5f2e7; border-radius: 9px; color: #306a46; font-size: 12px; }
.rt-empty { min-height: 610px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 35px; }
.rt-empty-symbol { display: flex; align-items: center; justify-content: center; background: #e1ebdc; color: #678d67; width: 65px; height: 65px; font-size: 32px; border-radius: 18px; margin-bottom: 22px; }
.rt-empty h2 { font-size: 21px; color: var(--rt-ink); letter-spacing: -.02em; }
.rt-empty p { color: #798975; font-size: 12px; line-height: 1.8; max-width: 320px; margin: 12px 0 22px; }
.rt-editor-placeholder { padding-top: 12px; }
.rt-editor-placeholder h2 { color: var(--rt-ink); font-size: 20px; }
.rt-editor-placeholder p { color: var(--rt-muted); font-size: 12px; margin-top: 15px; line-height: 1.8; }
.rt-loading { padding: 45px; color: var(--rt-muted); min-height: 300px; }
.rt-denied { margin: 35px auto; max-width: 650px; padding: 35px; border: 1px solid var(--rt-line); background: #fff; border-radius: 14px; }
.rt-denied h2 { margin: 10px 0 14px; color: var(--rt-ink); }
@media (min-width: 1600px) { .rt-workspace { grid-template-columns: minmax(0, 1fr) 425px; } .rt-editor { padding: 25px; } }
@media (max-width: 1100px) { .rt-app { padding: 20px; } .rt-workspace { grid-template-columns: minmax(0, 1fr) 335px; gap: 12px; } .rt-editor { padding: 18px; } .rt-header h1 { font-size: 28px; } .rt-map-label { font-size: 12px; } }
@media (max-width: 800px) {
    .rt-app { border-radius: 12px; padding: 16px 12px; font-size: 14px; }
    .rt-app button { min-height: 44px; }
    .rt-header { align-items: flex-start; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
    .rt-header h1 { font-size: 29px; }
    .rt-header p { font-size: 12px; }
    .rt-header > button { width: 100%; }
    .rt-eyebrow { font-size: 9px; }
    .rt-scope { font-size: 11px; padding: 12px; }
    .rt-toolbar { gap: 11px; padding-top: 18px; }
    .rt-toolbar-group:first-child { width: 100%; }
    .rt-toolbar-group:last-child { margin-left: auto; }
    .rt-zoom { display: flex; }
    .rt-toolbar button { font-size: 11px; min-height: 40px; }
    .rt-workspace { display: flex; flex-direction: column; gap: 16px; }
    .rt-map, .rt-editor { width: 100%; }
    .rt-map { background: #f0f4ed; }
    .rt-canvas-scroll { height: 490px; min-height: 360px; max-height: 62vh; overflow: auto; }
    /* The same upward geometry is used on mobile. Native two-axis touch panning
       and the visible zoom controls keep wide canopies reachable. */
    .rt-canvas.rt-visual { padding: 0; }
    .rt-app .rt-visual .rt-node { width: 240px; height: 224px; min-height: 224px; padding: 15px; }
    .rt-node strong { font-size: 14px; }
    .rt-node-kind { font-size: 9px; }
    .rt-owner { font-size: 11px; margin-bottom: 8px; }
    .rt-node-totals { font-size: 9px; }
    .rt-outline { padding: 12px; }
    .rt-outline .rt-branch > ul { margin-left: 8px; padding-left: 10px; }
    .rt-outline .rt-depth-2 > ul { margin: 6px 0 0; padding-left: 0; border-left: 0; }
    .rt-outline .rt-node-depth { display: block; }
    .rt-toolbar-group { flex-wrap: wrap; }
    .rt-map-hint { font-size: 11px; }
    .rt-editor { min-height: 0; padding: 22px 16px; scroll-margin-top: 20px; }
    .rt-field input, .rt-field select, .rt-field textarea { font-size: 16px; min-height: 44px; }
    .rt-field { font-size: 12px; }
    .rt-form-actions button { font-size: 12px; }
    .rt-hint { font-size: 11px; }
    .rt-metric-card dl > div, .rt-coverage, .rt-flags { font-size: 11px; }
    .rt-actions-grid button { font-size: 12px; }
    .rt-duty-list strong { font-size: 12px; }
    .rt-duty-list span, .rt-duty-list small, .rt-member-list li > span:not(.rt-badge) { font-size: 11px; }
    .rt-empty { min-height: 330px; padding: 26px 20px; }
    .rt-empty h2 { font-size: 21px; }
    .rt-audit li { grid-template-columns: 1fr; gap: 4px; }
    .rt-bottom summary { font-size: 12px; min-height: 48px; }
    .rt-people-grid { grid-template-columns: 1fr; }
    .rt-people-grid > button { font-size: 12px; }
    .rt-people-grid > button > span { font-size: 11px; }
    .rt-alert button { width: 100%; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .rt-app * { transition: none !important; scroll-behavior: auto !important; } }
/* 0.40: people have global catalog assignments; the cloud is below the trunks. */
.rt-main-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.rt-main-switch button { font-size: 12px; }
.rt-main-switch button[aria-pressed="true"] { background: #e1ede2; border-color: #709978; font-weight: 700; }
.rt-legacy-caption { display: block; font-size: 8px; color: #85927e; margin: 0 0 4px; }
.rt-depth-0 .rt-legacy-caption { color: #c5d5c7; }
.rt-app .rt-card-assignments { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; min-height: 40px; padding: 6px 8px; width: 240px; display: flex; justify-content: center; gap: 13px; background: #e4eee6; border-color: #a9c1ae; color: #365b42; font-size: 10px; }
.rt-card-assignments b { color: #1f633b; }
.rt-app .rt-person-card > .rt-node { height: 272px; min-height: 272px; border-left-color: #b99560; background: #fff9ec; }
.rt-person-roles { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 8px 0; font-size: 12px; }
.rt-person-roles span { display: flex; justify-content: space-between; }
.rt-person-duty-total { font-size: 10px; color: #786c50; }
.rt-person-card-note { font-size: 9px; line-height: 1.5; color: #8a8067; margin-top: auto; }
.rt-outline .rt-catalog-card { padding-bottom: 47px; }
.rt-app .rt-outline .rt-card-assignments { width: 100%; }
.rt-outline .rt-person-card { padding-bottom: 0; }
.rt-app .rt-outline .rt-person-card > .rt-node { min-height: 205px; height: auto; }
.rt-scene-extras { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; }
.rt-app .rt-duty-cloud { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: min(100%, 440px); min-height: 210px; border-radius: 45% 48% 40% 43% / 39% 41% 48% 46%; padding: 20px 32px; background: #e4edf1; color: #466372; border: 2px solid #bdcdd3; box-shadow: 0 10px 25px #355b6b12; text-align: center; pointer-events: auto; }
.rt-visual .rt-duty-cloud { position: absolute; }
.rt-app .rt-duty-cloud:hover { background: #dbe8ee; border-color: #8daebc; }
.rt-duty-cloud strong { font-size: 14px; line-height: 1.4; max-width: 100%; }
.rt-duty-cloud .rt-cloud-count { font-size: 34px; line-height: 1.1; color: #345c6f; }
.rt-cloud-label { font-size: 8px; letter-spacing: .14em; color: #74909c; }
.rt-cloud-preview { font-size: 10px; line-height: 1.5; max-width: 100%; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.rt-cloud-open { font-size: 9px; font-weight: 700; margin-top: 4px; }
.rt-app .rt-duty-cloud.is-clear { background: #e5efe7; border-color: #b3cbb9; color: #42644a; }
.rt-app .rt-duty-cloud.is-pending { background: #f2eddd; border-color: #d8caa4; }
.rt-outline .rt-duty-cloud { margin: 24px auto 8px; }
.rt-empty .rt-duty-cloud { margin-top: 24px; }
@media (max-width: 800px) {
    .rt-main-switch { display: grid; grid-template-columns: 1fr 1fr; }
    .rt-main-switch button { min-height: 44px; font-size: 12px; }
    .rt-main-switch button:last-child { grid-column: 1 / -1; }
    .rt-app .rt-visual .rt-person-card > .rt-node { height: 272px; min-height: 272px; }
    .rt-app .rt-card-assignments { min-height: 44px; height: 44px; }
    .rt-outline .rt-catalog-card { padding-bottom: 52px; }
    .rt-outline .rt-person-card { padding-bottom: 0; }
}
.rt-app .rt-node-edit { position: absolute; right: 7px; top: 7px; min-height: 28px; padding: 4px 5px; font-size: 8px; background: #ffffffed; color: #54725c; border-color: #c5d6c6; }
.rt-catalog-card:not(.rt-person-card) > .rt-node > .rt-node-kind { max-width: 145px; padding-right: 20px; }
@media (max-width: 800px) { .rt-app .rt-node-edit { min-height: 34px; font-size: 9px; } }

.rt-app .rt-duty-cloud.has-executor-gap { border-color: #cab582; background: #f2eddf; }
.rt-duty-cloud.has-executor-gap .rt-cloud-preview { color: #795b25; font-weight: 650; }
.rt-app .rt-duty-cloud.rt-replacement-cloud-button { background: #eee8f7; border-color: #bba8d3; color: #5b4878; }
.rt-app .rt-duty-cloud.rt-replacement-cloud-button:hover { background: #e6dcf3; border-color: #9a80bc; }
.rt-replacement-cloud-button .rt-cloud-count { color: #654b8c; }
.rt-replacement-cloud-button .rt-cloud-label { color: #806995; }
.rt-replacement-cloud-summary { font-size: 10px; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere; }
.rt-app .rt-duty-cloud.rt-replacement-cloud-button.is-clear { background: #f1edf5; border-color: #d1c8db; }

/* Descriptive branch types never alter the structural tree geometry. */
.rt-type-list { list-style: none; margin: 18px 0 0; padding: 0; }
.rt-type-list li { display: flex; flex-wrap: wrap; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--rt-line); }
.rt-type-list li > div:first-child { flex: 1 1 160px; min-width: 0; }
.rt-type-list strong, .rt-type-list small { display: block; overflow-wrap: anywhere; }
.rt-type-list strong { font-size: 13px; }
.rt-type-list small { color: var(--rt-muted); font-size: 10px; margin-top: 4px; }
.rt-type-list li > div:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rt-app .rt-type-list button { font-size: 10px; padding: 7px; }
.rt-node-kind { max-width: 100%; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 800px) { .rt-main-switch button:last-child { grid-column: auto; } }

.rt-batch-rows { display: grid; gap: 13px; margin: 15px 0; }
.rt-batch-row { border: 1px solid var(--rt-line); border-radius: 10px; padding: 14px; background: #f7faf5; min-width: 0; }
.rt-app .rt-batch-row h3 { font-size: 13px; color: var(--rt-green); margin-bottom: 12px; }
.rt-batch-row .rt-field { margin-bottom: 10px; }

/* The toolbar belongs to the page scrollport, never to the zoomed/panned canvas. */
.rt-app { --rt-toolbar-top: env(safe-area-inset-top, 0px); }
.emp-content.rt-app { --rt-toolbar-top: 0px; }
.rt-app .rt-toolbar { position: sticky; top: var(--rt-toolbar-top, 0px); z-index: 6; background: #f5f7f2; box-shadow: 0 5px 10px #294c3c12; padding: 10px 8px; margin: 10px -8px 14px; border-bottom: 1px solid var(--rt-line); }
.rt-app .rt-editor, .rt-app input, .rt-app select, .rt-app textarea, .rt-app button { scroll-margin-top: calc(var(--rt-toolbar-clearance, 150px) + var(--rt-toolbar-top, 0px)); }
.rt-app .rt-toolbar button { scroll-margin-top: 0; }
@media (max-width: 800px) {
    .rt-app .rt-toolbar { gap: 8px; padding: 8px; }
    .rt-app .rt-toolbar-group:last-child { flex-wrap: wrap; margin-left: 0; }
}
@media (max-height: 500px) {
    .rt-app .rt-toolbar { gap: 5px; padding-top: 6px; padding-bottom: 6px; }
    .rt-app .rt-toolbar-group:first-child { display: none; }
    .rt-app .rt-toolbar button { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
}

/* 0.41 recoverable subtree deletion: explicit preview and exact grouped restore. */
.rt-app .rt-danger { color: #a23e36; background: #fff5f2; border-color: #dfb5af; }
.rt-app .rt-danger:hover:not(:disabled) { color: #84291f; background: #fce9e3; border-color: #b97164; }
.rt-trash-list ul, .rt-trash-affected { list-style: none; margin: 16px 0; padding: 0; }
.rt-trash-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--rt-line); }
.rt-trash-list li > div { flex: 1 1 160px; min-width: 0; }
.rt-trash-list strong, .rt-trash-list small, .rt-trash-affected strong, .rt-trash-affected small { display: block; overflow-wrap: anywhere; }
.rt-trash-list small, .rt-trash-affected small { color: var(--rt-muted); font-size: 10px; margin-top: 4px; }
.rt-trash-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; font-size: 11px; }
.rt-trash-counts > span { padding: 6px 8px; background: #f5efe4; border-radius: 6px; }
.rt-trash-affected { max-height: 280px; overflow: auto; border: 1px solid var(--rt-line); border-radius: 8px; padding: 5px 12px; }
.rt-trash-affected li { border-bottom: 1px solid var(--rt-line); padding: 9px 0; font-size: 12px; }
.rt-trash-affected li:last-child { border-bottom: 0; }
.rt-trash-preview > button { margin: 10px 8px 0 0; }

.rt-trash-warnings { margin: 12px 0; padding-left: 18px; font-size: 11px; line-height: 1.6; color: #746344; }
.rt-app .rt-trash-impact { font-size: 12px; margin: 10px 0; overflow-wrap: anywhere; }

.rt-app .rt-trash-affected:focus-visible { outline: 3px solid #3b8fca; outline-offset: 3px; }
/* 0.43 desktop workbench. Opt-in only; the employee/mobile mount stays unchanged. */
.rt-desktop-panel-controls { display: none; }
.rt-alert-stack { display: contents; }
.rt-navigator { display: none; }
@media (min-width: 1000px) {
    .rt-app.rt-desktop { --rt-editor-size: clamp(280px, 32%, 400px); display: flex; flex-direction: column; flex: 1 1 auto; width: 100%; height: 100%; min-height: 0; overflow: hidden; padding: 12px; border-radius: 12px; }
    .rt-app.rt-desktop .rt-header { flex: 0 0 auto; gap: 12px; margin: 0 0 7px; }
    .rt-app.rt-desktop .rt-header h1 { font-size: 23px; line-height: 1.15; margin: 2px 0; }
    .rt-app.rt-desktop .rt-header p { font-size: 10px; }
    .rt-app.rt-desktop .rt-eyebrow { font-size: 8px; }
    .rt-app.rt-desktop .rt-scope { flex: 0 1 auto; min-height: 24px; padding: 5px 9px; font-size: 10px; line-height: 1.5; max-height: 95px; overflow: auto; }
    .rt-app.rt-desktop .rt-scope summary { cursor: pointer; font-weight: 650; }
    .rt-app.rt-desktop .rt-scope p { margin-top: 5px; }
    .rt-app.rt-desktop .rt-toolbar { flex: 0 0 auto; position: relative; top: auto; z-index: 6; gap: 6px; padding: 6px 0; margin: 4px 0; box-shadow: none; }
    .rt-app.rt-desktop .rt-toolbar-group { gap: 4px; flex-wrap: wrap; }
    .rt-app.rt-desktop .rt-toolbar button { font-size: 11px; min-height: 34px; padding: 6px 8px; }
    .rt-app.rt-desktop .rt-desktop-panel-controls { display: contents; }
    .rt-app.rt-desktop .rt-main-switch { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 5px; }
    .rt-app.rt-desktop .rt-main-switch button { font-size: 10px; min-height: 31px; padding: 5px 8px; }
    .rt-app.rt-desktop .rt-map-hint { flex: 0 0 auto; font-size: 9px; margin-bottom: 5px !important; }
    .rt-app.rt-desktop .rt-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, var(--rt-editor-size)); flex: 1 1 300px; min-height: 0; gap: 10px; overflow: hidden; align-items: stretch; }
    .rt-app.rt-desktop.has-navigator:not(.is-compact-desktop) .rt-workspace { grid-template-columns: 220px minmax(0, 1fr) minmax(280px, var(--rt-editor-size)); }
    .rt-app.rt-desktop.is-editor-hidden .rt-workspace { grid-template-columns: minmax(0, 1fr); }
    .rt-app.rt-desktop.has-navigator.is-editor-hidden .rt-workspace, .rt-app.rt-desktop.has-navigator.is-compact-desktop .rt-workspace { grid-template-columns: 220px minmax(0, 1fr); }
    .rt-app.rt-desktop.is-editor-wide { --rt-editor-size: clamp(300px, 42%, 510px); }
    .rt-app.rt-desktop .rt-map { height: 100%; min-height: 0; min-width: 0; }
    .rt-app.rt-desktop .rt-map[data-mode="catalog"] { overflow: auto; overscroll-behavior: contain; }
    .rt-app.rt-desktop .rt-canvas-scroll { width: 100%; height: 100%; min-height: 0; max-height: none; }
    .rt-app.rt-desktop .rt-editor { height: 100%; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; padding: 16px; scroll-margin-top: 0; }
    .rt-app.rt-desktop .rt-editor-heading { margin-bottom: 14px; }
    .rt-app.rt-desktop .rt-editor h2 { font-size: 18px; }
    .rt-app.rt-desktop .rt-editor input, .rt-app.rt-desktop .rt-editor select, .rt-app.rt-desktop .rt-editor textarea, .rt-app.rt-desktop .rt-editor button { scroll-margin-top: 12px; }
    .rt-app.rt-desktop .rt-navigator { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; border: 1px solid var(--rt-line); border-radius: 12px; background: #fff; padding: 10px; }
    .rt-app.rt-desktop .rt-nav-heading { display: flex; align-items: center; justify-content: space-between; font-size: 12px; gap: 5px; }
    .rt-app.rt-desktop .rt-nav-heading button { min-height: 30px; padding: 3px 8px; }
    .rt-app.rt-desktop .rt-nav-tabs { display: flex; gap: 4px; margin: 8px 0; }
    .rt-app.rt-desktop .rt-nav-tabs button { font-size: 10px; min-height: 30px; padding: 4px 7px; }
    .rt-app.rt-desktop .rt-nav-tabs button[aria-pressed="true"] { background: #e5f0e8; border-color: #7caa87; }
    .rt-app.rt-desktop .rt-navigator .rt-field { font-size: 10px; margin-bottom: 5px; }
    .rt-app.rt-desktop .rt-navigator .rt-field input { min-height: 35px; padding: 7px; font-size: 11px; }
    .rt-app.rt-desktop .rt-nav-count { font-size: 9px; color: var(--rt-muted); padding-bottom: 7px; }
    .rt-app.rt-desktop .rt-nav-results { min-height: 0; flex: 1 1 0; overflow: auto; overscroll-behavior: contain; }
    .rt-app.rt-desktop .rt-nav-results > button { display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%; padding: 9px 7px; margin-bottom: 5px; min-width: 0; }
    .rt-app.rt-desktop .rt-nav-results strong { font-size: 11px; overflow-wrap: anywhere; }
    .rt-app.rt-desktop .rt-nav-results small { font-size: 9px; line-height: 1.4; color: var(--rt-muted); overflow-wrap: anywhere; }
    .rt-app.rt-desktop .rt-nav-results:focus-visible { outline: 3px solid #3b8fca; outline-offset: -3px; }
    /* One bounded tray for every pending Staff/Position section after imports.
       The map keeps a usable minimum; unusually short windows can scroll the frame.
       The queue has its own keyboard/wheel scroll. */
    .rt-app.rt-desktop:has(> .rt-pending-tray) { overflow: auto; }
    .rt-app.rt-desktop:has(> .rt-pending-tray) .rt-workspace { min-height: 160px; }
    .rt-app.rt-desktop .rt-pending-tray { flex: 0 0 auto; min-width: 0; margin-top: 7px; border: 1px solid #c6d5bc; border-radius: 10px; background: #f7faf3; overflow: hidden; }
    .rt-app.rt-desktop .rt-pending-tray > summary { cursor: pointer; padding: 8px 12px; font-size: 12px; font-weight: 650; }
    .rt-app.rt-desktop .rt-pending-scroll { max-height: min(22vh, 220px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
    .rt-app.rt-desktop .rt-pending-scroll:focus-visible { outline: 3px solid #3b8fca; outline-offset: -3px; }
    .rt-app.rt-desktop .rt-pending-scroll > section { margin: 0; border: 0; border-radius: 0; }
    .rt-app.rt-desktop .rt-bottom { flex: 0 1 auto; min-height: 34px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 7px; max-height: 155px; overflow: auto; }
    .rt-app.rt-desktop .rt-bottom details { padding: 0 9px; min-width: 0; }
    .rt-app.rt-desktop .rt-bottom summary { padding: 8px 0; font-size: 10px; }
    .rt-app.rt-desktop .rt-bottom details[open] { padding-bottom: 9px; }
    .rt-app.rt-desktop .rt-alert-stack { display: block; flex: 0 1 auto; max-height: 170px; min-height: 0; overflow: auto; }
    .rt-app.rt-desktop .rt-alert-stack:empty { display: none; }
    .rt-app.rt-desktop .rt-alert { max-height: none; padding: 9px 12px; font-size: 11px; margin-bottom: 5px; }
    .rt-app.rt-desktop .rt-notice { flex: 0 0 auto; font-size: 11px; margin-bottom: 4px; }
    .rt-app.rt-desktop .rt-empty { min-height: 0; height: 100%; overflow: auto; padding: 22px; }
    .rt-app.rt-desktop .rt-cat-browser { padding: 16px; }
}
@media (min-width: 1000px) and (max-height: 700px) {
    .rt-app.rt-desktop .rt-header p, .rt-app.rt-desktop .rt-header .rt-eyebrow, .rt-app.rt-desktop .rt-map-hint { display: none; }
    .rt-app.rt-desktop .rt-header h1 { font-size: 20px; }
    .rt-app.rt-desktop .rt-workspace { min-height: 0; }
    .rt-app.rt-desktop .rt-scope { max-height: 50px; }
    .rt-app.rt-desktop .rt-alert-stack { max-height: 100px; }
    .rt-app.rt-desktop .rt-bottom { max-height: 80px; }
    .rt-app.rt-desktop .rt-toolbar { gap: 4px; margin: 2px 0; }
}
/* 0.43: read-only card duties and additional directed visual relationships. */
.rt-app .rt-card-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; width: 100%; height: 44px; gap: 3px; }
.rt-app .rt-card-actions .rt-card-assignments { position: static; width: auto; flex: 1 1 auto; min-width: 0; height: 44px; min-height: 44px; display: flex; flex-direction: column; gap: 2px; padding: 4px 5px; font-size: 9px; }
.rt-card-assignments strong { font-size: 11px; }
.rt-app .rt-card-link { flex: 0 0 61px; min-height: 44px; padding: 5px; font-size: 10px; background: #eee8f6; color: #644b88; border-color: #bcaad4; }
.rt-app .rt-visual .rt-person-card > .rt-node { height: 224px; min-height: 224px; }
.rt-outline .rt-person-card { padding-bottom: 52px; }
.rt-app .rt-person-card > .rt-node { padding-bottom: 60px; }
.rt-app .rt-card-remove-member { position: absolute; left: 8px; right: 8px; bottom: 52px; min-height: 36px; padding: 6px 8px; font-size: 11px; line-height: 1.3; }
.rt-app .rt-member-remove-overlay { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 20px; background: #12352f99; }
.rt-app .rt-member-remove-dialog { width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow: auto; background: #fff; color: var(--rt-text); border: 1px solid var(--rt-line); border-radius: 14px; box-shadow: 0 20px 70px #102e3155; padding: 22px; overscroll-behavior: contain; }
.rt-member-remove-dialog h2 { margin: 0 0 16px; font-size: 20px; }
.rt-member-remove-dialog p { margin: 0 0 12px; line-height: 1.6; overflow-wrap: anywhere; }
.rt-member-remove-dialog .rt-form-actions { margin-bottom: 0; }
@media (max-width: 800px) {
    .rt-app .rt-card-remove-member { min-height: 44px; }
    .rt-app .rt-member-remove-overlay { padding: 8px; }
    .rt-app .rt-member-remove-dialog { max-height: calc(100dvh - 16px); padding: 16px; }
    .rt-member-remove-dialog .rt-form-actions { flex-direction: column; }
}
.rt-extra-edge { fill: none; stroke: #7963a1; stroke-width: 2; stroke-dasharray: 7 5; opacity: .85; }
.rt-app .rt-extra-label { position: absolute; width: 202px; height: 30px; min-height: 30px; padding: 5px 7px; z-index: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; text-align: left; background: #f3edf9; color: #624c82; border: 1px dashed #a08abf; }
.rt-extra-link-list ul { list-style: none; padding: 0; }
.rt-extra-link-list li { display: flex; flex-direction: column; gap: 5px; padding: 12px 0; border-bottom: 1px solid var(--rt-line); overflow-wrap: anywhere; }
.rt-extra-link-list li > div { display: flex; gap: 7px; flex-wrap: wrap; }
.rt-link-endpoints small { display: block; color: #7c8076; }
.rt-person-duty-view ul { list-style: none; padding: 0; }
.rt-person-duty-view li { display: flex; flex-direction: column; gap: 5px; padding: 10px 0; border-bottom: 1px solid var(--rt-line); overflow-wrap: anywhere; }
.rt-person-duty-view li small { color: #75816e; }
.rt-person-duty-view li p { white-space: pre-wrap; margin: 0; }
.rt-extra-labels { position: absolute; bottom: 0; left: 0; width: 100%; pointer-events: none; }
.rt-extra-labels > button { pointer-events: auto; }
.rt-node-wrap.is-link-source { outline: 3px dashed #7963a1; outline-offset: 4px; border-radius: 12px; }
.rt-node-wrap.is-link-target { outline: 3px dashed #b79c66; outline-offset: 4px; border-radius: 12px; }
.rt-root-trunk { stroke-width: 14; }

/* Concurrent-edit review: independent of the botanical map and print renderer. */
.rt-app .rt-review-overlay { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 24px; background: #12352f99; }
.rt-app .rt-review-dialog { width: min(940px, 100%); max-height: calc(100dvh - 48px); overflow: auto; background: #fff; color: var(--rt-text); border: 1px solid var(--rt-line); border-radius: 18px; box-shadow: 0 20px 70px #102e3155; padding: 22px; overscroll-behavior: contain; }
.rt-app .rt-review-dialog > header, .rt-app .rt-review-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rt-app .rt-review-dialog > header { margin-bottom: 12px; }
.rt-app .rt-review-dialog > footer { justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.rt-app .rt-review-dialog > p + p { margin-top: 8px; }
.rt-app .rt-review-rows { display: grid; gap: 12px; margin-top: 18px; }
.rt-app .rt-review-row { padding: 14px; border: 1px solid var(--rt-line); border-radius: 12px; }
.rt-app .rt-review-row.has-conflict { border-color: #c99649; background: #fffaf0; }
.rt-app .rt-review-row h3 { font-size: 15px; }
.rt-app .rt-review-row dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.rt-app .rt-review-row dl > div { min-width: 0; padding: 10px; border-radius: 8px; background: #f4f7f4; }
.rt-app .rt-review-row dt { color: var(--rt-muted); font-size: 12px; font-weight: 600; }
.rt-app .rt-review-row dd { margin: 5px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.rt-app .rt-review-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.rt-app .rt-review-choices button[aria-pressed="true"] { background: var(--rt-green); color: #fff; border-color: var(--rt-green); }
.rt-app .rt-drafts > button { margin: 8px 8px 0 0; }
.rt-app .rt-presence { color: var(--rt-muted); font-size: 12px; min-height: 18px; padding: 5px 0; }
@media (max-width: 600px) {
    .rt-app .rt-review-overlay { padding: 8px; }
    .rt-app .rt-review-dialog { max-height: calc(100dvh - 16px); padding: 15px; border-radius: 12px; }
    .rt-app .rt-review-row dl { grid-template-columns: 1fr; }
    .rt-app .rt-review-dialog > footer { align-items: stretch; flex-direction: column; }
}

.rt-position-card .rt-node{border-color:#9e8bbf;background:linear-gradient(145deg,#fcfaff,#f2eff7)}
.rt-position-card .rt-node-kind{color:#644d85}
.rt-position-member-count{display:block;margin:8px 0;font-size:14px}
.rt-owner-picker{min-width:0;width:100%;display:grid;gap:8px}
.rt-owner-picker select,.rt-owner-picker input{min-width:0;max-width:100%}
.rt-owner-picker .rt-hint{margin:0;grid-column:1/-1}
@media(min-width:700px){.rt-owner-picker{grid-template-columns:1fr 1fr}.rt-owner-picker>.rt-field:last-of-type{grid-column:1/-1}}
.rt-pending-positions{margin:18px 0;padding:16px;border:1px solid #c9bbda;border-radius:14px;background:#faf8fe}

/* Waiting room: bounded independent scrolling beside the tree on desktop.
   Pointer dragging is confined to its explicit handle; ordinary touch scroll stays native. */
.rt-app .rt-tree-workbench { min-width: 0; min-height: 0; }
.rt-app .rt-waiting-room { min-width: 0; margin: 0 0 10px; border: 1px solid #c6d5bc; border-radius: 10px; background: #f7faf3; overflow: hidden; }
.rt-app .rt-waiting-room > summary { cursor: pointer; padding: 10px; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.rt-app .rt-waiting-room .rt-pending-scroll { max-height: min(36vh, 320px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.rt-app .rt-waiting-room .rt-pending-scroll > section { margin: 0; border: 0; padding: 10px; }
.rt-app .rt-waiting-room h2 { font-size: 13px; margin: 0 0 8px; }
.rt-app .rt-waiting-room .rt-field { font-size: 11px; margin: 8px 0; }
.rt-app .rt-waiting-room .rt-check { font-size: 11px; }
.rt-app .rt-waiting-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.rt-app .rt-waiting-grid > article { padding: 9px; min-width: 0; background: white; border: 1px solid #dce4d6; border-radius: 8px; }
.rt-app .rt-waiting-person-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; }
.rt-app .rt-waiting-person-heading h3 { font-size: 12px; overflow-wrap: anywhere; margin: 0; }
.rt-app .rt-waiting-instructions, .rt-app .rt-waiting-position, .rt-app .rt-waiting-role-counts, .rt-app .rt-waiting-count, .rt-app .rt-waiting-live { font-size: 10px; line-height: 1.5; margin: 5px 0; overflow-wrap: anywhere; }
.rt-app .rt-waiting-live:empty { display: none; }
.rt-app .rt-waiting-grid .rt-pending-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.rt-app .rt-waiting-grid .rt-pending-actions button { font-size: 10px; min-height: 36px; padding: 6px; }
.rt-app button.rt-waiting-drag { flex: 0 0 36px; width: 36px; min-height: 36px; padding: 3px; font-size: 20px; cursor: grab; touch-action: none; user-select: none; }
.rt-app.is-waiting-drag, .rt-app.is-waiting-drag * { cursor: grabbing !important; }
.rt-app .is-waiting-source { outline: 2px dashed #46805b; opacity: .65; }
.rt-app .rt-node-wrap.is-placement-target { outline: 4px solid #25804d; outline-offset: 5px; box-shadow: 0 0 0 9px #d9efda; }
.rt-app .rt-waiting-pages { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 8px 0; font-size: 10px; }
.rt-app .rt-waiting-pages button { min-height: 36px; padding: 5px; font-size: 10px; }
.rt-app .rt-placement-modes { display: grid; gap: 8px; margin: 14px 0; }
.rt-app .rt-placement-modes button { text-align: left; }
.rt-app .rt-placement-modes [aria-pressed="true"] { background: #e5f0e8; border-color: #46805b; }
.rt-app .rt-placement-preview { border: 1px solid #a5c2a4; border-radius: 10px; padding: 12px; background: #f2f8ed; overflow-wrap: anywhere; }
.rt-app .rt-placement-preview h3 { font-size: 14px; margin: 0 0 8px; }
.rt-app .rt-placement-preview p { font-size: 12px; line-height: 1.5; margin: 8px 0; }
@media (min-width: 1000px) {
    .rt-app.rt-desktop .rt-tree-workbench { display: flex; align-items: stretch; height: 100%; min-height: 160px; gap: 8px; overflow: hidden; }
    .rt-app.rt-desktop .rt-tree-workbench > .rt-canvas-scroll, .rt-app.rt-desktop .rt-tree-workbench > .rt-empty { flex: 1 1 0; width: auto; min-width: 0; }
    .rt-app.rt-desktop .rt-waiting-room { flex: 0 0 38px; margin: 0; height: 100%; min-height: 0; }
    .rt-app.rt-desktop .rt-waiting-room[open] { flex-basis: clamp(170px, 30%, 240px); max-width: 42%; }
    .rt-app.rt-desktop .rt-waiting-room:not([open]) > summary { writing-mode: vertical-rl; white-space: nowrap; min-height: 130px; }
    .rt-app.rt-desktop .rt-waiting-room[open] > summary { height: 48px; box-sizing: border-box; padding: 10px; }
    .rt-app.rt-desktop .rt-waiting-room .rt-pending-scroll { height: calc(100% - 48px); min-height: 0; max-height: none; }
    .rt-app.rt-desktop:has(.rt-waiting-room) { overflow: auto; }
    .rt-app.rt-desktop:has(.rt-waiting-room) .rt-workspace { min-height: 160px; }
}
@media (max-width: 999px) {
    .rt-app button.rt-waiting-drag { flex-basis: 44px; width: 44px; min-height: 44px; }
    .rt-app .rt-waiting-grid .rt-pending-actions button, .rt-app .rt-waiting-pages button { min-height: 44px; }
    .rt-app .rt-waiting-grid { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
}

/* 0.89: only unresolved date-scoped temporary-replacement needs are red.
   Warnings sit in the existing 108px inter-level gap (48px top padding),
   outside fixed-height card contents; native buttons remain touch/keyboard targets. */
.rt-edge.has-replacement-gap, .rt-root-trunk.has-replacement-gap { stroke: #b42318; }
.rt-app .rt-node-wrap.has-replacement-gap > .rt-node,
.rt-app .rt-depth-0 > .rt-node-wrap.has-replacement-gap > .rt-node { border-color: #b42318; border-left-color: #b42318; border-left-width: 5px; }
.rt-app .rt-node-wrap.has-replacement-gap > .rt-node.is-selected { box-shadow: 0 0 0 3px #b4231838; }
.rt-app .rt-replacement-warning { position: absolute; top: -48px; left: 0; width: 100%; min-height: 44px; max-height: 44px; padding: 4px 6px; display: flex; justify-content: center; align-items: center; gap: 5px; border: 1px solid #b42318; border-radius: 7px; background: #fff1ef; color: #8e1b12; font-size: 11px; font-weight: 700; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; z-index: 2; }
.rt-app .rt-replacement-warning:hover:not(:disabled), .rt-app .rt-cat-replacement-warning:hover:not(:disabled) { background: #ffe0dc; border-color: #8e1b12; }
.rt-app .rt-replacement-warning:focus-visible, .rt-app .rt-cat-replacement-warning:focus-visible { outline: 3px solid #234c9b; outline-offset: 2px; }
.rt-app .rt-outline .rt-replacement-warning { position: static; max-height: none; min-height: 44px; margin-bottom: 4px; }
.rt-app .rt-cat-row.has-replacement-gap { border-left: 4px solid #b42318; }
.rt-app .rt-cat-replacement-warning { align-self: flex-start; min-height: 44px; margin-top: 5px; padding: 6px 8px; border-color: #b42318; background: #fff1ef; color: #8e1b12; font-size: 11px; font-weight: 700; white-space: normal; }

/* Keep disclosure controls separate from the warning button in both views. */
.rt-app .rt-visual .has-replacement-children > .rt-replacement-warning { width: calc(100% - 48px); }
.rt-app .rt-visual .has-replacement-children > .rt-collapse { top: -48px; left: auto; right: 0; transform: none; }
.rt-app .rt-outline .has-replacement-children > .rt-collapse { top: 56px; }
