.ol { padding: 2px 0; }
.tr { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px 0 calc(10px + var(--lvl) * 16px); font: var(--type-body); cursor: default; outline-offset: -2px; }
.tr:hover { background: var(--surface-hover); }
.tr.is-sel { background: var(--surface-selected); box-shadow: inset 0 0 0 1px var(--select-line); }
.tr.grp { font-weight: 600; }
.tri-sp { width: 8px; flex: none; }
.tr-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-t .v, .tr-v { color: var(--text-secondary); font: var(--type-label); }
.tr-v { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tr.inp .tr-t { flex: none; width: 168px; }
.tr.inp .tr-v { flex: 1; min-width: 0; justify-content: space-between; }
.tr.inp .sdot { font-size: 0; gap: 0; }
.tr .dk { display: inline-block; min-width: 56px; font-weight: 600; }
.tr.leaf[hidden-by-group] { display: none; }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 10px; clip-path: var(--shape-hex); font: var(--type-label-strong); white-space: nowrap; transition: background-color var(--dur-base) var(--ease-ui), color var(--dur-base) var(--ease-ui); }
.b-running { background: var(--tag-running-bg); color: var(--tag-running-text); }
.b-pending { background: var(--tag-pending-bg); color: var(--tag-pending-text); }
.b-attention { background: var(--tag-attention-bg); color: var(--tag-attention-text); }
.b-danger { background: var(--tag-danger-bg); color: var(--tag-danger-text); }
.b-approved { background: var(--tag-approved-bg); color: var(--tag-approved-text); }
.b-changed { background: var(--tag-running-bg); color: var(--tag-running-text); }
.b-added { background: var(--tag-done-bg); color: var(--tag-done-text); }
.b-removed { background: var(--tag-danger-bg); color: var(--tag-danger-text); }
.sdot { display: inline-flex; align-items: center; gap: 6px; font: var(--type-label); color: var(--text-secondary); }
.sdot::before { content: ""; width: 8px; height: 9px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--status-done); }
.opn { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; clip-path: var(--shape-hex); background: var(--border-strong); font: var(--type-label-strong); }

table.grid { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font: var(--type-body); }
.grid th { position: sticky; top: 0; z-index: 2; height: 28px; padding: 0 8px; background: var(--surface-header); border-bottom: 1px solid var(--border-strong); color: var(--text-secondary); font: var(--type-label); text-align: left; white-space: nowrap; }
.grid th.h-n { text-align: right; }
.grid td { height: 28px; padding: 0 8px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid tr.op td { height: 32px; background: var(--surface-group); font-weight: 600; border-bottom-color: var(--border-strong); }
.grid tr.st:nth-child(even) td { background: var(--surface-zebra); }
.grid tr:hover td { background: var(--surface-hover); }
.grid tr.op:hover td { background: var(--surface-subheader); }
.grid tr.is-sel td, .grid tr.is-sel:hover td { background: var(--surface-selected); box-shadow: inset 0 1px var(--select-line), inset 0 -1px var(--select-line); }
.grid tr.is-sel td:first-child { box-shadow: inset 1px 1px var(--select-line), inset 0 -1px var(--select-line); }
.grid tr.is-sel td:last-child { box-shadow: inset -1px 1px var(--select-line), inset 0 -1px var(--select-line); }
.c-n { text-align: right; }
.grid tfoot td { position: sticky; bottom: 0; z-index: 2; height: 32px; background: var(--surface-header); border-top: 1px solid var(--border-strong); border-bottom: 0; font-weight: 600; }
.c-num { overflow: visible; }
.df { display: inline-flex; align-items: baseline; gap: 6px; }
.df s { color: var(--text-secondary); font-weight: 400; text-decoration-thickness: 1px; }
.df b { font-weight: 600; }

.risk { display: inline-flex; align-items: center; gap: 8px; }
.risk i { position: relative; width: 64px; height: 6px; border-radius: var(--radius-bar); background: var(--surface-sunken); overflow: hidden; box-shadow: inset 0 0 0 1px var(--border-subtle); }
.risk i::after { content: ""; position: absolute; inset: 0; background: var(--text-secondary); transform-origin: 0 0; transform: scaleX(var(--v)); }
.risk i::before { content: ""; position: absolute; z-index: 1; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--border-control); }
.risk.r-hi i::after { background: var(--status-attention); }
.risk.r-hi b { color: var(--text-warning); }
.risk b { font-weight: 500; min-width: 34px; text-align: right; }
.gcount { margin-left: 8px; color: var(--text-secondary); font: var(--type-label); }

.banner { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 16px; background: var(--surface-subheader); border-bottom: 1px solid var(--border-strong); animation: fade-in var(--dur-base) var(--ease-ui); }
.is-stale .scroll, .is-stale .paper-wrap { opacity: var(--stale-opacity); transition: opacity var(--dur-base) var(--ease-ui); }
.scroll, .paper-wrap { transition: opacity var(--dur-base) var(--ease-ui); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--status-running); animation: spin var(--dur-spin) linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }


.paper-wrap { display: grid; place-items: center; min-height: 0; padding: 24px; background: var(--surface-viewport); overflow: auto; }
.paper { height: 100%; max-width: 100%; aspect-ratio: 420 / 297; background: var(--surface-paper); box-shadow: 0 0 0 1px var(--border-strong); }
.dw { display: block; width: 100%; height: 100%; }
.dw-k { fill: none; stroke: #1A1A1A; stroke-width: .7; }
.dw-t, .dw-h { fill: none; stroke: #1A1A1A; stroke-width: .25; }
.dw-s { fill: none; stroke: #1A1A1A; stroke-width: .5; }
.dw-c { fill: none; stroke: #1A1A1A; stroke-width: .25; stroke-dasharray: 9 1.5 1.2 1.5; }
.dw-a { fill: #1A1A1A; }
.dw-x { font: 500 3.6px var(--font-sheet); fill: #1A1A1A; }
.dw-big { font-size: 5px; }
.sv { align-content: center; }
.sv { padding: 24px; }
.sv .sheet { min-height: 0; min-width: 0; overflow: hidden; }
.sv .sheet { height: 100%; width: auto; max-width: 100%; aspect-ratio: 297 / 210; box-shadow: 0 0 0 1px var(--border-strong); }


.nf { display: inline-flex; align-items: center; height: 24px; border-radius: var(--radius-field); background: var(--surface-field); box-shadow: inset 0 0 0 1px var(--border-strong); }
.nf:focus-within { box-shadow: inset 0 0 0 1px var(--focus-ring); }
.nf-b { display: grid; place-items: center; width: 20px; height: 24px; padding: 0; border: 0; background: none; color: var(--text-secondary); }
.nf-b svg { width: 8px; height: 8px; fill: currentColor; }
.nf-b:hover { color: var(--text-primary); }
.nf-i { width: 56px; height: 24px; border: 0; background: none; text-align: right; font-weight: 500; outline: none; }
.nf-u { padding: 0 4px 0 4px; color: var(--text-secondary); font: var(--type-label); }
.sw { position: relative; width: 28px; height: 16px; padding: 0; border: 0; border-radius: 8px; background: var(--border-control); transition: background-color var(--dur-fast) var(--ease-ui); }
.sw i { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #FFFFFF; transition: transform var(--dur-fast) var(--ease-ui); }
.sw[aria-checked="true"] { background: var(--action-primary); }
.sw[aria-checked="true"] i { transform: translateX(12px); }
.si { --si-accent: var(--icon-accent-idle); }
.tr .si { color: var(--text-secondary); }
.tr.is-sel .si, .tr:hover .si { --si-accent: var(--icon-accent); }
.st-ic { display: inline-flex; }
.st-ic.s-done { color: var(--status-done); }
.st-ic.s-running { color: var(--status-running); }
.st-ic.s-attention { color: var(--status-attention); }
.st-ic.s-danger { color: var(--status-danger); }
.st-ic .si { --si-accent: currentColor; }
