
[data-theme="light"] {
  --bg-canvas: #f4f5f7;
  --bg-card: #ffffff;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.05);
  --shadow-pop: 0 10px 30px rgba(16, 24, 40, 0.14);
  --c-lk: #3b6ef5; --c-pr: #12a150; --c-lb: #e8890c; --c-srs: #8b5cf6;
  --ok-soft: rgba(26, 127, 55, 0.11); --warn-soft: rgba(178, 106, 0, 0.13);
}
[data-theme="dark"] {
  --bg-canvas: #050506;
  --bg-card: #0e0e10;
  --shadow-card: none;
  --shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.6);
  --c-lk: #6b8cff; --c-pr: #3fb97a; --c-lb: #f0a040; --c-srs: #a58bfa;
  --ok-soft: rgba(63, 185, 80, 0.14); --warn-soft: rgba(210, 153, 34, 0.16);
}

.view-body { flex: 1; overflow: auto; min-height: 0; background: var(--bg-canvas); padding: 28px 32px 40px; font-size: 14px; }
.page { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.page--narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head-main { min-width: 0; flex: 1 1 420px; }
.page-title { font-size: 24px; line-height: 1.25; font-weight: 650; color: var(--text-primary); letter-spacing: -0.01em; }
.page-sub { margin-top: 6px; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.page-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-width: 0; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sect-title { font-size: 14px; font-weight: 600; color: var(--text-muted); margin: 6px 0 -6px; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow-card); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.card-sub { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-top: 3px; font-weight: 400; }
.card--flush { padding: 0; overflow: hidden; }
.card-note, .hint { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.card > .card-note { margin-top: 10px; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); font-size: 13.5px; line-height: 1.55; }
.callout .ico { flex-shrink: 0; margin-top: 1px; }
.callout--warn { border-color: var(--warning); background: var(--warn-soft); }
.callout--err { border-color: var(--danger); background: var(--danger-tint); }
.callout--ok { border-color: var(--success); background: var(--ok-soft); }

.btn-primary, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.btn-primary.btn-lg { padding: 11px 24px; font-size: 14px; }
.btn-primary.btn-sm, .btn-ghost.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; color: var(--text-secondary); cursor: pointer; }
.btn-icon:hover { background: var(--bg-chip); color: var(--text-primary); }
.btn-icon.danger:hover { color: var(--danger); background: var(--danger-tint); }
.link { color: var(--accent); cursor: pointer; background: none; border: none; font: inherit; padding: 0; text-decoration: none; }
.link:hover { text-decoration: underline; }
.ico { display: inline-block; flex-shrink: 0; vertical-align: middle; }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--bg-chip); border: 1px solid var(--border); font-size: 12px; color: var(--text-secondary); line-height: 1.4; max-width: 100%; text-align: left; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 12px; line-height: 1.4; font-weight: 600; white-space: nowrap; background: var(--bg-chip); color: var(--text-secondary); }
.badge--ok { background: var(--ok-soft); color: var(--success); }
.badge--warn { background: var(--warn-soft); color: var(--warning); }
.badge--err { background: var(--danger-tint); color: var(--danger); }
.badge--accent { background: var(--accent-soft); color: var(--accent); }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip-id { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--bg-chip); border: 1px solid var(--border); font-size: 11.5px; color: var(--text-chip); line-height: 1.55; font-weight: 500; }
.chip-toggle { cursor: pointer; user-select: none; }
.chip-toggle.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; }
.input, .textarea, .select { width: 100%; padding: 9px 12px; background: var(--bg-input); border: 1px solid var(--border-input); border-radius: 10px; font-size: 14px; line-height: 1.5; font-family: inherit; color: var(--text-primary); outline: none; letter-spacing: normal; transition: border-color 0.15s, box-shadow 0.15s; }
.textarea { resize: vertical; min-height: 96px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input:disabled { opacity: 0.6; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

.hero { text-align: center; padding: 18px 0 2px; }
.hero h1 { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.hero p { margin: 10px auto 0; max-width: 640px; font-size: 15px; color: var(--text-secondary); line-height: 1.55; }
.composer { background: var(--bg-card); border: 1px solid var(--border-input); border-radius: 18px; box-shadow: var(--shadow-card); transition: border-color 0.15s, box-shadow 0.15s; }
.composer:focus-within, .composer.drag { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.composer-text { display: block; width: 100%; border: none; background: transparent; resize: none; outline: none; padding: 20px 22px 8px; font-family: inherit; font-size: 16px; line-height: 1.55; color: var(--text-primary); min-height: 150px; letter-spacing: normal; }
.composer-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: var(--radius-pill); background: var(--bg-chip); border: 1px solid var(--border); font-size: 13px; max-width: 280px; }
.file-chip .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button { border: none; background: transparent; color: var(--text-muted); cursor: pointer; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.file-chip button:hover { color: var(--danger); background: var(--danger-tint); }
.composer-foot { display: flex; align-items: center; gap: 12px; padding: 10px 14px 14px 18px; flex-wrap: wrap; }
.composer-foot .hint { flex: 1; min-width: 200px; }
.composer-foot .btn-primary { margin-left: auto; }
.ex-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-card { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; border-radius: var(--radius-pill); background: var(--bg-card); border: 1px solid var(--border); cursor: pointer; font-family: inherit; color: var(--text-primary); text-align: left; transition: border-color 0.15s, background 0.15s; }
.ex-card:hover { border-color: var(--accent); }
.ex-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ex-card.on { border-color: var(--accent); background: var(--accent-soft); }
.ex-card b { font-size: 13.5px; font-weight: 500; }
.ex-card span { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }

.busy { display: flex; align-items: center; gap: 14px; padding: 6px 0; color: var(--text-secondary); font-size: 14px; }
.busy .spinner { flex-shrink: 0; }
.busy-big { padding: 34px 20px; justify-content: center; flex-direction: column; text-align: center; gap: 16px; }
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--bg-chip) 25%, var(--border) 37%, var(--bg-chip) 63%); background-size: 400% 100%; animation: skel 1.4s ease infinite; height: 16px; }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.flow { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.flow-step { display: inline-flex; align-items: center; gap: 8px; }
.flow-step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-chip); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; }
.flow-step.done i { background: var(--success); border-color: var(--success); color: #fff; }
.flow-step.cur { color: var(--text-primary); font-weight: 600; }
.flow-step.cur i { background: var(--accent); border-color: var(--accent); color: #fff; }
.flow-line { width: 28px; height: 2px; border-radius: 2px; background: var(--border-input); }
.flow-line.done { background: var(--success); }

.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.strip.sticky { position: sticky; top: -28px; z-index: 6; padding: 10px 0; background: var(--bg-canvas); }
.tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px; box-shadow: var(--shadow-card); min-width: 0; }
.tile-label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.tile-value { font-size: 22px; font-weight: 700; line-height: 1.25; margin-top: 3px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tile-value small { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.tile-sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; line-height: 1.45; }
.tile.ok { border-color: var(--success); }
.tile.ok .tile-value { color: var(--success); }
.tile.bad { border-color: var(--danger); background: var(--danger-tint); }
.tile.bad .tile-value { color: var(--danger); }
.tile.warn { border-color: var(--warning); }
.tile.warn .tile-value { color: var(--warning); }
.progress { height: 7px; border-radius: 7px; background: var(--bg-chip); overflow: hidden; margin-top: 9px; }
.progress > div { height: 100%; border-radius: 7px; background: var(--success); transition: width 0.3s; }
.progress.bad > div { background: var(--danger); }
.progress.run > div { background: var(--accent); }
.stack { display: flex; height: 9px; border-radius: 9px; overflow: hidden; background: var(--bg-chip); margin-top: 10px; gap: 2px; }
.stack > span { display: block; height: 100%; min-width: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.legend .dot, .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.c-lk { background: var(--c-lk); } .c-pr { background: var(--c-pr); } .c-lb { background: var(--c-lb); } .c-srs { background: var(--c-srs); }

.tabs-bar { position: sticky; top: -28px; z-index: 6; background: var(--bg-canvas); padding-top: 8px; margin-top: -4px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 11px 13px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: inherit; font-size: 13.5px; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab-count { padding: 0 7px; border-radius: var(--radius-pill); background: var(--bg-chip); font-size: 11.5px; color: var(--text-secondary); font-weight: 500; }
.tab-count.alert { background: var(--danger); color: #fff; }
.tab-content { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }

.plan { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.plan th { text-align: left; font-size: 12.5px; color: var(--text-muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.plan th.num, .plan td.num { text-align: center; }
.plan td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.plan tr.mod td { background: var(--bg-hint); font-weight: 600; padding: 10px 8px; }
.plan tr.tot td { font-weight: 700; border-bottom: none; background: var(--bg-hint); }
.plan .idc { color: var(--text-muted); font-size: 12.5px; white-space: nowrap; padding-top: 12px; width: 44px; }
.plan td.sum { font-weight: 600; padding-top: 12px; }
.plan .hd { display: inline-flex; align-items: center; gap: 5px; }
.plan input.num { width: 56px; padding: 6px 4px; text-align: center; background: var(--bg-input); border: 1px solid var(--border-input); border-radius: 8px; color: var(--text-primary); font-family: inherit; font-size: 13.5px; }
.plan input.num.zero { color: var(--text-muted); background: transparent; border-color: var(--border); }
.plan input.num:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.plan input.num:disabled { opacity: 0.35; }
.plan input.ttl, .plan input.sub { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--text-primary); font-family: inherit; padding: 6px 8px; letter-spacing: normal; }
.plan input.ttl { font-size: 14px; font-weight: 550; }
.plan input.sub { font-size: 12.5px; color: var(--text-secondary); padding-top: 2px; padding-bottom: 2px; }
.plan input.ttl:hover, .plan input.sub:hover { border-color: var(--border-input); }
.plan input.ttl:focus, .plan input.sub:focus { border-color: var(--accent); outline: none; background: var(--bg-input); }
.plan .links { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; padding: 3px 8px 0; min-height: 22px; }
.plan tr.bad td { background: var(--danger-tint); }
.plan-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
@media (max-width: 1180px) { .plan input.num { width: 44px; } .plan td, .plan th { padding-left: 4px; padding-right: 4px; } .plan .idc { width: 34px; } }

.acc { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); box-shadow: var(--shadow-card); overflow: hidden; }
.acc + .acc { margin-top: 10px; }
.acc-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; user-select: none; flex-wrap: wrap; }
.acc-head:hover { background: var(--bg-hint); }
.acc-chev { transition: transform 0.15s; color: var(--text-muted); }
.acc.open > .acc-head .acc-chev { transform: rotate(90deg); }
.acc-title { font-weight: 600; font-size: 14.5px; flex: 1; min-width: 180px; line-height: 1.4; }
.acc-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.acc-body { display: none; padding: 4px 20px 18px 44px; border-top: 1px solid var(--border); }
.acc.open > .acc-body { display: block; }
.acc-body h4 { font-size: 12.5px; color: var(--text-muted); margin: 16px 0 6px; font-weight: 600; }
.acc-body ul, .acc-body ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.acc-body li + li { margin-top: 3px; }
.acc-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pre { white-space: pre-wrap; font-size: 14px; line-height: 1.6; }

.menu-wrap { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--bg-card); border: 1px solid var(--border-input); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 50; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: none; background: none; border-radius: 8px; color: var(--text-primary); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; text-decoration: none; }
.menu-item:hover { background: var(--bg-chip); }
.menu-item.danger { color: var(--danger); }
.menu-item .ico { color: var(--text-muted); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.menu.menu-float { position: fixed; right: auto; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; z-index: 300; }
.menu-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.menu-item .tick { margin-left: auto; color: var(--success); }

.kv { display: grid; grid-template-columns: 190px 1fr; gap: 8px 18px; font-size: 14px; line-height: 1.5; }
.kv > div:nth-child(odd) { color: var(--text-muted); font-size: 13px; padding-top: 1px; }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.comp { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--bg-card); }
.comp-head { display: flex; gap: 10px; align-items: flex-start; }
.comp-name { font-weight: 600; font-size: 14px; line-height: 1.4; flex: 1; }
.comp ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.comp li { display: flex; gap: 9px; font-size: 13.5px; line-height: 1.5; }
.kind { flex-shrink: 0; width: 62px; font-size: 12px; font-weight: 600; padding-top: 2px; }
.kind.k-знание { color: var(--c-lk); } .kind.k-умение { color: var(--c-pr); } .kind.k-навык { color: var(--c-srs); }
.comp .std { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

.q { padding: 14px 0; border-bottom: 1px solid var(--border); }
.q:first-child { padding-top: 4px; }
.q:last-child { border-bottom: none; padding-bottom: 2px; }
.q-text { font-size: 14px; font-weight: 600; line-height: 1.55; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 6px 10px; margin-top: 6px; border-radius: 8px; border: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; }
.opt-l { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-chip); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.opt.ok { border-color: var(--success); background: var(--ok-soft); }
.opt.ok .opt-l { background: var(--success); color: #fff; }
.q-answer { margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--success); background: var(--ok-soft); border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.55; }
.q-meta { margin-top: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 8px; }
.slide { border: 1px solid var(--border-input); border-radius: 10px; background: var(--bg-page); padding: 14px 16px; min-height: 150px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-card); }
.slide-n { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.slide-title { font-size: 14px; font-weight: 650; line-height: 1.35; }
.slide ul { padding-left: 16px; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
.slide-notes { margin-top: auto; font-size: 11.5px; color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: 7px; line-height: 1.45; }

.heat { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.heat th { text-align: left; font-size: 12.5px; color: var(--text-muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.heat td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.heat tr:last-child td { border-bottom: none; }
.heat .c { text-align: center; }
.cell { display: inline-flex; min-width: 36px; height: 28px; padding: 0 8px; border-radius: 8px; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--bg-chip); color: var(--text-secondary); }
.cell.ok { background: var(--ok-soft); color: var(--success); }
.cell.warn { background: var(--warn-soft); color: var(--warning); }
.cell.bad { background: var(--danger-tint); color: var(--danger); }
.cell.zero { opacity: 0.55; }

.issue { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; }
.issue:last-child { border-bottom: none; }
.issue .where { color: var(--text-muted); min-width: 120px; font-size: 12.5px; padding-top: 1px; }
.note-list { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); }
.note-list li + li { margin-top: 6px; }
.md h2, .md h3, .md h4 { margin: 18px 0 6px; font-size: 14.5px; }
.md p, .md li { font-size: 13.5px; line-height: 1.6; }
.md ul { padding-left: 20px; }
.table-wrap { overflow-x: auto; }
.stats-table td, .stats-table th { vertical-align: top; }
.check-list { list-style: none; padding: 0; margin: 0; font-size: 13.5px; display: flex; flex-direction: column; gap: 5px; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.check-list li.ok .ico { color: var(--success); }
.check-list li.bad .ico { color: var(--danger); }

.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-card); cursor: pointer; transition: border-color 0.15s; flex-wrap: wrap; }
.item:hover { border-color: var(--accent); }
.item-main { flex: 1 1 280px; min-width: 0; }
.item-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.item-sub { margin-top: 4px; font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.item-del { opacity: 0; transition: opacity 0.15s; }
.item:hover .item-del, .item-del:focus-visible { opacity: 1; }
.item-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); }
.empty { text-align: center; padding: 48px 20px; color: var(--text-secondary); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty .ico { color: var(--text-muted); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .input { max-width: 320px; }

.big-num { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.big-num small { font-size: 18px; font-weight: 500; color: var(--text-secondary); margin-left: 4px; }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.duo .card { display: flex; flex-direction: column; gap: 6px; }
.duo .label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.duo.hero-duo .card.accent { border-color: var(--success); background: var(--ok-soft); }
.cmp { display: flex; flex-direction: column; gap: 12px; }
.cmp-row { display: grid; grid-template-columns: 220px 1fr 80px; gap: 14px; align-items: center; font-size: 13.5px; }
.cmp-bar { height: 24px; border-radius: 8px; background: var(--bg-chip); overflow: hidden; }
.cmp-bar > div { height: 100%; border-radius: 8px; }
.cmp-bar .manual { background: var(--text-muted); opacity: 0.55; }
.cmp-bar .agent { background: var(--success); }
.cmp-val { text-align: right; font-weight: 700; }

.live { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; }
.mock .live { background: var(--warning); }
.sidebar-chats-spacer { flex: 1; }

.action-bar { position: sticky; bottom: -40px; margin: 6px -32px -40px; padding: 12px 32px; background: var(--bg-card); border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; z-index: 8; box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.05); }
.dirty-dot { display: none; align-items: center; gap: 6px; font-size: 12.5px; color: var(--warning); font-weight: 600; }
.dirty-dot.on { display: inline-flex; }

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border-input); font-size: 13.5px; line-height: 1.45; box-shadow: var(--shadow-pop); display: flex; gap: 10px; align-items: flex-start; }
.toast--error { border-color: var(--danger); } .toast--error .ico { color: var(--danger); }
.toast--ok { border-color: var(--success); } .toast--ok .ico { color: var(--success); }

.modal--form { align-items: stretch; text-align: left; max-width: 540px; border-radius: 16px; }
.modal--form.modal--wide { max-width: 760px; }
.modal--form .modal-title { text-align: left; font-size: 17px; }
.modal--form .modal-body { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow: auto; }
.modal--form .modal-actions { justify-content: flex-end; }
.pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; line-height: 1.45; }
.pick:hover { background: var(--bg-chip); }
.pick input { margin-top: 3px; accent-color: var(--accent); }

@media (max-width: 860px) {
  .view-body { padding: 66px 16px 28px; }
  .page-title { font-size: 21px; }
  .hero h1 { font-size: 24px; }
  .action-bar { margin: 6px -14px -28px; padding: 10px 14px; bottom: -28px; }
  .strip.sticky, .tabs-bar { position: static; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 11px 12px; }
  .tile-value { font-size: 18px; }
  .cmp-row { grid-template-columns: 1fr; gap: 4px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .acc-body { padding-left: 18px; }
  .issue { flex-wrap: wrap; }
}

.finding { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg-panel); margin-bottom: 8px; cursor: pointer; }
.finding input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
.finding-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.finding-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.nav-group { margin: 20px 12px 6px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.page-meta { align-items: center; gap: 10px; }
.meta-line { font-size: 13.5px; color: var(--text-secondary); }

.summary { display: grid; grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1.2fr) minmax(220px, 1fr); gap: 0; align-items: stretch; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-card); overflow: hidden; }
.summary > * { padding: 18px 22px; min-width: 0; }
.summary > * + * { border-left: 1px solid var(--border); }
.summary-status { display: flex; align-items: center; gap: 14px; text-align: left; border: none; background: none; font-family: inherit; cursor: pointer; color: var(--text-primary); transition: background 0.15s; }
.summary-status:hover { background: var(--bg-hint); }
.summary-status b { display: block; font-size: 15px; font-weight: 650; line-height: 1.3; }
.summary-status small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
.summary-status.ok .ico { color: var(--success); }
.summary-status.warn .ico { color: var(--warning); }
.summary-status.bad .ico { color: var(--danger); }
.summary-num { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.summary-num small { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.summary-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; align-content: center; font-size: 13px; color: var(--text-secondary); }
.summary-facts b { color: var(--text-primary); font-size: 15px; margin-right: 3px; }

.tab { padding: 12px 14px; }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-count { align-self: center; line-height: 1.6; }
.tab-content { gap: 18px; }

@media (max-width: 860px) {
  .summary { grid-template-columns: 1fr; }
  .summary > * + * { border-left: none; border-top: 1px solid var(--border); }
  .item-del { opacity: 1; }
}

.callout { overflow-wrap: anywhere; }
.menu { min-width: 260px; }
.quote { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--border-input); background: var(--bg-panel); border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); white-space: pre-wrap; }

.busy-overlay { z-index: 150; }
.busy-modal { max-width: 480px; width: 100%; padding: 0; text-align: left; overflow: hidden; }

.textarea.grow { min-height: 44px; overflow: hidden; resize: none; }
.params-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 18px; }
.params-grid + .params-grid { margin-top: 14px; }
.params-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.params-grid .span-2 { grid-column: span 2; }
.params-grid .span-3 { grid-column: span 3; }

.workload { display: flex; flex-direction: column; }
.acc-meta-inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.act-list { display: flex; flex-direction: column; gap: 12px; padding-top: 10px; align-items: flex-start; }
.act { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg-panel); }
.act-head { display: flex; gap: 10px; align-items: center; }
.act-head .dd { flex: 1; min-width: 0; max-width: 280px; }
.act-n { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-chip); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.act-hours { display: inline-flex; align-items: center; gap: 6px; }
.act-hours .input { width: 84px; }
.act-head .btn-icon { margin-left: auto; }
.act-text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 10px; }

.issue .issue-msg { flex: 1; min-width: 0; }
.issue .btn-sm { flex-shrink: 0; margin-top: -4px; }

.mobile-bar { display: none; }

@media (max-width: 860px) {
  .params-grid, .params-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .params-grid .span-3 { grid-column: span 2; }
  .act-text { grid-template-columns: 1fr; }
  .act-head { flex-wrap: wrap; }
  .act-head .dd { max-width: none; }
  .mobile-bar { display: flex; align-items: center; position: fixed; top: 0; left: 0; right: 0; height: 50px; padding: 0 16px 0 56px; background: var(--bg-panel); border-bottom: 1px solid var(--border); z-index: 35; }
  .mobile-brand { font-weight: 700; font-size: 15px; color: var(--text-primary); text-decoration: none; }
  .busy-modal { margin: 0 16px; }
}

@media (max-width: 520px) {
  .params-grid, .params-grid--two { grid-template-columns: 1fr; }
  .params-grid .span-2, .params-grid .span-3 { grid-column: auto; }
}

.set-card { padding: 0; overflow: hidden; }
.set-head { display: flex; align-items: center; gap: 8px; padding: 16px 24px; font-size: 15px; font-weight: 600; color: var(--text-primary); border-bottom: 1px solid var(--border); }
.set-rows { padding: 0 24px; }
.set-row { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: 24px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: none; }
.set-label { font-size: 14px; color: var(--text-primary); line-height: 1.4; overflow-wrap: anywhere; }
.set-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.set-control { width: 100%; max-width: 620px; }
.set-control > .switch { display: block; }
.set-inline { display: flex; gap: 10px; align-items: center; }
.set-inline > .input, .set-inline > .select { flex: 1; min-width: 0; }
.set-inline > .set-hint { margin: 0; }
.set-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.set-pair label { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-muted); }
.set-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--bg-panel); flex-wrap: wrap; }
.set-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); min-width: 0; overflow-wrap: anywhere; }
.set-status.ok { color: var(--success); }
.set-status.warn { color: var(--warning); }
.set-status.err { color: var(--danger); }
.switch { -webkit-appearance: none; appearance: none; width: 38px; height: 22px; margin: 0; border-radius: 11px; background: var(--border-input); position: relative; cursor: pointer; flex-shrink: 0; transition: background 0.15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 720px) {
  .set-row { grid-template-columns: 1fr; gap: 8px; }
  .set-rows { padding: 0 16px; }
  .set-head, .set-foot { padding-left: 16px; padding-right: 16px; }
  .set-control { max-width: none; }
}

.dd { position: relative; width: 100%; min-width: 0; }
.dd-btn { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--bg-input); border: 1px solid var(--border-input); border-radius: 10px; font: inherit; font-size: 14px; line-height: 1.5; color: var(--text-primary); text-align: left; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.dd-btn:hover { border-color: var(--text-muted); }
.dd-btn:focus-visible, .dd.open .dd-btn { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd-btn:disabled { opacity: 0.6; cursor: default; }
.dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-label.muted { color: var(--text-muted); }
.dd-hint { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.dd-chev { flex-shrink: 0; color: var(--text-muted); transition: transform 0.15s; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd-pop { position: fixed; z-index: 400; display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border-input); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; overflow: hidden; }
.dd-search { flex-shrink: 0; margin-bottom: 6px; padding: 8px 10px; border: 1px solid var(--border-input); border-radius: 8px; background: var(--bg-input); color: var(--text-primary); font: inherit; font-size: 13.5px; outline: none; }
.dd-search:focus { border-color: var(--accent); }
.dd-list { overflow-y: auto; min-height: 0; }
.dd-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; line-height: 1.4; color: var(--text-primary); cursor: pointer; }
.dd-opt.active { background: var(--bg-chip); }
.dd-opt.on { font-weight: 600; }
.dd-opt-text { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.dd-opt-text .dd-hint { font-weight: 400; }
.dd-tick { flex-shrink: 0; color: var(--accent); }
.dd-empty { padding: 10px; font-size: 13px; color: var(--text-muted); }
.set-inline > .dd { flex: 1; }

.gen { animation: gen-in 0.35s ease-out both; padding: 24px 26px; display: flex; flex-direction: column; gap: 18px; }
.gen.card { padding: 26px 28px; }
.gen-top { display: flex; align-items: center; gap: 16px; }
.gen-head { flex: 1; min-width: 0; }
.gen-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.gen-sub { font-size: 13px; color: var(--text-secondary); margin-top: 3px; line-height: 1.45; }
.gen-time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-muted); padding: 4px 10px; border-radius: 999px; background: var(--bg-chip); }
.gen-orb { position: relative; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--accent-soft); animation: gen-spin 2.4s linear infinite; }
.gen-orb span { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); top: 50%; left: 50%; margin: -4px; }
.gen-orb span:nth-child(1) { transform: translate(0, -13px); }
.gen-orb span:nth-child(2) { transform: translate(11px, 7px); opacity: 0.7; }
.gen-orb span:nth-child(3) { transform: translate(-11px, 7px); opacity: 0.45; }
.gen.finished .gen-orb { animation: none; background: var(--ok-soft); }
.gen.finished .gen-orb span { background: var(--success); }
.gen-bar { position: relative; height: 6px; border-radius: 999px; background: var(--bg-chip); overflow: hidden; }
.gen-bar > span { position: absolute; left: 0; top: 0; bottom: 0; width: 6%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ff6b6b, var(--accent)); background-size: 200% 100%; animation: gen-shimmer 1.6s linear infinite; transition: width 0.6s ease; }
.gen-bar.indeterminate > span { width: 35% !important; animation: gen-slide 1.4s ease-in-out infinite, gen-shimmer 1.6s linear infinite; }
.gen.finished .gen-bar > span { background: var(--success); animation: none; }
.gen-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.gen-step { display: grid; grid-template-columns: 22px auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--text-muted); font-size: 14px; transition: background 0.25s, color 0.25s; }
.gen-step .gen-note { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transition: opacity 0.25s; }
.gen-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-input); display: inline-flex; align-items: center; justify-content: center; color: transparent; transition: background 0.25s, border-color 0.25s, color 0.25s; }
.gen-dot svg { transform: scale(0.4); transition: transform 0.25s; }
.gen-step.cur { color: var(--text-primary); background: var(--bg-panel); font-weight: 500; }
.gen-step.cur .gen-note { opacity: 1; }
.gen-step.cur .gen-dot { border-color: var(--accent); border-right-color: transparent; animation: gen-spin 0.9s linear infinite, gen-pulse 1.4s ease-out infinite; }
.gen-step.done { color: var(--text-secondary); }
.gen-step.done .gen-dot { background: var(--success); border-color: var(--success); color: #fff; animation: gen-pop 0.3s ease-out; }
.gen-step.done .gen-dot svg { transform: scale(1); }
@keyframes gen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes gen-spin { to { transform: rotate(360deg); } }
@keyframes gen-shimmer { from { background-position: 0 0; } to { background-position: -200% 0; } }
@keyframes gen-slide { from { left: -35%; } to { left: 100%; } }
@keyframes gen-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-soft); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes gen-pop { 0% { transform: scale(0.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 0.7s !important; animation-iteration-count: infinite !important; }
  .gen-orb { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; }
  .gen-step.cur .gen-dot { animation-duration: 0.9s, 1.4s !important; animation-iteration-count: infinite !important; }
  .gen-bar > span { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; transition-duration: 0.6s !important; }
  .gen-bar.indeterminate > span { animation-duration: 1.4s, 1.6s !important; }
  .gen-step, .gen-dot, .gen-dot svg, .gen-note { transition-duration: 0.25s !important; }
}
@media (max-width: 520px) { .gen-step { grid-template-columns: 22px minmax(0, 1fr); } .gen-step .gen-note { grid-column: 2; } .gen.card { padding: 20px 18px; } }
.dd-opt.disabled { color: var(--text-muted); cursor: not-allowed; }
.dd-opt.disabled.active { background: transparent; }

/* library search hits and the approval line of a built program */
.hit { padding: 10px 0; border-top: 1px solid var(--border); }
.hit:first-child { border-top: 0; }
.approval-line { display: flex; align-items: center; gap: 6px; margin: -6px 0 14px; }

/* stop button of a running operation */
.gen-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.gen-stop:disabled { opacity: 0.7; cursor: default; }
.ico.flip { transform: rotate(180deg); }
.sub-title { margin: 18px 0 6px; font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.summary-fact { border: none; background: none; padding: 2px 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.summary-fact:hover { color: var(--accent); }
.summary-fact:hover b { color: var(--accent); }

/* segmented switch inside a tab */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg-chip); border: 1px solid var(--border); flex-wrap: wrap; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; padding: 7px 14px; border-radius: 8px; font: inherit; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.seg-btn:hover { color: var(--text-primary); }
.seg-btn.on { background: var(--bg-card); color: var(--text-primary); font-weight: 600; box-shadow: var(--shadow-card); }
.seg-count { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }

/* document preview: a page of the program as Word shows it */
.doc-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.doc-bar .hint { flex: 1; min-width: 240px; }
.doc-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.doc-toc { position: sticky; top: 40px; max-height: calc(100vh - 120px); overflow: auto; display: flex; flex-direction: column; gap: 1px; padding: 4px 0; }
.doc-toc-title { font-size: 12.5px; color: var(--text-muted); font-weight: 600; padding: 0 10px 6px; }
.doc-toc-item { text-align: left; border: none; background: none; font: inherit; font-size: 12.5px; line-height: 1.35; color: var(--text-secondary); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.doc-toc-item:hover { background: var(--bg-chip); color: var(--text-primary); }
.doc-toc-item.sub { padding-left: 22px; font-size: 12px; color: var(--text-muted); }
.doc-paper { background: #fff; color: #1a1a1a; border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 2px 10px rgba(16, 24, 40, 0.08); padding: 56px 64px; max-width: 860px; width: 100%;
  font-family: 'Times New Roman', Times, serif; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.doc-paper p { margin: 0 0 6px; }
.doc-paper p.empty { margin: 0; height: 0.7em; }
.doc-paper p.b { font-weight: 700; }
.doc-paper p.i { font-style: italic; }
.doc-paper .a-center { text-align: center; }
.doc-paper .a-right { text-align: right; }
.doc-paper .a-justify { text-align: justify; }
.doc-paper p.big { font-size: 17px; }
.doc-paper h2 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; scroll-margin-top: 60px; }
.doc-paper h3 { font-size: 15px; font-weight: 700; margin: 16px 0 8px; scroll-margin-top: 60px; }
.doc-paper h4 { font-size: 15px; font-weight: 700; font-style: italic; margin: 12px 0 6px; }
.doc-paper ul, .doc-paper ol { margin: 0 0 8px; padding-left: 28px; }
.doc-paper li { margin: 2px 0; }
.doc-paper hr.page-break { border: 0; height: 26px; margin: 36px -65px; background: var(--bg-canvas); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.doc-table { overflow-x: auto; margin: 6px 0 14px; }
.doc-paper table { border-collapse: collapse; width: 100%; font-size: 12.5px; line-height: 1.35; }
.doc-paper th, .doc-paper td { border: 1px solid #333; padding: 4px 6px; vertical-align: top; text-align: left; }
.doc-paper th { font-weight: 700; background: #f3f3f3; }
.doc-paper tr.b td { font-weight: 700; }

/* slide preview: the deck as PowerPoint gets it */
.deck { display: flex; flex-direction: column; gap: 12px; }
.deck-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.deck-nav { width: 38px; height: 38px; border: 1px solid var(--border); background: var(--bg-card); }
.deck-nav:disabled { opacity: 0.35; cursor: default; }
.deck-stage { max-width: 820px; width: 100%; margin: 0 auto; container-type: inline-size; border-radius: 10px; outline: none; }
.deck-stage:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); }
.slide-face { aspect-ratio: 16 / 9; width: 100%; background: #fff; color: #1d2433; border: 1px solid var(--border-input); border-radius: 10px; padding: 5% 6%; overflow: hidden; display: flex; flex-direction: column; gap: 3%;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.08); font-family: Calibri, 'Segoe UI', Arial, sans-serif; position: relative; }
.slide-face .sf-title { font-size: 4.4cqw; font-weight: 700; line-height: 1.2; }
.slide-face ul { margin: 0; padding-left: 4.5%; font-size: 2.7cqw; line-height: 1.45; }
.slide-face li + li { margin-top: 0.9cqw; }
.slide-face .sf-sub { font-size: 2.6cqw; color: #5b6475; }
.slide-face.k-title { justify-content: center; align-items: center; text-align: center; background: linear-gradient(135deg, #fff 60%, #fdecec); }
.slide-face.k-title .sf-title { font-size: 5.4cqw; }
.slide-face.k-section { justify-content: center; border-left: 1.4cqw solid var(--accent); }
.slide-face.k-section .sf-title { font-size: 4.8cqw; }
.slide-face.k-content .sf-title { padding-bottom: 2%; border-bottom: 0.3cqw solid #e6e8ee; }
.deck-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 820px; width: 100%; margin: 0 auto; }
.deck-count { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.deck-notes { max-width: 820px; width: 100%; margin: 0 auto; font-size: 13px; line-height: 1.55; color: var(--text-secondary); }
.deck-notes:empty { display: none; }
.deck-notes > div { padding: 10px 14px; border-radius: 10px; background: var(--bg-panel); border: 1px solid var(--border); }
.deck-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.deck-thumb { position: relative; flex: 0 0 136px; container-type: inline-size; border: 2px solid transparent; border-radius: 9px; padding: 0; background: none; cursor: pointer; }
.deck-thumb .slide-face { border-radius: 7px; box-shadow: none; pointer-events: none; }
.deck-thumb.on { border-color: var(--accent); }
.deck-thumb:hover:not(.on) { border-color: var(--border-input); }
.deck-thumb-n { position: absolute; left: 5px; bottom: 4px; font-size: 10px; font-weight: 700; color: #5b6475; background: rgba(255, 255, 255, 0.85); border-radius: 4px; padding: 0 4px; }

.action-bar .dirty-dot { margin-left: 4px; }

@media (max-width: 980px) {
  .doc-wrap { grid-template-columns: 1fr; }
  .doc-toc { display: none; }
}
@media (max-width: 860px) {
  .doc-paper { padding: 28px 20px; font-size: 14px; }
  .doc-paper hr.page-break { margin: 26px -21px; }
  .deck-main { grid-template-columns: minmax(0, 1fr); }
  .deck-nav { display: none; }
  .gen-top { flex-wrap: wrap; }
}
.err-box:empty { display: none; }

/* accounts: who is signed in, the sign-in form, one-time secrets */
.nav-link .nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; display: none; }
.nav-link .nav-count.on { display: inline-block; background: var(--accent); color: #fff; }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-msg { min-height: 18px; color: var(--danger); }
.secret-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.secret-box code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; background: var(--bg-chip); border: 1px solid var(--border); font-size: 14px; overflow-wrap: anywhere; user-select: all; }
.empty-mini { text-align: center; color: var(--text-muted); padding: 26px 20px; }
.seg-count.hot { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 6px; font-weight: 700; }
.next-step { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card); box-shadow: var(--shadow-card); font-size: 13.5px; flex-wrap: wrap; }
.next-step span { flex: 1; min-width: 220px; }
.next-step > .ico { color: var(--success); }

/* review: state, decision, comments and history */
.review-line { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.review-line.wait .ico { color: var(--accent); }
.review-line.bad .ico { color: var(--danger); }
.review-line.ok .ico { color: var(--success); }
.review-line > b { min-width: 104px; font-weight: 600; color: var(--text-secondary); }
.review-state > div + div { margin-top: 10px; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.comment-form { display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.comment-form-row .dd { max-width: 520px; }
.comments { display: flex; flex-direction: column; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.comment:last-child { border-bottom: none; }
.comment.resolved .comment-text { color: var(--text-muted); }
.comment-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.comment-text { font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-answer { font-size: 13px; color: var(--text-secondary); padding: 6px 10px; border-left: 3px solid var(--success); background: var(--ok-soft); border-radius: 0 8px 8px 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; }
.timeline li > .hint:last-child { grid-column: 2; }
.ro-title { font-weight: 550; padding: 6px 8px 0; }
.ro-sub { font-size: 12.5px; color: var(--text-secondary); padding: 2px 8px 0; }
.card-head .btn-ghost { flex-shrink: 0; }

/* review: the expert's decision bar, remarks in the banner */
.decision-bar .btn-lg { min-width: 200px; justify-content: center; }
.decision-count { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); background: none; border: 0; padding: 4px 2px; cursor: pointer; font-family: inherit; }
.decision-count.on { color: var(--warning); font-weight: 600; }
.decision-count:hover { text-decoration: underline; }
.remark-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.remark-list li { display: flex; gap: 8px; align-items: baseline; }
.remark-list .chip-id { flex-shrink: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remark-btn { white-space: nowrap; }
.temp-pass { display: grid; gap: 6px; margin-top: 4px; font-size: 13.5px; }
.temp-pass code { font-size: 15px; }
@media (max-width: 720px) { .decision-bar .btn-lg { min-width: 0; flex: 1 1 100%; } }
.topic-remarks { display: grid; gap: 4px; margin: 6px 8px 2px; padding: 8px 10px; border-radius: 8px; background: var(--danger-tint); border: 1px solid var(--danger); font-size: 12.5px; line-height: 1.45; }
.topic-remarks > div { display: flex; gap: 6px; align-items: baseline; }
.topic-remarks .ico, .topic-remarks svg { flex-shrink: 0; color: var(--danger); }
.tab-content > .topic-remarks { margin: 0 0 12px; }
.next-hint { font-size: 12.5px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.next-hint::before { content: "→ "; }
@media (max-width: 720px) { .next-hint { white-space: normal; } }
/* until the role is known the menu shows only what everyone has, so it does not flash items the person cannot open */
html:not(.role-ready) [data-roles] { display: none !important; }

/* the person at the bottom of the menu */
.sidebar-footer { display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.sidebar-footer .theme-toggle { width: 32px; height: 32px; padding: 0; flex-shrink: 0; border: 0; background: none; color: var(--text-muted); justify-content: center; }
.sidebar-footer .theme-toggle:hover { background: var(--bg-chip); color: var(--text-primary); }
.sidebar-footer { gap: 2px; }
.who-wrap { flex: 1; min-width: 0; position: relative; }
.who { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 6px 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; font-family: inherit; color: inherit; }
.who:hover { background: var(--bg-chip); }
.who-avatar { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-name { font-size: 13px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-role { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.who-out { flex-shrink: 0; color: var(--text-muted); }
.who-out:hover { color: var(--danger); }

/* groups: on the users page, in the user's card and in the composer */
.group-list { display: flex; flex-wrap: wrap; gap: 8px; }
.group-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.check-list { display: flex; flex-direction: column; gap: 6px; }
.check-line { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.composer-group { min-width: 160px; }
.badge-btn { padding: 0; border: 0; background: none; cursor: pointer; }
.badge-btn:hover .badge { filter: brightness(0.95); }
.remark-list li .btn-sm { margin-left: auto; }
.user-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.user-cell:hover b { color: var(--accent); }

/* requests: the head's form, the methodist's queue, the request card and the head's overview */
.crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.req-num { color: var(--text-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.item-link { color: inherit; text-decoration: none; }
.req-next { font-size: 12.5px; color: var(--text-secondary); }
.req-next.mine { color: var(--accent); font-weight: 600; background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.req-toolbar .dd { width: auto; flex: 0 1 200px; min-width: 160px; }
.req-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.req-main { min-width: 0; }
.req-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1199px) { .req-grid { grid-template-columns: minmax(0, 1fr) 280px; } }
@media (max-width: 860px) { .req-grid { grid-template-columns: 1fr; } }
.form-sect + .form-sect { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.form-h { font-size: 16px; font-weight: 650; margin-bottom: 14px; color: var(--text-primary); }
.form-sect > .field + .field, .form-sect > .field-grid + .field, .form-sect > .field + .field-grid, .form-sect > .hint + .field-grid { margin-top: 14px; }
.form-col { display: flex; flex-direction: column; gap: 14px; }
.req-mark { color: var(--accent); }
.field-err { display: none; font-size: 12.5px; color: var(--danger); }
.field-err.on { display: block; }
.field.invalid .input, .field.invalid .textarea, .field.invalid .dd-btn { border-color: var(--danger); }
.err-list { margin: 6px 0 0; padding-left: 18px; }
.err-list .link { text-align: left; }
.ro-value { padding: 6px 0; font-weight: 600; }
.drop-zone { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 16px; border: 1.5px dashed var(--border-input); border-radius: 10px; background: var(--bg-hint); color: var(--text-primary); font: inherit; cursor: pointer; }
.drop-zone:hover, .drop-zone.drag { border-color: var(--accent); background: var(--accent-soft); }
.att-list { display: flex; flex-direction: column; gap: 8px; }
.att-list:not(:empty) + .drop-zone { margin-top: 8px; }
.att { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); }
.att.bad { border-color: var(--warning); background: var(--warn-soft); }
.att-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-main b { overflow-wrap: anywhere; font-weight: 600; font-size: 13.5px; }
.kit-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kit-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--text-primary); font-size: 13px; }
.kit-chip .ico { color: var(--accent); }
.crit-edit { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.crit-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.crit-n { width: 22px; text-align: right; color: var(--text-muted); font-size: 12.5px; flex-shrink: 0; }
.check-sum { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.check-sum li { display: flex; align-items: center; gap: 8px; }
.check-sum li.ok .ico { color: var(--success); }
.check-sum li.todo { color: var(--text-secondary); }
.check-sum li.todo .ico { color: var(--warning); }
.check-sum li.hint-li { color: var(--text-muted); font-size: 12.5px; padding-left: 22px; }
.steps-mini { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.steps-mini li > span { display: block; }
.task { display: flex; flex-direction: column; gap: 18px; padding-top: 6px; }
.task-h { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 650; margin-bottom: 8px; color: var(--text-primary); }
.param-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.param { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.param b { font-size: 14px; overflow-wrap: anywhere; }
.param span { font-size: 12px; color: var(--text-muted); }
.param.unknown b { color: var(--warning); font-weight: 500; font-style: italic; }
.crit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.crit-list li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap; }
.crit-main { flex: 1 1 240px; min-width: 0; }
.people { display: flex; flex-direction: column; gap: 12px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kv-tight { grid-template-columns: 150px 1fr; font-size: 13.5px; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat { display: flex; flex-direction: column; gap: 16px; padding-top: 6px; }
.msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; background: var(--bg-bubble-ai); border: 1px solid var(--border); }
.msg.mine { align-self: flex-end; background: var(--bg-bubble-user); }
.msg.question { border-color: var(--warning); }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.msg-quote { font-size: 12.5px; color: var(--text-secondary); border-left: 3px solid var(--border-input); padding-left: 8px; margin-bottom: 6px; }
.msg-compose { display: flex; gap: 10px; align-items: flex-end; }
.msg-compose .textarea { flex: 1; }
.ws { display: flex; flex-direction: column; gap: 20px; }
.ws-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1280px) { .ws-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ws-tiles { grid-template-columns: 1fr; } }
.ws-tile { display: flex; align-items: flex-start; gap: 12px; color: inherit; text-decoration: none; text-align: left; font: inherit; cursor: pointer; transition: border-color .15s; width: 100%; }
.ws-tile:hover { border-color: var(--accent); }
.ws-tile .tile-value { font-size: 26px; }
.ws-ico { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-chip); color: var(--text-secondary); flex-shrink: 0; }
.ws-tile.accent-tile .ws-ico { background: var(--warn-soft); color: var(--warning); }
.ws-tile.bad .ws-ico { background: var(--danger-tint); color: var(--danger); }
.ws-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ws-title { color: var(--text-primary); font-weight: 600; text-decoration: none; }
.ws-title:hover { color: var(--accent); }
.ws-table tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.ws-due.late { color: var(--danger); font-weight: 700; }
.ws-due.soon { color: var(--warning); font-weight: 600; }
.ws-due small { color: var(--text-muted); font-weight: 400; }
.q-rows { display: flex; flex-direction: column; }
.q-row { padding: 12px 0; border-top: 1px solid var(--border); }
.q-row:first-child { border-top: none; padding-top: 0; }
.q-flag { text-decoration: none; }
.launches { display: flex; flex-direction: column; }
.launch { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.launch:first-child { border-top: none; }
.launch:hover .launch-main b { color: var(--accent); }
.launch-date { width: 56px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: var(--bg-chip); }
.launch-date b { font-size: 20px; line-height: 1.1; }
.launch-date small { font-size: 11.5px; color: var(--text-muted); }
.launch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.q-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.q-cell { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13px; background: var(--bg-card); text-align: left; font-family: inherit; color: inherit; }
button.q-cell { cursor: pointer; }
button.q-cell:hover { border-color: var(--accent); }
.q-cell b { font-size: 14px; }
.q-cell.ok { border-color: var(--success); }
.q-cell.warn { border-color: var(--warning); }
.q-cell.bad { border-color: var(--danger); background: var(--danger-tint); }
.q-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 20px; margin-top: 14px; font-size: 13px; }
.q-more h4 { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.q-more ul { margin: 0; padding-left: 18px; }
.kit-row { display: flex; align-items: center; gap: 6px; }
.kit-row .ico { flex-shrink: 0; }
.kit-row.ok .ico { color: var(--success); }
.kit-row.missing { color: var(--danger); }
.kit-row.na { color: var(--text-muted); }
.remark-state { display: inline-flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 980px) { .q-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .ws-two { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .msg { max-width: 100%; }
  .msg-compose { flex-direction: column; align-items: stretch; }
  .kv-tight { grid-template-columns: 1fr; }
  .req-toolbar .dd, .req-toolbar .input { flex: 1 1 100%; max-width: none; }
  /* the attention table becomes a list of cards */
  .ws-table table, .ws-table tbody, .ws-table tr, .ws-table td { display: block; width: 100%; }
  .ws-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ws-table tr { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
  .ws-table tr.mine { border-color: var(--accent); }
  .ws-table tr.mine td:first-child { box-shadow: none; }
  .ws-table td { border: none !important; padding: 4px 0 !important; display: flex; gap: 10px; align-items: center; }
  .ws-table td::before { content: attr(data-label); width: 110px; flex-shrink: 0; color: var(--text-muted); font-size: 12.5px; }
}
@media (max-width: 520px) { .q-grid { grid-template-columns: 1fr; } }
.flow-step.skip { color: var(--warning); }
.flow-step.skip i { background: var(--warn-soft); border-color: var(--warning); color: var(--warning); }

/* dialogs built by ACR.modal are forms: a wide one keeps the padding and the spacing of the narrow one */
.modal.modal--form.modal--wide { width: 92%; max-width: 760px; padding: 26px 28px; gap: 14px; overflow: visible; max-height: 92vh; }
.modal--form .modal-text { margin-top: -6px; }
.modal--form .modal-body { padding: 2px; }
.modal--form .modal-body > .field > label, .modal--form .form-col .field > label { color: var(--text-primary); font-weight: 600; }
.modal--form .modal-actions { padding-top: 6px; }
@media (max-width: 520px) { .modal.modal--form, .modal.modal--form.modal--wide { padding: 20px 16px; width: 96%; } .modal--form .modal-actions { flex-wrap: wrap; } }

/* the expert's workplace */
.ws-tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ws-tile.warn-tile .ws-ico { background: var(--warn-soft); color: var(--warning); }
.ws-tile.ok-tile .ws-ico { background: var(--ok-soft); color: var(--success); }
.ws-group { display: inline-flex; align-items: center; gap: 8px; min-width: 240px; }
.next-review { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--bg-hint); }
.next-review .ws-ico { background: var(--accent-soft); color: var(--accent); }
.next-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.next-main b { font-size: 16px; }
.card--flush .ws-table { margin: 0; }
.card--flush .ws-table .stats-table th:first-child, .card--flush .ws-table .stats-table td:first-child { padding-left: 18px; }

.rv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.rv-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.rp { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 150px); overflow: auto; }
.rp-where { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.rp-where .chip-id { white-space: normal; text-align: left; }
.rp-quote { display: flex; gap: 6px; align-items: flex-start; padding: 8px 10px; border-left: 3px solid var(--warning); background: var(--warn-soft); border-radius: 6px; font-size: 13px; }
.rp-quote span { flex: 1; overflow-wrap: anywhere; }
.rp-sev { display: flex; flex-direction: column; gap: 6px; }
.rp-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.rp-opt input { margin-top: 3px; accent-color: var(--accent); }
.rp-opt span { display: flex; flex-direction: column; }
.rp-opt small { color: var(--text-muted); font-size: 12px; }
.rp-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.rp-opt:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }
.rp-foot { display: flex; align-items: flex-start; gap: 8px; }
.rp-foot .hint.bad { color: var(--danger); }
.rp-sep { border-top: 1px solid var(--border); margin: 4px 0; }
.rp-list { display: flex; flex-direction: column; gap: 8px; }
.rp-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.rp-item:hover { border-color: var(--accent); }
.rp-item .ico { flex-shrink: 0; margin-top: 2px; color: var(--text-muted); }
.rp-item .ico.req { color: var(--danger); }
.rp-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.rp-item-text { color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quote-tip { position: absolute; z-index: 5; box-shadow: var(--shadow-pop); }
.doc-wrap { position: relative; }
mark.quote-mark { background: var(--warn-soft); color: inherit; outline: 2px solid var(--warning); border-radius: 3px; }

.db-state { display: flex; align-items: center; gap: 10px; border: none; background: none; font: inherit; color: inherit; text-align: left; padding: 0; cursor: default; min-width: 0; }
button.db-state { cursor: pointer; }
.db-state span { display: flex; flex-direction: column; }
.db-state small { color: var(--text-secondary); font-size: 12px; }
.db-state.bad .ico { color: var(--danger); }
.db-state.ok .ico { color: var(--success); }
.decide-wrap { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.decide-wrap small { font-size: 11.5px; }
.btn-primary.is-disabled, .btn-primary.disabled { background: var(--bg-chip); color: var(--text-muted); border-color: var(--border); box-shadow: none; cursor: not-allowed; }
a.btn-primary.disabled { pointer-events: none; }

.rc-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.rc-side { padding: 16px 0 8px; }
.rc-side > .card-title { padding: 0 16px 10px; }
.rc-list { display: flex; flex-direction: column; }
.rc-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border: none; border-top: 1px solid var(--border); border-left: 3px solid transparent; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rc-item.on { background: var(--accent-soft); border-left-color: var(--accent); }
.rc-item .ico { flex-shrink: 0; margin-top: 2px; }
.rc-item .ico.st-ok { color: var(--success); } .rc-item .ico.st-warn { color: var(--warning); } .rc-item .ico.st-err { color: var(--danger); }
.rc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-size: 13px; }
.rc-detail { display: flex; flex-direction: column; gap: 14px; }
.rc-title { font-size: 19px; font-weight: 650; }
.rc-remark { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.rc-remark-head { padding: 8px 12px; background: var(--bg-chip); font-weight: 600; font-size: 13px; }
.rc-remark > .pre, .rc-remark > .msg-quote { margin: 10px 12px; }
.rc-answer { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; }
.rc-actions { gap: 10px; }
.df { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.df-title { padding: 8px 12px; background: var(--bg-chip); font-size: 13px; }
.df-cols { display: grid; grid-template-columns: 1fr 1fr; }
.df-col { min-width: 0; }
.df-col.was { border-right: 1px solid var(--border); }
.df-col.now { background: var(--ok-soft); }
.df-head { padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.df-col ul { list-style: none; margin: 0; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.df-col li { display: flex; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; }
.df-col li > span:first-child { flex: 1; }
.df-col li.df-same { color: var(--text-secondary); }
.df-col li.df-del { color: var(--danger); text-decoration: line-through; text-decoration-color: var(--danger-soft); }
.df-col li.df-add { color: var(--text-primary); font-weight: 500; }
.df-tag { flex-shrink: 0; font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--ok-soft); color: var(--success); text-decoration: none; }
.df-del .df-tag { background: var(--danger-tint); color: var(--danger); }

@media (max-width: 1100px) { .rv-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 980px) {
  .rv-layout, .rc-grid { grid-template-columns: 1fr; }
  .rp { position: static; max-height: none; }
  .ws-tiles--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .df-cols { grid-template-columns: 1fr; }
  .df-col.was { border-right: none; border-bottom: 1px solid var(--border); }
  .ws-tiles--3 { grid-template-columns: 1fr; }
  .decide-wrap { align-items: stretch; flex: 1 1 100%; }
  .decision-bar .btn-danger { flex: 1 1 100%; justify-content: center; }
}
.req-toolbar .input { flex: 1 1 200px; min-width: 180px; max-width: 320px; }
.req-toolbar .dd { flex: 0 1 180px; }
@media (max-width: 767px) { .req-toolbar .dd, .req-toolbar .input { flex: 1 1 100%; max-width: none; } }
/* next to the remark panel the table of contents gives the document more room */
.rv-main .doc-wrap { grid-template-columns: 180px minmax(0, 1fr); gap: 14px; }
@media (max-width: 1280px) { .rv-main .doc-wrap { grid-template-columns: 1fr; } .rv-main .doc-toc { display: none; } }
.rv-main .tabs-bar .tabs { overflow-x: auto; scrollbar-width: thin; }
.doc-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1 1 100%; }
.doc-go { flex: 1 1 240px; max-width: 360px; }
.doc-zoom { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border); border-radius: 10px; padding: 2px; }
.doc-zoom .btn-icon span { font-size: 16px; line-height: 1; width: 16px; display: inline-block; text-align: center; }
.doc-scale { min-width: 44px; text-align: center; font-size: 12.5px; color: var(--text-secondary); }
.doc-find { flex: 1 1 200px; max-width: 280px; }
mark.find-mark { background: var(--warn-soft); color: inherit; border-radius: 2px; }
mark.find-mark.on { background: var(--warning); color: #fff; }
.kv-tight .badge { white-space: normal; text-align: left; }
.kv-tight > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .decision-bar { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .decision-bar .db-state { flex: 1 1 100%; }
  .decision-bar .db-state small, .decide-wrap small { display: none; }
  .decision-bar .btn-danger, .decide-wrap { flex: 1 1 0; min-width: 0; }
  .decision-bar .btn-danger, .decision-bar .btn-lg { padding: 9px 10px; font-size: 13px; justify-content: center; width: 100%; }
}
@media (max-width: 640px) {
  .decision-bar > .spacer { display: none; }
  .decision-bar .btn-danger, .decide-wrap .btn-lg { white-space: normal; line-height: 1.25; text-align: center; min-height: 44px; }
  .decide-wrap .btn-lg { width: 100%; }
}

/* remarks: a card per remark — who and when, where, what, the answer and its check */
.comments { display: flex; flex-direction: column; gap: 10px; }
.rmk { border: 1px solid var(--border); border-left: 3px solid var(--warning); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-card); }
.rmk--fixed { border-left-color: var(--accent); }
.rmk--verified, .rmk--withdrawn { border-left-color: var(--success); opacity: .85; }
.rmk--withdrawn { border-left-color: var(--border-input); }
.rmk--note { border-left-color: var(--border-input); }
.rmk-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rmk-head .who-avatar { width: 30px; height: 30px; font-size: 11.5px; }
.rmk-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.rmk-who b { font-size: 13.5px; }
.rmk-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rmk-target { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); min-width: 0; }
.rmk-target span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rmk-quote { margin: 0; padding: 6px 10px; border-left: 3px solid var(--warning); background: var(--warn-soft); border-radius: 6px; font-size: 13px; font-style: italic; }
.rmk-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.rmk-reply { background: var(--bg-hint); border-radius: 8px; padding: 8px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.rmk-reply.warn { background: var(--warn-soft); }
.rmk-reply-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rmk-reply-head .ico { color: var(--text-muted); }
.rmk-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); }
.rmk-line.ok { color: var(--success); }
.rmk-acts { display: flex; justify-content: flex-end; }
.rmk-acts > .row { justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) { .rmk-head { flex-wrap: wrap; } .rmk-badges { justify-content: flex-start; flex: 1 1 100%; } .rmk-acts { justify-content: stretch; } }

/* history: the journal and the versions */
.jr { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.jr li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.jr li:first-child { border-top: none; padding-top: 0; }
.jr-time { font-size: 12.5px; color: var(--text-muted); padding-top: 1px; font-variant-numeric: tabular-nums; }
.jr-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13.5px; }
.jr-note { font-size: 12.5px; color: var(--text-secondary); background: var(--bg-hint); border-radius: 6px; padding: 4px 8px; margin-top: 3px; }
.vr { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vr li { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.vr-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.vr-changes { display: flex; flex-direction: column; gap: 6px; }
.vr-line { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.vr-line .ico { color: var(--text-muted); }
.vr-topic { display: flex; align-items: flex-start; gap: 8px; }
.vr-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.vr-chip { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--bg-chip); color: var(--text-secondary); white-space: nowrap; }
@media (max-width: 520px) { .jr li { grid-template-columns: 1fr; gap: 2px; } }

/* what holds a decision back */
.blk { display: flex; flex-direction: column; gap: 10px; }
.blk-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.blk-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); font-size: 13px; }
.blk-step b { font-size: 22px; line-height: 1; min-width: 22px; text-align: center; }
.blk-step.todo { border-color: var(--warning); background: var(--warn-soft); }
.blk-step.bad { border-color: var(--danger); background: var(--danger-tint); }
.blk-step.done { color: var(--text-muted); }
.blk-row { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.blk-ico { flex-shrink: 0; margin-top: 2px; }
.blk-row.fixed .blk-ico { color: var(--warning); }
.blk-row.open .blk-ico { color: var(--danger); }
.blk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.blk-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.blk-text { font-size: 13.5px; }
.blk-answer { font-size: 12.5px; color: var(--text-secondary); background: var(--bg-hint); padding: 4px 8px; border-radius: 6px; }
.blk-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.blk-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 4px; }
.blk-foot .hint { flex: 1 1 240px; }
@media (max-width: 520px) { .blk-sum { grid-template-columns: 1fr; } }

/* the return banner: who returned, the remarks once, the next step */
.ret { border: 1px solid var(--danger); background: var(--danger-tint); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ret-head { display: flex; gap: 10px; align-items: flex-start; }
.ret-head .ico { color: var(--danger); margin-top: 2px; flex-shrink: 0; }
.ret-list { display: flex; flex-direction: column; gap: 6px; }
.ret-item { display: flex; align-items: center; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; }
.ret-item .chip-id { flex-shrink: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ret-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ret-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ret-foot > .hint { flex: 1 1 260px; }
.ret-foot > .spacer { display: none; }
@media (max-width: 640px) { .ret-item { flex-wrap: wrap; } .ret-item .chip-id { max-width: 100%; } }
.blk-sum { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.rmk--fixed { border-left-color: var(--c-lk); }
.rmk--open { border-left-color: var(--warning); }
.vr-changes > .link { align-self: flex-start; font-size: 12.5px; }
.badge--info { background: color-mix(in srgb, var(--c-lk) 13%, transparent); color: var(--c-lk); }

/* filling the kit: editors of a topic's lecture, slides, questions and tasks */
.ed-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.ed-block { position: relative; border: 1px solid var(--border); border-radius: 10px; padding: 10px 76px 10px 12px; background: var(--bg-card); }
.ed-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; }
.ed-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ed-long { min-height: 260px; }
.ed-opt { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ed-opt .input { flex: 1; min-width: 0; }
.ed-crit { display: flex; gap: 8px; margin-bottom: 6px; }
.ed-crit .input:first-child { flex: 1; min-width: 0; }
.ed-points { width: 84px; flex: none; }
.rot-up { transform: rotate(-90deg); }
.lecture-text { max-height: 420px; overflow: auto; }
@media (max-width: 640px) { .ed-block { padding-right: 12px; padding-top: 40px; } }

/* the administrator's desktop and "Смотреть как" */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.admin-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.admin-checks li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.admin-checks svg { flex: none; align-self: center; }
.admin-checks .ok { color: var(--success); } .admin-checks .warn { color: var(--warning); } .admin-checks .bad { color: var(--danger); }
.admin-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.admin-state { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-primary); text-decoration: none; }
.admin-state:hover { border-color: var(--accent); }
.admin-state b { font-size: 18px; }
.admin-state.zero { color: var(--text-muted); } .admin-state.zero b { font-weight: 500; }
.admin-events { list-style: none; margin: 0; padding: 0; }
.admin-events li { display: grid; grid-template-columns: 110px 1fr minmax(120px, 34%); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.admin-events li:last-child { border-bottom: none; }
.admin-events .link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .admin-events li { grid-template-columns: 1fr; gap: 2px; } }
.viewas-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--warn-soft); border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text-primary); }
.viewas-bar > span { flex: 1; min-width: 0; }
.viewas-switch { display: flex; flex-direction: column; gap: 6px; padding: 10px 4px; border-top: 1px solid var(--border); }
.viewas-switch > :last-child { width: 100%; }
.viewas-label { font-size: 12.5px; color: var(--text-muted); }
