:root{--bg: #f4f5f7;--surface: #ffffff;--text: #1a1d23;--muted: #555b66;--border: #8a909b;--line: #d9dce1;--primary: #9b1c1c;--primary-hover: #7a1414;--focus: #1d4ed8;--ok-bg: #e7f5ec;--ok-text: #14532d;--err-bg: #fdecec;--err-text: #8a1111;--warn-text: #7a4a00;--radius: 6px;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.5;color:var(--text);background:var(--bg)}*{box-sizing:border-box}body{margin:0;background:var(--bg)}h1{font-size:1.6rem;margin:0}h2{font-size:1.2rem;margin:1.5rem 0 .5rem}h3,.h3{font-size:1.05rem;margin:1rem 0 .4rem}a{color:#1d4ed8}a:hover{color:#1e3a8a}code{font-family:ui-monospace,Menlo,monospace;font-size:.9em;background:#eef0f3;padding:0 .25em;border-radius:3px;word-break:break-all}:focus-visible{outline:3px solid var(--focus);outline-offset:2px}h1:focus{outline:none}.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.skip-link{position:absolute;left:-9999px;top:0;background:var(--surface);padding:.5rem 1rem;z-index:10}.skip-link:focus{left:1rem;top:.5rem}.muted{color:var(--muted)}.small{font-size:.875rem}.warn{color:var(--warn-text);margin:.25rem 0}.hint{color:var(--muted);font-size:.875rem;margin:.25rem 0 0}.app{min-height:100vh;display:flex;flex-direction:column}.topbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;padding:.6rem 1.25rem;background:#1f2329;color:#fff}.topbar a,.topbar .muted{color:#d6dae0}.topbar-left,.topbar-right{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}.brand{font-weight:700;letter-spacing:.02em}.tenant-name{font-weight:600}.shell{display:flex;flex:1}.sidebar{width:230px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--line);padding:1rem 0}.sidebar ul{list-style:none;margin:0;padding:0}.sidebar a{display:block;padding:.55rem 1.25rem;color:var(--text);text-decoration:none;border-left:4px solid transparent}.sidebar a:hover{background:#f0f1f3}.sidebar a.active{border-left-color:var(--primary);font-weight:600;background:#f7eded}.content{flex:1;padding:1.5rem 2rem 3rem;min-width:0}@media (max-width: 800px){.shell{flex-direction:column}.sidebar{width:auto;border-right:0;border-bottom:1px solid var(--line);padding:.25rem 0}.sidebar ul{display:flex;flex-wrap:wrap}.sidebar a{border-left:0;border-bottom:3px solid transparent;padding:.5rem .75rem}.sidebar a.active{border-bottom-color:var(--primary)}.content{padding:1rem}}.page-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.page-header h2{margin:1.5rem 0 .5rem}.page-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.auth-page{min-height:100vh;display:grid;place-items:center;padding:1rem}.auth-card{background:var(--surface);padding:2rem;border-radius:10px;width:100%;max-width:420px;box-shadow:0 2px 12px #00000014}.auth-card.wide{max-width:560px}.auth-card h1{margin-bottom:1rem}.auth-card .brand{color:var(--primary);margin:0 0 .75rem}.qr{display:block;width:200px;height:200px;margin:1rem auto;background:#fff}.secret{display:inline-block;letter-spacing:.08em}.tenant-list{list-style:none;padding:0;margin:0 0 1rem}.tenant-list a{display:flex;flex-direction:column;padding:.75rem 1rem;border:1px solid var(--line);border-radius:var(--radius);margin-bottom:.5rem;text-decoration:none;color:var(--text)}.tenant-list a:hover{border-color:var(--primary)}.field{margin-bottom:1rem;display:flex;flex-direction:column}.field label,.field .label{font-weight:600;margin-bottom:.3rem}.field-check{flex-direction:row;align-items:center;gap:.5rem}.field-check label{font-weight:400;margin:0}input[type=text],input[type=email],input[type=password],input[type=url],input[type=date],input[type=datetime-local],input[type=number],input:not([type]),select,textarea{font:inherit;color:var(--text);background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:.5rem .65rem;min-height:2.5rem;width:100%}input[type=checkbox]{width:1.15rem;height:1.15rem;accent-color:var(--primary)}input[type=color]{width:4rem;height:2.5rem;border:1px solid var(--border);border-radius:var(--radius);padding:2px}input[type=file]{font:inherit}textarea{min-height:6rem;resize:vertical}fieldset{border:1px solid var(--line);border-radius:var(--radius);padding:1rem 1.25rem .25rem;margin:0 0 1.25rem;background:var(--surface)}legend{font-weight:700;padding:0 .4rem}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:0 1rem}@media (max-width: 700px){.grid-2{grid-template-columns:1fr}}.form-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.5rem}.narrow{max-width:720px}.filters{display:flex;gap:1rem;flex-wrap:wrap;align-items:flex-end;margin-bottom:1rem}.filters .field{min-width:200px;margin-bottom:0}.filters .btn{margin-bottom:0}.inline-form{max-width:520px;margin-top:1.5rem}.btn{font:inherit;display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-height:2.5rem;padding:.45rem 1rem;border-radius:var(--radius);border:1px solid var(--border);background:#fff;color:var(--text);cursor:pointer;text-decoration:none;white-space:nowrap}.btn:hover:not(:disabled){background:#f0f1f3}.btn:disabled{opacity:.55;cursor:not-allowed}.btn-primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn-primary:hover:not(:disabled){background:var(--primary-hover)}.btn-danger{color:var(--err-text);border-color:#c26b6b}.btn-danger:hover:not(:disabled){background:var(--err-bg)}.btn-small{min-height:2rem;padding:.2rem .6rem;font-size:.875rem}.topbar .btn{background:transparent;color:#fff;border-color:#8a909b}.topbar .btn:hover{background:#343a42}.row-actions{display:flex;gap:.35rem;flex-wrap:wrap}.stack{display:flex;flex-direction:column;gap:.5rem}.alert{padding:.75rem 1rem;border-radius:var(--radius);margin-bottom:1rem;border-left:4px solid}.alert-error{background:var(--err-bg);color:var(--err-text);border-color:var(--err-text)}.alert-ok{background:var(--ok-bg);color:var(--ok-text);border-color:var(--ok-text)}.badge{display:inline-block;font-size:.78rem;font-weight:600;padding:.1rem .5rem;border-radius:999px;margin-left:.35rem;border:1px solid;vertical-align:middle}.badge-draft{background:#eef0f3;color:#3d434c;border-color:#b8bdc5}.badge-pending,.badge-skipped{background:#fff4dc;color:#6b4200;border-color:#d9b25c}.badge-published,.badge-clean{background:var(--ok-bg);color:var(--ok-text);border-color:#6fb388}.badge-archived{background:#e8eefc;color:#1e3a8a;border-color:#8aa3e0}.badge-withdrawn,.badge-infected,.badge-error{background:var(--err-bg);color:var(--err-text);border-color:#d48a8a}.table-wrap{overflow-x:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);margin-bottom:1rem}table{border-collapse:collapse;width:100%}caption:not(.visually-hidden){text-align:left;font-weight:600;padding:.6rem .75rem 0}th,td{text-align:left;padding:.6rem .75rem;border-bottom:1px solid var(--line);vertical-align:top}th{background:#f7f8fa;font-weight:600}tbody tr:last-child td{border-bottom:0}.pager{display:flex;gap:1rem;align-items:center}.stat-row{list-style:none;padding:0;margin:0 0 1.5rem;display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.75rem}.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:.85rem 1rem;display:flex;flex-direction:column}.stat-value{font-size:1.6rem;font-weight:700}.stat-label{color:var(--muted);font-size:.875rem}.plain-list{list-style:none;padding:0;margin:0}.plain-list li{padding:.35rem 0;border-bottom:1px solid var(--line)}.plain-list li:last-child{border-bottom:0}.cards{list-style:none;padding:0;margin:0;display:grid;gap:1rem}.tree,.tree-sub{list-style:none;margin:0;padding:0}.tree-sub{padding-left:1.75rem;border-left:2px solid var(--line);margin-left:.6rem}.tree-row{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;padding:.5rem .75rem;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);margin:.35rem 0}.tree-title{font-weight:600;flex:1 1 220px}.tree-row .row-actions{margin-left:auto}.editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:1.5rem;align-items:start}@media (max-width: 1100px){.editor-layout{grid-template-columns:1fr}}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1rem 1.25rem;margin-bottom:1rem}.panel h2{margin-top:0}.attachment{display:flex;flex-direction:column;gap:.2rem;align-items:flex-start}.upload{border-top:1px solid var(--line);margin-top:.75rem;padding-top:.75rem}.rt{border:1px solid var(--border);border-radius:var(--radius);background:#fff}.rt-toolbar{display:flex;flex-wrap:wrap;gap:.25rem;padding:.35rem;border-bottom:1px solid var(--line);background:#f7f8fa;border-radius:var(--radius) var(--radius) 0 0}.tool{font:inherit;font-size:.875rem;min-height:2rem;padding:.15rem .55rem;border:1px solid var(--border);border-radius:4px;background:#fff;cursor:pointer}.tool.active{background:#1f2329;color:#fff;border-color:#1f2329}.rt-content{min-height:14rem;padding:.75rem 1rem;outline:none}.rt-content:focus-visible{outline:3px solid var(--focus);outline-offset:-3px}.rt-content p{margin:0 0 .75rem}.rt-content blockquote{border-left:4px solid var(--line);margin:0 0 .75rem;padding-left:1rem;color:var(--muted)}.dialog{border:0;border-radius:10px;padding:1.5rem;width:min(560px,calc(100vw - 2rem));max-height:calc(100vh - 2rem);box-shadow:0 10px 40px #00000040}.dialog::backdrop{background:#0f12168c}.dialog h2{margin-top:0}@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important}}.badge-required{background:#fff;color:var(--primary);border-color:var(--primary);font-weight:600}.badge-cl-missing{background:var(--err-bg);color:var(--err-text);border-color:#d48a8a}.badge-cl-draft{background:#fff4dc;color:#6b4200;border-color:#d9b25c}.badge-cl-stale{background:#e8eefc;color:#1e3a8a;border-color:#8aa3e0}.badge-cl-ok{background:var(--ok-bg);color:var(--ok-text);border-color:#6fb388}.state-dot{display:inline-block;width:.6rem;height:.6rem;border-radius:50%;margin-left:.4rem;vertical-align:middle}.state-dot-missing{background:#b42318}.state-dot-draft{background:#b7791f}.state-dot-stale{background:#1d4ed8}.nav-count{display:inline-block;min-width:1.4rem;margin-left:.4rem;padding:0 .4rem;border-radius:999px;background:var(--primary);color:#fff;font-size:.78rem;font-weight:700;text-align:center;line-height:1.4rem}.progress-wrap{margin:.25rem 0 1rem}.progress-label{margin:0 0 .35rem;font-weight:600}.progress{height:.75rem;background:#e6e8ec;border:1px solid var(--border);border-radius:999px;overflow:hidden}.progress-fill{height:100%;background:var(--ok-text);transition:width .3s ease}.todo{border-left:4px solid var(--primary)}.todo h2{margin-bottom:.75rem}.todo-group h3{margin-top:1.25rem;margin-bottom:.1rem}.todo-group>.small{margin:0 0 .4rem}.todo-list{list-style:none;margin:0;padding:0}.todo-row{display:flex;align-items:center;gap:1rem;padding:.6rem 0;border-bottom:1px solid var(--line)}.todo-row:last-child{border-bottom:0}.todo-main{flex:1;min-width:0}.todo-title{font-weight:600}.todo-title .badge{margin-left:.25rem}.todo-excerpt{margin:.15rem 0 0;color:var(--muted);font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.todo-meta{margin:.1rem 0 0}.todo-done{background:var(--ok-bg);color:var(--ok-text);padding:.75rem 1rem;border-radius:var(--radius);margin:0}.todo-ok{margin-top:1rem}.todo-ok summary{cursor:pointer;font-weight:600;padding:.25rem 0}@media (max-width: 600px){.todo-row{flex-direction:column;align-items:stretch;gap:.4rem}}.breadcrumb{margin:-.75rem 0 .75rem}.guide{border-left:4px solid var(--focus)}.guide-head{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}.guide-head h2{margin:0;font-size:1.05rem}.guide-toggle{margin-left:auto}.guide-text{white-space:pre-line;margin:.6rem 0 0}.guide-meta{display:grid;grid-template-columns:max-content 1fr;gap:.25rem 1rem;margin:.75rem 0 0;font-size:.9rem}.guide-meta dt{font-weight:600;color:var(--muted)}.guide-meta dd{margin:0}@media (max-width: 600px){.guide-meta{grid-template-columns:1fr}.guide-meta dd{margin-bottom:.4rem}}.guide-hint{background:#eef3fd;border-left:4px solid var(--focus);border-radius:var(--radius);padding:.6rem 1rem;margin-bottom:1rem;max-width:900px}.guide-hint p{margin:0}.guide-hint-short{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.link-button{font:inherit;background:none;border:0;padding:0;margin-top:.25rem;color:#1d4ed8;text-decoration:underline;cursor:pointer}.link-button:hover{color:#1e3a8a}.empty-state{background:var(--surface);border:1px dashed var(--border);border-radius:var(--radius);padding:2.5rem 1.5rem;text-align:center;display:flex;flex-direction:column;align-items:center;gap:.75rem}.empty-state-title{font-size:1.1rem;margin:0}.empty-state .small{margin:0}.btn-large{min-height:3rem;padding:.6rem 1.5rem;font-size:1.05rem;font-weight:600}.attachments-hint{margin:-.25rem 0 .75rem}
