:root { --ink: #1d2733; --muted: #60778b; --line: #dce4ec; --soft: #f4f7fa; --blue: #1565c0; --green: #166534; --red: #b42318; --amber: #92400e; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, Segoe UI, sans-serif; color: var(--ink); background: #fff; }
button, select, input, textarea { font: inherit; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 100vh; }
.nav { background: #16212c; color: #c9d6e2; padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.nav .brand { color: #fff; font-weight: 700; font-size: 17px; padding: 2px 8px 14px; }
.nav .brand span { font-weight: 400; color: #8fa6bb; font-size: 12px; margin-left: 6px; }
.nav h4 { margin: 14px 8px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7f95aa; }
.nav a { display: block; padding: 6px 10px; border-radius: 6px; color: #dbe6f0; text-decoration: none; }
.nav a:hover { background: #22303d; } .nav a.on { background: #1565c0; color: #fff; }
.nav .aside { margin-top: 18px; border-top: 1px solid #2a3846; padding-top: 10px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.head { display: flex; align-items: baseline; gap: 12px; padding: 14px 20px 10px; border-bottom: 1px solid var(--line); }
.head h1 { font-size: 19px; margin: 0; } .head .q { color: var(--muted); }
.head .pattern { margin-left: auto; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; padding: 2px 10px; }
.body { padding: 16px 20px; flex: 1; min-height: 0; }
.two { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; height: 100%; }
.panel { border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; }
.panel > h3 { margin: 0; padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--line); background: var(--soft); border-radius: 10px 10px 0 0; }
.pad { padding: 12px; }
.tree { list-style: none; margin: 0; padding: 6px; } .tree ul { list-style: none; margin: 0; padding-left: 16px; }
.tree button { border: 0; background: none; text-align: left; width: 100%; padding: 4px 8px; border-radius: 6px; cursor: pointer; display: flex; gap: 6px; }
.tree button:hover { background: var(--soft); } .tree button.on { background: #e3edf7; color: #0d47a1; font-weight: 600; }
.tree .n { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 12px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; }
.lane { background: var(--soft); border-radius: 8px; padding: 8px; min-height: 120px; }
.lane h5 { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 6px; cursor: pointer; }
.card:hover { border-color: #9db7d0; } .card b { display: block; } .card .what { font-size: 12px; color: var(--muted); }
.chip { display: inline-block; border-radius: 10px; padding: 1px 8px; font-size: 12px; background: #eef2f6; color: #3b5268; }
.chip.ok { background: #e7f5ec; color: var(--green); } .chip.bad { background: #fde8e6; color: var(--red); } .chip.run { background: #e3edf7; color: #0d47a1; } .chip.warn { background: #fef3c7; color: var(--amber); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid #eef2f6; } .list li:last-child { border-bottom: 0; }
.list button { border: 0; background: none; width: 100%; text-align: left; padding: 9px 12px; cursor: pointer; }
.list button:hover { background: var(--soft); } .list button.on { background: #e3edf7; }
.list .t { font-weight: 600; } .list .s { font-size: 12px; color: var(--muted); display: flex; gap: 8px; }
.btn { border: 1px solid #c7d3de; background: #fff; border-radius: 6px; padding: 5px 12px; cursor: pointer; text-decoration: none; color: var(--ink); display: inline-block; }
.btn:hover { background: var(--soft); } .btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.tile .v { font-size: 22px; font-weight: 700; } .tile .l { font-size: 12px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eef2f6; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
.bar { height: 8px; background: #e3edf7; border-radius: 4px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--blue); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { margin: 0 0 8px; position: relative; } .timeline li::before { content: ''; position: absolute; left: -20px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.timeline li.wait::before { background: #fff; border: 2px solid var(--blue); }
.diagram { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px; background: var(--soft); border-radius: 8px; }
.diagram span { border: 1px solid #9db7d0; background: #fff; border-radius: 6px; padding: 4px 10px; font-size: 12px; }
.diagram span.done { background: #e7f5ec; border-color: #9fd3b0; } .diagram span.now { background: #e3edf7; border-color: var(--blue); font-weight: 600; }
.diagram em { color: var(--muted); font-style: normal; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
textarea.code, input.code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
pre.out { background: #16212c; color: #d6e4f0; border-radius: 8px; padding: 10px; margin: 0; white-space: pre-wrap; font-size: 13px; min-height: 60px; }
.note { border-left: 3px solid var(--blue); background: #f2f7fc; padding: 8px 12px; border-radius: 0 8px 8px 0; margin: 0 0 14px; font-size: 13px; }
.form label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 2px; } .form input, .form select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
h2 { font-size: 16px; margin: 0 0 8px; } h3.s { font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 10px; }
.tabs button { border: 0; background: none; padding: 6px 10px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--muted); }
.tabs button.on { border-color: var(--blue); color: var(--ink); font-weight: 600; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 92vw); background: #fff; border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(20,30,40,.12); z-index: 20; display: flex; flex-direction: column; }
.drawer header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawer header h2 { margin: 0; } .drawer header button { margin-left: auto; }
.drawer .in { padding: 14px 16px; overflow: auto; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #16212c; color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 30; font-size: 13px; }
.spec { border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; margin: 0 0 14px; padding: 12px 14px; }
.spec dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; }
.spec dt { color: var(--muted); } .spec dd { margin: 0; }
.head .about { font-size: 12px; }
.lane.drop { outline: 2px dashed var(--blue); }
.card .acts { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; } .card .acts .btn { padding: 2px 8px; font-size: 12px; }
.shot { border: 1px solid var(--line); border-radius: 8px; background: repeating-linear-gradient(45deg, #f4f7fa, #f4f7fa 8px, #eef2f6 8px, #eef2f6 16px); height: 120px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid #9db7d0; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
/* the shell's own */
.tree ul { padding-left: 0; }
.nav .ext { font-size: 11px; color: #7f95aa; }
.nav .who { margin: 14px 8px 0; font-size: 12px; color: #8fa6bb; }
.chip.on { outline: 2px solid var(--blue); }
button.chip { border: 0; cursor: pointer; }
.toast[hidden] { display: none; }
.btn[disabled] { opacity: .6; cursor: default; }
.panel .tabs { display: flex; align-items: center; }
iframe.framed-page { display: block; width: 100%; height: calc(100vh - 38px); border: 0; background: #fff; }
.head.slim { padding: 6px 20px; } .head.slim .btn { padding: 2px 10px; font-size: 12px; }
/* Cases' filters, as the Tasklist's: the status as chips, the fields below */
.case-filters { padding: 10px 12px; margin-bottom: 12px; }
.case-filters .row { gap: 8px; }
.case-filters .filter-fields { margin-top: 8px; align-items: flex-end; }
.case-filters label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 3px; }
.case-filters label.grow { flex: 1; min-width: 200px; }
.case-filters label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); padding-bottom: 6px; }
.case-filters input:not([type=checkbox]), .case-filters select { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 13px; color: var(--ink); background: #fff; }
/* Cases' list and case, as the Tasklist's: only the list scrolls; its edge resizes it; auto-hide folds it to a rail */
.cases-split { display: grid; grid-template-columns: var(--list, 420px) 6px minmax(0, 1fr); gap: 0; align-items: start; position: relative; }
.cases-split.list-hidden { grid-template-columns: 34px minmax(0, 1fr); }
.cases-split.list-hidden .case-list, .cases-split.list-hidden .list-resizer { display: none; }
.cases-split.list-peek .case-list { position: absolute; left: 0; top: 0; z-index: 5; width: var(--list, 420px); box-shadow: 4px 0 18px rgba(20, 30, 40, .18); }
.cases-split.list-peek { grid-template-columns: 34px minmax(0, 1fr); }
.cases-split.list-peek .list-resizer { display: none; }
.case-list { position: sticky; top: 8px; max-height: calc(100vh - 16px); overflow: auto; }
.case-list .list-head { position: sticky; top: 0; background: var(--soft); border-bottom: 1px solid var(--line); padding: 8px 10px; display: flex; align-items: center; gap: 6px; z-index: 2; }
.case-list .list-tools { margin-left: auto; display: flex; gap: 4px; }
.case-list .btn.small { padding: 2px 8px; font-size: 12px; } .case-list .btn.on { border-color: var(--blue); color: var(--blue); }
.case-list .menu { position: absolute; right: 10px; top: 40px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; box-shadow: 0 6px 18px rgba(20, 30, 40, .14); z-index: 3; }
.case-list .menu label { display: block; padding: 3px 0; font-size: 13px; }
.case-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.case-table th { position: sticky; top: 42px; background: #fff; z-index: 1; padding: 0; }
.case-table th .sort { border: 0; background: none; width: 100%; text-align: left; padding: 6px 8px; font-size: 12px; color: var(--muted); font-weight: 600; cursor: pointer; }
.case-table th .sort.on { color: var(--ink); }
.case-table td { padding: 7px 8px; border-bottom: 1px solid #eef2f6; vertical-align: top; }
.case-table tbody tr { cursor: pointer; } .case-table tbody tr:hover { background: var(--soft); } .case-table tbody tr.on { background: #e3edf7; }
.list-resizer { align-self: stretch; cursor: col-resize; background: transparent; min-height: 200px; }
.list-resizer:hover { background: #dce4ec; }
.list-rail { position: sticky; top: 8px; height: calc(100vh - 16px); writing-mode: vertical-rl; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); cursor: pointer; font-weight: 600; color: var(--ink); display: flex; gap: 8px; align-items: center; justify-content: flex-start; padding: 10px 0; }
.case-detail { min-height: 400px; } .case-detail iframe.case-page { display: block; width: 100%; height: 800px; border: 0; }

/* the model catalog (pages/catalog.js): filters across the top, the models by category, the one chosen beside them */
.catalog .catalog-filters { padding: 10px 12px; display: grid; gap: 8px; margin-bottom: 12px; }
.catalog .catalog-filters label.grow { display: flex; flex-direction: column; flex: 1; font-size: 12px; color: var(--muted); }
.catalog .catalog-filters input[type=search] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--ink); }
.catalog .chips-row { gap: 6px; }
.catalog button.chip { border: 0; cursor: pointer; padding: 3px 10px; }
.catalog button.chip:hover { background: #e3eaf1; }
.catalog .chip .n { color: var(--muted); margin-left: 2px; }
.catalog .chip.kw { background: #fff; border: 1px solid var(--line); }
.catalog .chip.kw.on { background: #e3edf7; outline: 0; border-color: var(--blue); color: #0d47a1; }
.catalog-split { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; align-items: start; }
.catalog-list { max-height: calc(100vh - 230px); overflow: auto; position: sticky; top: 10px; }
.catalog-list .list-head { padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--soft); border-radius: 10px 10px 0 0; position: sticky; top: 0; }
.catalog-group h4 { margin: 0; padding: 10px 12px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #48627a; }
.catalog-item { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 12px; cursor: pointer; border-left: 3px solid transparent; }
.catalog-item:hover { background: var(--soft); }
.catalog-item.on { background: #eaf2fb; border-left-color: var(--blue); }
.catalog-title { display: flex; align-items: center; gap: 10px; }
.catalog-title h2 { margin: 0; font-size: 20px; }
.catalog-text { max-width: 820px; margin: 8px 0 10px; }
.catalog-figure { margin: 14px 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow: auto; background: #fff; }
.catalog-diagram { max-width: 100%; height: auto; display: block; }
.catalog-cols h3 { font-size: 14px; margin: 0 0 6px; }
.catalog-scenarios, .catalog-files { margin: 0; padding-left: 20px; }
.catalog-scenarios li, .catalog-files li { margin: 3px 0; }
