/* Workspace: Manage Projects, dashboard widget grid, artifact cards/tiles, presentations,
   DoDAF/UAF, help, and dark-theme overrides for shared components. */

/* ---------- Manage Projects ---------- */
.pm-layout { display: flex; gap: 16px; align-items: flex-start; }
.pm-folders { width: 200px; flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding-bottom: 8px; }
.pm-folders .side-item { padding: 5px 12px; }
.pm-folder-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; align-items: center; }
.pm-body { flex: 1; min-width: 0; }
.projects-table td.row-actions { width: 40px; text-align: right; }
.form-err { color: var(--danger); font-size: 13px; min-height: 1em; }
.kv-table { border-collapse: collapse; width: 100%; }
.kv-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 12px 4px 0; width: 150px; vertical-align: top; }
.kv-table td { padding: 4px 0; }
@media (max-width: 760px) { .pm-layout { flex-direction: column; } .pm-folders { width: 100%; } }

/* ---------- dashboard grid ---------- */
.pm-storage { margin: var(--sp-4) 0 0; font-size: var(--fs-xs); }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 30px; gap: 10px; position: relative; }
/* Widgets match the Home cards: surface, hairline border, 8 px radius, 13 px semibold titles. */
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.widget:hover { border-color: var(--border-strong); }
.widget.dragging { z-index: 20; box-shadow: var(--shadow); opacity: .92; transition: none; }
.widget-ghost { background: var(--sel-bg); border: 2px dashed var(--sel-edge); border-radius: var(--r-card); z-index: 1; pointer-events: none; }
.widget-head { display: flex; align-items: center; gap: 2px; min-height: 36px; padding: 4px 6px 4px var(--sp-3); border-bottom: 1px solid var(--border); cursor: grab; user-select: none; flex: none; }
.widget.locked .widget-head { cursor: default; }
.widget-head .wt { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbtn { background: none; border: 0; color: var(--text-2); font-size: var(--fs-sm); padding: 2px 6px; border-radius: var(--r-sm); line-height: 1.2; }
.wbtn:hover { background: var(--hover-bg); color: var(--text); }
.widget-head .wbtn { opacity: 0; }
.widget-head .wbtn:focus-visible { opacity: 1; }
.widget:hover .widget-head .wbtn { opacity: 1; }
.widget-body { flex: 1; min-height: 0; overflow: auto; padding: var(--sp-3); }
.widget-resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--line-strong) 50%, var(--line-strong) 60%, transparent 60%, transparent 72%, var(--line-strong) 72%, var(--line-strong) 82%, transparent 82%); border-bottom-right-radius: var(--radius); }
.w-empty { padding: var(--sp-4) 4px; text-align: center; font-size: var(--fs-sm); color: var(--text-2); }
.w-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.w-table { font-size: var(--fs-sm); }
.w-table th { cursor: default; }
.wstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-2); align-content: center; }
.wstat { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-top: 3px solid var(--tone, var(--info)); border-radius: var(--r-card); color: inherit; text-decoration: none !important; }
a.wstat:hover { background: var(--hover-bg); }
.wstat .v { font-size: var(--fs-xl); font-weight: 600; line-height: 28px; font-variant-numeric: tabular-nums; }
.wstat .k { color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.wstat .k.wstat-sub { color: var(--text-2); font-size: var(--fs-xs); font-weight: 400; }
.widget-body.quick { display: grid; gap: 6px; }
.quick-link { display: flex; flex-direction: column; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-ctl); color: var(--text); }
.quick-link:hover { background: var(--hover-bg); text-decoration: none; }
@media (max-width: 760px) {
  .dash-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .dash-grid > .widget { grid-column: 1 / -1 !important; grid-row: auto !important; height: calc(var(--h) * 34px); }
  .widget-resize { display: none; }
}
/* charts */
.chart-svg { width: 100%; height: auto; max-height: 100%; display: block; }
.chart-text { fill: var(--text-2); }
.chart-text.muted { fill: var(--muted); }
.chart-mark.link { cursor: pointer; }
.chart-mark:hover { opacity: .85; }
/* feed */
.feed { display: flex; flex-direction: column; }
.feed-item { padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .row { flex-wrap: wrap; gap: 6px; }
.feed-op { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.feed-item.op-delete .feed-op { color: var(--danger); }
.feed-item.op-create .feed-op, .feed-item.op-restore .feed-op { color: var(--ok); }
.feed-gone { text-decoration: line-through; color: var(--muted); }
.feed-detail { margin-top: 4px; padding: 6px 8px; background: var(--panel-2); border-radius: 4px; font-size: 12px; }
.feed-item.resolved .comment-text { color: var(--muted); }
.comment-text { white-space: pre-wrap; margin-bottom: 3px; }
/* countdown */
.widget-body.countdown { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background-size: cover; background-position: center; }
.countdown.has-bg { text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.cd-label { font-size: 12px; margin-bottom: 8px; }
.cd-nums { display: flex; gap: 12px; }
.cd-v { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.cd-k { font-size: 10px; letter-spacing: .1em; opacity: .7; }
/* checklist */
.cl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cl-bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.cl-fill { height: 100%; background: var(--ok); }
.cl-step { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.cl-step.done .cl-name { text-decoration: line-through; color: var(--muted); }
.cl-pct { width: 64px; padding: 2px 4px; }
/* add-widget dialog */
.wdialog { display: flex; gap: 16px; min-height: 340px; }
.wtype-list { width: 260px; flex: none; display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; }
.wtype { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); }
.wtype > span:last-child { display: flex; flex-direction: column; }
.wtype.active { border-color: var(--accent); background: var(--accent-2); }
.wtype-icon { width: 24px; text-align: center; font-size: 16px; }
.wdialog-main { flex: 1; min-width: 0; }
.multi-pick { max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; margin-top: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 10px; }
.multi-pick .checkbox { font-size: 12.5px; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
@media (max-width: 760px) { .wdialog { flex-direction: column; } .wtype-list { width: 100%; max-height: 200px; } }

/* rich text */
.rt-view { font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.rt-view p { margin: 0 0 .6em; }
.rt-view ul, .rt-view ol { margin: 0 0 .6em; padding-left: 1.4em; }
.rt-view h2, .rt-view h3, .rt-view h4 { margin: .4em 0 .3em; }
.rt-wrap { border: 1px solid var(--line); border-radius: 4px; background: var(--input-bg); }
.rt-bar { display: flex; flex-wrap: wrap; gap: 3px; padding: 4px; border-bottom: 1px solid var(--line); }
.rt-edit { min-height: 120px; padding: 8px 10px; outline: none; font-size: 13.5px; }
.rt-edit:focus { box-shadow: inset 0 0 0 2px var(--focus); }

/* ---------- tiles & artifact cards ---------- */
.artifact-dash .page-head .muted { max-width: 640px; }
.tile-controls { margin-bottom: var(--sp-3); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--gap); }
.tile-grid > .tile-empty { grid-column: 1 / -1; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-card); }
.tile-empty p { max-width: 560px; margin: 0 auto; }
.tile-pager { margin-top: 12px; }
.inno-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); overflow: hidden; min-width: 0; }
.inno-card:hover { border-color: var(--border-strong); text-decoration: none; box-shadow: var(--shadow); }
.widget-body > .inno-card { height: 100%; }
.thumb { height: 150px; background: #f7f9fc; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.widget-body > .inno-card .thumb { flex: 1; height: auto; min-height: 80px; }
.thumb-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb .chart-svg { max-height: 140px; }
.thumb-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8a94a3; font-size: 12px; gap: 4px; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(0,0,0,.025) 8px 16px); }
.fw-ph strong { font-size: 22px; color: #4a5568; }
.thumb-doc { align-self: stretch; width: 100%; padding: 10px 14px; font-size: 9.5px; color: #4a5568; overflow: hidden; background: #fff; }
.thumb-doc-title { font-weight: 700; font-size: 11px; margin-bottom: 4px; color: #1c2430; }
.thumb-doc-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.45; }
.ic-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ic-head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.ic-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ic-foot { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ic-menu { font-size: 16px; padding: 0 6px; }
.thumb-offscreen { position: fixed; left: -12000px; top: 0; width: 960px; height: 600px; visibility: hidden; pointer-events: none; }

/* ---------- presentations ---------- */
.pres-editor { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.pres-title { font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres-body { flex: 1; display: flex; min-height: 0; }
.pres-slides { width: 190px; flex: none; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.pres-slide-item { position: relative; display: flex; gap: 6px; cursor: pointer; user-select: none; border-top: 3px solid transparent; }
.pres-slide-item.drop-before { border-top-color: var(--accent); }
.pres-slide-item .slide-scaled { border: 2px solid var(--line); border-radius: 3px; }
.pres-slide-item.active .slide-scaled { border-color: var(--accent); }
.psi-num { width: 14px; font-size: 11px; color: var(--muted); text-align: right; flex: none; }
.psi-ext { position: absolute; right: 4px; top: 4px; font-size: 9px; background: var(--warn); color: var(--on-status); border-radius: 3px; padding: 0 4px; }
.pres-center { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.pres-stage-wrap { flex: 1; overflow: auto; padding: 20px; position: relative; display: flex; flex-direction: column; align-items: center; }
.pres-stage { box-shadow: 0 4px 18px rgba(20,33,61,.18); flex: none; }
.pres-zoom { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.pres-notes { flex: none; border-radius: 0; border-left: 0; border-right: 0; min-height: 64px; }
.pres-props { width: 240px; flex: none; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--line); padding: 4px 12px 12px; }
.pres-props h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 12px 0 6px; }
.pres-props .row .field { flex: 1; }
.pp-actions { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.pp-comment { padding: 4px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.slide-scaled { overflow: hidden; flex: none; position: relative; }
.slide { position: relative; width: 960px; height: 540px; overflow: hidden; background: #fff; color: #1c2430; font-family: Helvetica, Arial, sans-serif; }
.sl-shape { position: absolute; box-sizing: border-box; }
.slide.editable .sl-shape { cursor: move; }
.slide.editable .sl-shape:hover { outline: 1px dashed #8fb5ea; }
.slide.editable.guides .sl-text:empty { outline: 1px dashed #c3ccd8; }
.sl-shape.selected { outline: 2px solid #1f6fd1 !important; }
.sl-text { width: 100%; height: 100%; overflow: hidden; line-height: 1.3; outline: none; }
.sl-text ul, .sl-text ol { margin: 0; padding-left: 1.3em; }
.sl-text li::marker { color: var(--bullet, inherit); }
.sl-text p { margin: 0 0 .3em; }
.slide.editable .sl-text:empty::before { content: attr(data-ph); color: #9aa5b5; }
.sl-text[contenteditable=true] { cursor: text; background: rgba(31,111,209,.04); }
.sl-math { display: flex; align-items: center; height: 100%; font-family: "Times New Roman", serif; font-style: italic; }
.sl-num { position: absolute; font-size: 14px; }
.sl-t-entity .thumb, .sl-t-entity .thumb-doc { width: 100%; height: 100%; background: transparent; border: 0; }
.sl-missing { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border: 1px dashed #c3ccd8; color: #8a94a3; }
.sl-handle { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid #1f6fd1; border-radius: 2px; z-index: 5; }
.sl-handle.se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.sl-handle.rot { left: calc(50% - 6px); top: -26px; border-radius: 50%; cursor: grab; }
.pres-thumb { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #e9edf3; }
.present-overlay { position: fixed; inset: 0; background: #000; z-index: 300; display: flex; align-items: center; justify-content: center; outline: none; }
.present-stage { display: flex; align-items: center; justify-content: center; }
.present-close { position: absolute; top: 10px; right: 14px; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 4px; font-size: 20px; width: 32px; height: 32px; opacity: .4; }
.present-close:hover { opacity: 1; }
.present-end { color: #ddd; font-size: 18px; }
@media (max-width: 900px) { .pres-props { display: none; } .pres-slides { width: 120px; } }

/* ---------- DoDAF / UAF ---------- */
.fw-catalog { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 14px; }
.fw-catalog summary { cursor: pointer; font-weight: 600; }
.fw-vps { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 10px; }
.fw-vp h4 { font-size: 12px; margin: 0 0 4px; }
.fw-prod { display: block; padding: 2px 0; font-size: 12.5px; color: var(--text); }
.fw-prod:hover { color: var(--accent); }
.fw-desc { max-width: 820px; font-size: 13px; }
.fw-body .thumb { height: 340px; max-width: 760px; border: 1px solid var(--line); border-radius: var(--radius); }
.fw-matrix { max-height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); }
.fw-matrix th.fw-colh { writing-mode: vertical-rl; transform: rotate(180deg); max-height: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.fw-matrix tbody th { position: sticky; left: 0; background: var(--panel); text-align: left; font-weight: 500; z-index: 1; white-space: nowrap; }
.fw-cell { text-align: center; cursor: pointer; min-width: 28px; color: var(--ok); font-weight: 700; border-left: 1px solid var(--line-2); }
.fw-cell:hover { background: var(--accent-2) !important; }
.fw-cell.na { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--line-2) 4px 6px); cursor: not-allowed; }
.fw-flow.condensed td { padding: 2px 8px; font-size: 12px; }
.fw-tools { border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.uaf-grid-wrap { margin-top: 10px; max-height: 60vh; }
.uaf-grid { border-collapse: collapse; font-size: 11.5px; }
.uaf-grid th, .uaf-grid td { border: 1px solid var(--line); padding: 4px; vertical-align: top; }
.uaf-grid thead th { background: var(--panel-2); position: sticky; top: 0; z-index: 1; min-width: 90px; }
.uaf-grid tbody th { background: var(--panel-2); text-align: left; white-space: nowrap; }
.uaf-cell { min-width: 90px; }
.uaf-btn { display: block; width: 100%; text-align: left; border: 0; background: var(--accent-2); color: var(--accent); border-radius: 3px; padding: 1px 5px; margin: 1px 0; font-size: 11px; }
.uaf-btn:hover { background: var(--sel-bg); color: var(--text); }
.uaf-btn.na { background: var(--line-2); color: var(--muted); }
.uaf-count { float: right; background: var(--ok-bg); color: var(--ok); border-radius: var(--r-pill); padding: 0 6px; font-size: var(--fs-xs); font-weight: 600; }
.fw-misconf { margin: 0 0 12px; }

/* ---------- help ---------- */
.help-page { display: flex; height: 100%; min-height: 0; }
.help-side { width: 270px; flex: none; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 0; }
.help-side input { margin: 0 12px 10px; width: calc(100% - 24px); }
.help-side h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 12px 16px 4px; }
.help-link { display: block; padding: 4px 16px; color: var(--text); font-size: 13.5px; }
.help-link:hover { background: var(--line-2); text-decoration: none; }
.help-link.active { background: var(--accent-2); color: var(--accent); font-weight: 600; }
.help-main { flex: 1; min-width: 0; overflow-y: auto; }
.help-article { max-width: 860px; margin: 0 auto; padding: 24px 32px 60px; line-height: 1.6; }
.help-article h1 { font-size: 24px; margin-bottom: 4px; }
.help-article h2 { font-size: 18px; margin-top: 1.4em; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.help-article h3 { font-size: 15px; margin-top: 1.2em; }
.help-article code, .help-article kbd { font-family: var(--mono); font-size: 12.5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }
.help-article kbd { box-shadow: inset 0 -1px 0 var(--line); }
.help-article table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 13px; }
.help-article th, .help-article td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
.help-article th { background: var(--panel-2); }
.help-article ol li, .help-article ul li { margin: 3px 0; }
.help-lede { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.help-open { margin: 6px 0 14px; }
.help-hit { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.help-hit .snip { color: var(--muted); font-size: 13px; }
.help-hit mark, .help-article mark { background: var(--warn-bg); color: inherit; padding: 0 1px; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 12px 0; }
.help-card { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); }
.help-card:hover { border-color: var(--accent); text-decoration: none; }
.help-card span { display: block; color: var(--muted); font-size: 12.5px; }
.help-note { background: var(--accent-2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 4px; margin: 10px 0; }
@media (max-width: 760px) { .help-page { flex-direction: column; } .help-side { width: 100%; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--line); } .help-article { padding: 16px; } }

/* ---------- dark theme: shared components from other stylesheets ---------- */
[data-theme=dark] .card, [data-theme=dark] .sidebar, [data-theme=dark] .toolbar, [data-theme=dark] .diag-tools,
[data-theme=dark] .diag-side, [data-theme=dark] .diag-left, [data-theme=dark] .diag-tile, [data-theme=dark] .doc-card,
[data-theme=dark] .type-card, [data-theme=dark] .ent-panel, [data-theme=dark] .ai-panel, [data-theme=dark] .tc-suite,
[data-theme=dark] .side-rail, [data-theme=dark] .diag-selbar { background-color: var(--panel); color: var(--text); border-color: var(--line); }
[data-theme=dark] .grid-table, [data-theme=dark] table.grid-table { background: var(--panel); }
[data-theme=dark] .grid-table td { border-color: var(--line-2); }
[data-theme=dark] input, [data-theme=dark] select, [data-theme=dark] textarea { color-scheme: dark; }
[data-theme=dark] .thumb { background: #e9edf3; }
[data-theme=dark] .rt-view a, [data-theme=dark] .ent-link:hover { color: var(--accent); }
[data-theme=dark] .muted { color: var(--muted); }
[data-theme=dark] .label-chip { background: var(--chip-bg); border-color: var(--chip-line); color: var(--chip-text); }
[data-theme=dark] .error-box { color: var(--text); }
/* chart widgets: scale the SVG to fit the widget body */
.widget[data-type=pie] .widget-body, .widget[data-type=bar] .widget-body { display: flex; overflow: hidden; padding: 6px; }
.widget[data-type=pie] .chart-svg, .widget[data-type=bar] .chart-svg { width: 100%; height: 100%; max-height: none; }
.pm-folders h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 12px 12px 6px; font-weight: 600; }
path.chart-mark { stroke: var(--panel); }

/* dark theme: panels and text that other stylesheets hard-code for the light theme */
[data-theme=dark] .ai-panel, [data-theme=dark] .ai-msg.bot, [data-theme=dark] .ai-example, [data-theme=dark] .type-card,
[data-theme=dark] .diag-side, [data-theme=dark] .diag-left, [data-theme=dark] .pal-ghost, [data-theme=dark] .ep-head,
[data-theme=dark] .spider-pop, [data-theme=dark] .risk-list, [data-theme=dark] .color-pop, [data-theme=dark] .rt-editor,
[data-theme=dark] .rt-char, [data-theme=dark] .doc-card, [data-theme=dark] .doc-tabs, [data-theme=dark] .doc-paper,
[data-theme=dark] .imp-step, [data-theme=dark] .q-table-wrap, [data-theme=dark] .ep-rel, [data-theme=dark] .ep-foot,
[data-theme=dark] .doc-table th, [data-theme=dark] .zoom-box .zoom-pct:focus { background: var(--panel); color: var(--text); }
[data-theme=dark] .doc-edit[contenteditable="true"] { background: var(--input-bg); box-shadow: 0 0 0 2px var(--focus); }
[data-theme=dark] .doc-num, [data-theme=dark] .doc-desc, [data-theme=dark] .doc-intro { color: var(--text-2); }
[data-theme=dark] .doc-row.locked .doc-name, [data-theme=dark] .doc-row.locked .doc-num { color: var(--muted); }
[data-theme=dark] .doc-banner, [data-theme=dark] .imp-warn, [data-theme=dark] .ad-warn, [data-theme=dark] .doc-badge-warn,
[data-theme=dark] .tl-warn, [data-theme=dark] .q-cell.manual { background: var(--warn-bg) !important; border-color: var(--warn); color: var(--warn); }
[data-theme=dark] .doc-row.found > td, [data-theme=dark] .tc-changed td, [data-theme=dark] .vc-item.removed,
[data-theme=dark] .issue-list .issue { background: var(--warn-bg) !important; color: var(--text); }
[data-theme=dark] .doc-chg.added, [data-theme=dark] .doc-chg.relationship, [data-theme=dark] .doc-changes ins { background: var(--ok-bg); color: var(--ok); }
[data-theme=dark] .doc-chg.removed, [data-theme=dark] .doc-changes del { background: var(--danger-bg); color: var(--danger); }
[data-theme=dark] .doc-chg.modified { background: var(--warn-bg); color: var(--warn); }
[data-theme=dark] .rt-view mark, [data-theme=dark] .rt-area mark, [data-theme=dark] .tree-row.flash { background: var(--warn-bg) !important; color: var(--text); }
[data-theme=dark] .grid-table th, [data-theme=dark] .grid-table td { color: inherit; }
[data-theme=dark] .dt-desc { color: var(--text-2); }
.help-link.howto::before { content: 'How to · '; color: var(--muted); font-size: 11.5px; }
.help-link.howto.active::before { color: inherit; }
