:root {
  --ink: #111827; --muted: #6b7280; --line: #e5e7eb; --bg: #f8fafc; --panel: #ffffff;
  --navy: #232f3e; --orange: #ff9900; --blue: #2563eb; --green: #059669; --red: #dc2626; --amber: #d97706;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: var(--blue); }
.top { display: flex; align-items: center; gap: 18px; padding: 10px 24px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--orange); color: var(--navy); font-size: 20px; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav a { color: #d1d5db; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 14px; }
nav a:hover { background: rgba(255,255,255,.1); }
nav a.on { color: #fff; background: rgba(255,255,255,.18); }
.right { display: flex; align-items: center; gap: 10px; }
.user { font-size: 13px; color: #d1d5db; }
main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; min-height: 70vh; }
footer { border-top: 1px solid var(--line); padding: 18px 24px; text-align: center; color: var(--muted); font-size: 13px; }
h1 { font-size: 30px; line-height: 1.25; margin: 4px 0 8px; color: var(--navy); }
h2 { font-size: 22px; margin: 34px 0 10px; color: var(--navy); }
h3 { font-size: 17px; margin: 22px 0 8px; }
h4 { font-size: 14px; margin: 14px 0 4px; color: var(--muted); text-transform: none; }
.lead { font-size: 17px; color: #374151; max-width: 820px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .mono, pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.err { color: var(--red); } .hidden { display: none; }
.hero { padding: 18px 0 8px; }
.stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 22px; min-width: 150px; }
.stat .n { font-size: 28px; font-weight: 700; color: var(--navy); } .stat .l { font-size: 13px; color: var(--muted); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; border: 1px solid #cbd5e1; background: #fff; color: var(--ink); padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 14px; text-decoration: none; }
.btn:hover { border-color: #94a3b8; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: var(--navy); font-weight: 700; }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.top .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.top .btn.primary { background: var(--orange); color: var(--navy); border-color: var(--orange); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.card h3 { margin: 0 0 6px; font-size: 16px; } .card p { margin: 0; font-size: 14px; color: #374151; }
.card.link:hover { border-color: var(--orange); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.diagram-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; overflow-x: auto; margin: 14px 0; }
.diagram-wrap svg { width: 100%; height: auto; max-width: 780px; display: block; margin: 0 auto; }
.diagram-wrap.wide svg { max-width: 1040px; min-width: 760px; }
.chart-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; overflow-x: auto; margin: 10px 0 16px; }
.chart { width: 100%; height: auto; max-width: 780px; display: block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; margin: 8px 0; }
.lg i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.notice { background: #fff8e6; border: 1px solid #fde4a8; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 12px 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px 16px; margin: 16px 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; padding: 9px 14px; cursor: pointer; font-size: 14px; border-bottom: 3px solid transparent; color: #374151; }
.tab.on { border-color: var(--orange); font-weight: 700; color: var(--navy); }
.table-wrap { overflow-x: auto; margin: 10px 0; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; background: var(--panel); }
th, td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
th { background: #f1f5f9; font-weight: 600; white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover td { background: #f8fafc; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #e5e7eb; color: #374151; margin-right: 4px; }
.badge.ok { background: #dcfce7; color: #166534; } .badge.bad { background: #fee2e2; color: #991b1b; }
.badge.info { background: #dbeafe; color: #1e40af; } .badge.warn { background: #fef3c7; color: #92400e; }
.prose { max-width: 860px; } .prose p, .prose li { font-size: 15.5px; } .prose ul, .prose ol { padding-left: 24px; }
.prose pre { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: 13px; }
.prose code { background: #eef2f7; padding: 1px 5px; border-radius: 4px; font-size: .9em; } .prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 4px solid var(--orange); margin: 12px 0; padding: 2px 14px; color: #374151; background: #fffaf0; }
.prose li.check { list-style: none; margin-left: -20px; }
.form { display: grid; gap: 12px; margin: 12px 0; } .form.narrow { max-width: 380px; }
label { display: grid; gap: 4px; font-size: 13.5px; color: #374151; } label.inline { display: block; }
input[type=text], input[type=password], input[type=number], select, textarea { font: inherit; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; width: 100%; }
textarea.mono { font-size: 12px; } fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; } .row > label { min-width: 160px; }
.progress { height: 10px; background: #e5e7eb; border-radius: 6px; overflow: hidden; margin: 8px 0; }
.progress div { height: 100%; background: var(--orange); transition: width .4s; }
.cases { display: grid; gap: 8px; margin: 10px 0; }
details.case { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
details.case summary { cursor: pointer; font-size: 14px; } .case-body { padding-top: 6px; } .case-body p { font-size: 14px; white-space: pre-wrap; }
pre.ctx { background: #f1f5f9; padding: 10px; border-radius: 8px; white-space: pre-wrap; font-size: 12px; max-height: 260px; overflow: auto; }
.item { border-top: 1px solid var(--line); padding: 6px 0; }
.asset { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px 14px; margin: 14px 0; }
.asset-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .asset-head h3 { margin: 14px 0 8px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 16px; margin: 6px 0 10px; }
.kv-i .k { display: block; font-size: 12px; color: var(--muted); } .kv-i .v { font-size: 14px; font-weight: 600; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: 420px; }
.toast { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.toast.err { background: #991b1b; }
@media (max-width: 720px) { h1 { font-size: 24px; } main { padding: 18px 12px 40px; } .top { padding: 8px 12px; } }
.tagline { font-size: 20px; font-weight: 600; color: var(--navy); margin: 0 0 10px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; margin: 8px 0 12px; }
.perm-grid label { font-size: 12.5px; }
.pw-box { background: #0f172a; color: #e2e8f0; padding: 12px 16px; border-radius: 10px; margin: 12px 0; }
.pw-box code { font-size: 16px; color: #fde68a; user-select: all; }

#wm { position: fixed; inset: 0; pointer-events: none; z-index: 45; opacity: .075; background-repeat: repeat; }
@media print { body > *:not(#wm) { display: none !important; } body::after { content: "Printing is disabled for this workspace."; display: block; padding: 40px; font-size: 18px; } }
