.staff-ops {min-width:0;color:var(--ink);display:grid;align-content:start;gap:18px}
.staff-ops h1,.staff-ops h2,.staff-ops p {margin:0}
.staff-ops h1 {font-size:clamp(27px,3vw,42px);line-height:1.1;letter-spacing:-.04em}
.staff-ops h2 {font-size:20px;letter-spacing:-.025em}
.staff-ops p,.staff-ops small,.staff-ops time {color:var(--muted);line-height:1.5}
.ops-tools,.ops-tabs {display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.staff-ops :is(button,input:not([type=checkbox]),select,summary) {font:inherit;border:1px solid var(--line);background:var(--reading-sheet);color:var(--ink);padding:9px 13px;border-radius:11px;min-height:38px}
.staff-ops button,.staff-ops summary {cursor:pointer;justify-self:start}
.staff-ops button:disabled {opacity:.5;cursor:default}
.staff-ops button[aria-pressed=true],.staff-ops button:hover:not(:disabled) {background:var(--nav-selected)}
.ops-tools input[type=search] {flex:1 1 180px;min-width:0}
.ops-panel,.ops-confirm {min-width:0;border:1px solid var(--line);border-radius:18px;padding:clamp(16px,2vw,25px);background:var(--reading-sheet);display:grid;align-content:start;gap:15px}
.ops-confirm {border-color:var(--accent)}
.ops-row {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 0;overflow-wrap:anywhere}
.ops-row+.ops-row {border-top:1px solid var(--line)}
.ops-row small,.ops-chat small {display:block;font-size:12px}
.ops-row time {font-size:13px}
.ops-columns {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.ops-history {grid-template-columns:minmax(200px,.8fr) minmax(240px,1.3fr)}
.staff-ops label {display:grid;gap:6px;font-size:14px}
.staff-ops label.ops-option {display:flex;align-items:center;gap:10px}
#admin .staff-ops .ops-option {min-height:44px}
#admin .staff-ops .ops-option input[type=checkbox] {flex:none;width:18px;height:18px;padding:0;margin:0;accent-color:var(--accent)}
.staff-ops select {max-width:100%}
.ops-links {display:grid;gap:8px;padding:12px}
.ops-links a,.ops-status {color:var(--accent)}
.staff-ops .ops-chat {display:block;width:100%;text-align:left}
.ops-turn {padding-top:12px;border-top:1px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere}
.ops-turn p {margin:8px 0 0}
@media(max-width:800px){.ops-columns,.ops-history {grid-template-columns:minmax(0,1fr)}}

.ops-atlas {
  --ops-tint:color-mix(in srgb,var(--accent) 6%,var(--reading-sheet));
  --ops-selected:#594392;
  --ops-selected-text:#fff;
  gap:16px;
}
:root[data-theme=dark] .ops-atlas {--ops-selected:#c4aff4;--ops-selected-text:#231839}
.ops-atlas-view {display:grid;min-width:0;gap:16px}
.ops-atlas .ops-tabs {width:max-content;max-width:100%;padding:3px;gap:3px;border-radius:11px;background:var(--ops-tint);border:1px solid var(--line)}
.ops-atlas .ops-tabs button {min-width:100px;min-height:34px;padding:6px 15px;border:0;border-radius:8px;background:transparent;font-size:13px;font-weight:600}
.ops-atlas .ops-tabs button[aria-selected=true],.ops-atlas .ops-tabs button[aria-selected=true]:hover,.ops-atlas .ops-save,.ops-atlas .ops-save:hover:not(:disabled) {background:var(--ops-selected);color:var(--ops-selected-text)}
.ops-atlas .ops-panel {border-radius:14px;gap:20px;padding:clamp(18px,2.2vw,26px)}
.ops-atlas .ops-panel h2 {font-size:18px;line-height:1.3;letter-spacing:-.022em}
.ops-material-head,.ops-metrics-row,.ops-atlas .ops-refresh,.ops-save-row {display:flex;align-items:center;gap:12px}
.ops-material-head .ops-material-icon {display:grid;place-items:center;width:46px;height:46px;flex:none;background:var(--nav-selected);color:var(--ops-selected);border-radius:13px}
.ops-material-head p {font-size:13px;margin-top:3px}
.ops-metrics-row {flex-wrap:wrap;justify-content:space-between;gap:16px 22px}
.ops-metrics {margin:0;display:grid;grid-template-columns:auto auto minmax(0,1.4fr);gap:clamp(18px,4vw,74px);min-width:0}
.ops-metrics dt,.ops-atlas .ops-help,.ops-atlas .ops-chat time {color:var(--muted);font-size:12px;line-height:1.55}
.ops-metrics dd {margin:4px 0 0;font-size:18px;font-weight:650;line-height:1.35;font-variant-numeric:tabular-nums}
.ops-metrics time {font-size:13px;font-weight:550;color:var(--ink)}
.ops-atlas .ops-refresh,.ops-atlas .ops-save {padding:8px 13px;gap:8px;min-height:38px;font-size:13px;font-weight:600}
.ops-atlas .ops-source-detail {border-top:1px solid var(--line);padding-top:9px;margin-top:-6px}
.ops-atlas .ops-source-detail summary {display:inline-flex;align-items:center;gap:8px;min-height:32px;background:transparent;border:0;padding:3px 0;color:var(--muted);font-size:13px;list-style:none}
.ops-source-detail summary::-webkit-details-marker {display:none}
.ops-source-detail[open] summary svg:last-child {transform:rotate(180deg)}
.ops-atlas .ops-links {border-top:0;padding:7px 0 0;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));font-size:13px;line-height:1.4}
.ops-atlas .ops-links a {color:var(--ops-selected);text-underline-offset:3px}
.ops-atlas-settings,.ops-depth {margin:0;padding:0;border:0;min-width:0}
.ops-atlas .ops-atlas-settings .ops-panel {align-content:start;gap:20px}
.ops-atlas .ops-atlas-settings h2 {margin-bottom:3px}
.ops-atlas .ops-atlas-switch {position:relative;display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:34px;cursor:pointer;line-height:1.4;font-size:13px;font-weight:500}
.ops-atlas .ops-switch-track {width:30px;height:18px;box-sizing:border-box;display:flex;align-items:center;flex:none;border:1px solid var(--line);border-radius:12px;background:var(--nav-selected);padding:2px}
.ops-switch-track::before {content:"";width:12px;height:12px;border-radius:50%;background:var(--muted);transition:transform .16s ease}
.ops-atlas-switch input:checked+.ops-switch-track {border-color:var(--ops-selected);background:var(--ops-selected)}
.ops-atlas-switch input:checked+.ops-switch-track::before {background:var(--ops-selected-text);transform:translateX(12px)}
.ops-atlas .ops-atlas-switch small {font-size:11px;white-space:nowrap}
#admin .ops-atlas-switch input,#admin .ops-depth input {position:absolute;inset:0;z-index:1;width:100%;height:100%;min-height:0;opacity:0;margin:0;padding:0;cursor:pointer}
.ops-atlas-switch input:focus-visible+.ops-switch-track,.ops-depth input:focus-visible+span,.ops-atlas :is(button,summary,input[type=search],a):focus-visible {outline:2px solid var(--accent);outline-offset:2px}
.ops-depth legend,.ops-atlas .ops-atlas-list>label {padding:0;color:var(--ink);font-size:13px;font-weight:600}
.ops-depth>div {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;margin:8px 0;padding:4px;border-radius:11px;background:var(--ops-tint)}
.ops-atlas .ops-depth label {position:relative;display:block;min-width:0}
.ops-depth label span {display:grid;place-items:center;min-height:36px;padding:4px;border-radius:8px;font-size:13px}
.ops-depth input:checked+span {background:var(--ops-selected);color:var(--ops-selected-text);font-weight:650}
.ops-atlas .ops-atlas-list {position:relative;min-width:0;display:grid;gap:7px}
.ops-atlas .ops-atlas-list button {display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;min-height:39px;padding:8px 10px;border-radius:9px;background:var(--ops-tint);font-size:13px;text-align:start}
.ops-atlas-list button>span,.ops-atlas-list li {overflow-wrap:anywhere}
.ops-atlas-list button svg {flex:none;opacity:.7}
.ops-atlas-list button[aria-expanded=true] svg {transform:rotate(180deg)}
.ops-atlas .ops-atlas-list ul {position:absolute;z-index:8;top:calc(100% + 5px);inset-inline:0;display:grid;gap:2px;max-height:min(240px,40dvh);overflow:auto;padding:4px;margin:0;background:var(--reading-sheet);color:var(--ink);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px #21133124;list-style:none}
.ops-atlas-list ul[data-above=true] {top:auto;bottom:calc(100% - 18px)}
.ops-atlas .ops-atlas-list li {display:flex;justify-content:space-between;align-items:center;gap:6px;padding:9px;min-height:36px;border-radius:6px;font-size:13px;line-height:1.4;cursor:pointer}
.ops-atlas-list li[aria-selected=true] {font-weight:650;color:var(--ops-selected)}
.ops-atlas-list li[data-active=true] {background:var(--nav-selected)}
.ops-save-row {justify-content:flex-end;flex-wrap:wrap}
.ops-save-row small {font-size:12px}
.ops-atlas .ops-save {border-color:transparent;justify-self:end}
.ops-atlas .ops-save:disabled {opacity:.6}
.ops-history-tools {display:grid;grid-template-columns:minmax(0,1fr) minmax(145px,29%) auto;align-items:end;gap:12px}
.ops-atlas .ops-history-search {position:relative;display:flex;align-items:center;min-width:0}
.ops-history-search svg {position:absolute;left:11px;color:var(--muted);pointer-events:none}
#admin .ops-atlas .ops-history-search input {box-sizing:border-box;width:100%;min-width:0;min-height:39px;padding:8px 12px 8px 36px;font-size:13px;border-radius:9px}
.ops-atlas .ops-history-refresh {display:grid;place-items:center;width:39px;height:39px;min-height:39px;padding:0;border-radius:9px}
.ops-refresh-icon {flex:none;transform-origin:center}
.ops-atlas button[aria-busy=true]>.ops-refresh-icon {animation:ops-refresh-spin .64s linear infinite}
.ops-atlas :is(.ops-history-refresh,.ops-refresh)[aria-disabled=true] {cursor:default}
@keyframes ops-refresh-spin {to {transform:rotate(1turn)}}
@media(prefers-reduced-motion:reduce){.ops-atlas button[aria-busy=true]>.ops-refresh-icon {animation:none}}
.ops-atlas .ops-history {grid-template-columns:minmax(0,2fr) minmax(0,3fr);align-items:stretch;min-height:min(490px,55svh)}
.ops-atlas .ops-chat {display:grid;gap:4px;padding:12px 14px;border-radius:9px;overflow-wrap:anywhere;background:var(--ops-tint);border-color:transparent}
.ops-atlas .ops-chat[aria-pressed=true] {border-color:var(--ops-selected);background:var(--nav-selected)}
.ops-atlas .ops-chat-detail.is-empty {align-content:center;justify-items:center;font-size:13px;text-align:center}
@media(max-width:940px){.ops-atlas-settings {grid-template-columns:minmax(0,1fr)}}
@media(max-width:740px){.ops-history-tools {grid-template-columns:minmax(0,1fr) auto;gap:10px}.ops-history-search {grid-column:1/-1}.ops-atlas .ops-history {grid-template-columns:minmax(0,1fr);min-height:0}.ops-atlas .ops-chat-detail.is-empty {min-height:115px}.ops-atlas .ops-metrics {gap:12px 17px}.ops-atlas .ops-panel {padding:17px;gap:15px}}
@media(max-width:420px){.ops-metrics {grid-template-columns:repeat(2,minmax(0,1fr))}.ops-metrics>div:last-child {grid-column:1/-1}.ops-metrics-row {align-items:start}.ops-atlas .ops-atlas-switch {grid-template-columns:30px minmax(0,1fr)}.ops-atlas-switch small {display:none}}
@media(prefers-reduced-motion:reduce){.ops-switch-track::before {transition:none}}
