

:root {

  --bg: #f7f8fb;
  --panel: #ffffff;
  --border: #e6e8ee;
  --border-strong: #c6cfdc;
  --text: #1f2329;
  --muted: #5a6472;
  --primary: #2f54eb;
  --primary-dark: #1d39c4;
  --primary-soft: #ecf2fe;
  --pass: #15803d;
  --pass-bg: #f0fdf4;
  --pass-border: #bbf7d0;
  --fail: #b91c1c;
  --fail-bg: #fef2f2;
  --fail-border: #fecaca;

  --wide-max: 800px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 16px rgba(15, 23, 42, .04);
}

* { box-sizing: border-box; }


html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
              "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;

  display: flex;
  flex-direction: column;
}

a { color: var(--primary); }



.layout {
  display: grid;

  grid-template-columns: 260px minmax(0, 1fr);

  flex: 1;
}

.sidebar {
  background: #fff;
  color: var(--text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;

  max-height: 100%;
  border-right: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 17px 15px 13px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}
.brand:hover .logo-name { color: var(--primary); }


.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #1d39c4, #4096ff);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}
.logo-name { font-weight: 700; font-size: 15px; letter-spacing: .02em; }


.sidebar-back {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 10px 10px 2px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
}
.sidebar-back:hover { background: var(--bg); border-color: var(--border-strong); color: var(--text); }
.sidebar-back svg { flex: none; width: 13px; height: 13px; }

.module-list { flex: 1; overflow-y: auto; padding: 8px 8px 14px; }



.nav-tree { list-style: none; margin: 0; padding: 0; }
.nav-tree .nav-tree { padding-left: 10px; }

.nav-node > details > summary {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
  transition: background .12s, color .12s;
}
.nav-node > details > summary::-webkit-details-marker { display: none; }
.nav-node > details > summary:hover { background: var(--bg); color: var(--text); }


.nav-node > details > summary::before {
  content: "";
  flex: none;
  width: 0;
  height: 0;
  border-left: 4px solid currentColor;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  opacity: .75;
  transition: transform .12s;
}
.nav-node > details[open] > summary::before { transform: rotate(90deg); }


.nav-tree > .nav-node > details > summary {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--muted);
}
.nav-tree > .nav-node > details > summary:hover,
.nav-tree > .nav-node > details[open] > summary { color: var(--text); }

.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


.nav-count {
  flex: none;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 10px;
  color: var(--muted);
}

.nav-empty {
  margin: 2px 0 4px;
  padding-left: 17px;
  font-size: 11.5px;
  color: var(--muted);
}


.module-item {
  display: block;
  padding: 6px 8px 6px 17px;
  margin-bottom: 2px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.module-item:hover { background: var(--bg); color: var(--text); }
.module-item.active { background: var(--primary); color: #fff; font-weight: 500; }
.module-item.active:hover { background: var(--primary); }


.table-item {
  display: block;
  padding: 6px 8px 6px 17px;
  margin-bottom: 2px;
  border-left: 2px solid var(--border-strong);
  border-radius: 0 7px 7px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
}
.table-item:hover { background: var(--bg); color: var(--text); border-left-color: var(--muted); }
.table-item.active {
  background: #0f766e;
  border-left-color: #5eead4;
  color: #fff;
  font-weight: 500;
}


.nav-count.table-count { background: #ccfbf1; color: #0f766e; }

.sidebar-foot {
  border-top: 1px solid var(--border);
  padding: 9px 13px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
  font-size: 11px;
  color: var(--muted);
}
.link-btn {
  color: var(--primary);
  font-size: 11px;
  text-decoration: none;
}
.link-btn:hover { text-decoration: underline; }
.sep { color: var(--border-strong); }



.content {
  overflow-y: auto;
  padding: 30px 34px 70px;
  min-width: 0;
}




.foot {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.foot .line2 { margin-top: 6px; font-size: 13px; color: #9aa3b2; }

.foot .line2 a { color: inherit; text-decoration: none; }
.foot .line2 a:hover { color: var(--primary); text-decoration: underline; }



.intro { max-width: 780px; }

.intro-heading {
  margin: 30px 0 12px;
  font-size: 15.5px;
}
.intro-heading:first-child { margin-top: 0; }

.intro-text {
  margin: 0 0 15px;
  font-size: 14px;
  line-height: 1.95;
  white-space: pre-line;
}

.intro-list {
  margin: 0 0 15px;
  padding-left: 23px;
  font-size: 14px;
  line-height: 1.95;
}
.intro-list li { margin-bottom: 5px; }



.rows-title {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}


.rows-wrap { overflow-x: auto; margin-bottom: 10px; }

.rows-table { border-collapse: collapse; font-size: 12.5px; }
.rows-table th,
.rows-table td {
  border: 1px solid var(--border);
  padding: 3px 5px;
  text-align: left;
  white-space: nowrap;
}
.rows-table thead th {
  background: #f1f5f9;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--muted);
}
.rows-table td input[type="number"],
.rows-table td input[type="text"] {
  width: 78px;
  padding: 4px 6px;
  font-size: 12.5px;
}

.rows-idx { width: 26px; text-align: center; color: #94a3b8; }
.rows-op { width: 46px; text-align: center; }

.rows-del {
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #fff;
  padding: 3px 7px;
  font-size: 11.5px;
  color: #b91c1c;
  cursor: pointer;
  font-family: inherit;
}
.rows-del:hover { background: #fef2f2; border-color: #fca5a5; }

.rows-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rows-count { font-size: 11.5px; color: #94a3b8; }


.rows-table.rows-stacked th,
.rows-table.rows-stacked td { text-align: center; }
.rows-table.rows-stacked td input[type="number"],
.rows-table.rows-stacked td input[type="text"] { width: 68px; text-align: center; }
.rows-table.rows-stacked th.rows-lane {
  width: 50px;
  padding-right: 8px;
  text-align: right;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 500;
}

.rows-table.rows-stacked tbody tr.rows-start td,
.rows-table.rows-stacked tbody tr.rows-start th {
  border-top: 1px solid var(--border-strong);
}




.table-page { max-width: var(--wide-max); }


.panel.table-panel {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  overflow-x: auto;
}

.data-table {
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.data-table th,
.data-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}
.data-table thead th {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: normal;
}

.data-table .index-col {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  background: #fcfdff;
}
.data-table tbody tr:hover td,
.data-table tbody tr:hover .index-col { background: var(--primary-soft); }


.data-table .th-unit {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: #94a3b8;
}


.source-note {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.source-note code {
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}


.table-card { border-top: 3px solid #14b8a6; }

.module-head { margin-bottom: 22px; }
.module-head h2 { margin: 0 0 6px; font-size: 21px; }
.module-head .muted { margin: 0; font-size: 13.5px; color: var(--muted); }
.refs {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #dbeafe;
  border-radius: 7px;
  padding: 7px 12px;
  display: inline-block;
}


.code-picker { margin-bottom: 20px; }
.code-label-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .5px;
}
.code-row { display: flex; flex-wrap: wrap; gap: 10px; }
.code-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  text-decoration: none;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.code-option:hover { border-color: var(--primary); color: var(--text); }
.code-option .dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  flex: none;
  transition: border-color .12s, box-shadow .12s;
}
.code-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px var(--primary);
  font-weight: 500;
}
.code-option.selected .dot {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px var(--primary);
}
.code-single { margin: 0; font-size: 13.5px; color: var(--muted); }
.code-single strong { color: var(--text); font-weight: 600; }


.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 600px) minmax(0, 600px);
  gap: 18px;
  align-items: start;
  justify-content: start;
}

.workspace.single { grid-template-columns: minmax(0, 1fr); }
.workspace > .panel { margin-bottom: 0; }

.reference {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 20px;

  max-width: 600px;
}
.reference-item {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);

  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.reference-item img {
  display: block;
  width: 100%;
  height: auto;
}
.reference-item figcaption {
  padding: 10px 14px 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.reference-item figcaption:last-child { padding-bottom: 12px; }
.reference-item .note {
  margin: 0;
  padding: 5px 14px 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}


.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  max-width: 600px;
}
.panel h3 { margin: 0 0 14px; font-size: 15px; }


.field-group { margin-bottom: 22px; }
.field-group:last-child { margin-bottom: 0; }
.field-group-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: .6px;
}

.field-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 460px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 5px;
}
.field .unit {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  margin-left: 3px;
}
.field input, .field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .12s, box-shadow .12s;
}
.field input[type="checkbox"] { width: auto; }
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
.field .hint { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.field .field-error { margin: 5px 0 0; font-size: 12px; color: var(--fail); }
.field.invalid input, .field.invalid select { border-color: var(--fail); }
.field.invalid input:focus, .field.invalid select:focus {
  box-shadow: 0 0 0 3px rgba(185, 28, 28, .13);
}


.actions { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; max-width: 600px; }

.panel .actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}
.btn {
  padding: 10px 24px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.status { font-size: 13px; color: var(--muted); }
.login-required { margin: 0; font-size: 13px; color: var(--muted); }
.login-required a { color: var(--primary); }


.alert {
  padding: 13px 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 13.5px;
  border: 1px solid var(--fail-border);
  background: var(--fail-bg);
  color: var(--fail);
}
.alert.info { border-color: #bfdbfe; background: var(--primary-soft); color: var(--primary-dark); }


.result-divider {
  border-top: 2px solid var(--border-strong);
  margin: 32px 0 26px;
}


.overall {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 20px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
  max-width: 600px;
}
.overall::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.overall.pass { background: var(--pass-bg); border-color: var(--pass-border); color: var(--pass); }
.overall.fail { background: var(--fail-bg); border-color: var(--fail-border); color: var(--fail); }


.outputs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.outputs td { padding: 9px 4px; border-bottom: 1px solid var(--border); }
.outputs tr:last-child td { border-bottom: 0; }
.outputs td:first-child { color: var(--muted); }
.outputs td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }


.check {
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin-bottom: 10px;
}
.check:last-child { margin-bottom: 0; }
.check.pass { border-left-color: var(--pass); }
.check.fail { border-left-color: var(--fail); background: var(--fail-bg); }
.check.warn { border-left-color: #d97706; }
.check-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.check-title { font-weight: 600; }
.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  flex: none;
}
.badge.pass { background: var(--pass-bg); color: var(--pass); border: 1px solid var(--pass-border); }
.badge.fail { background: #fff; color: var(--fail); border: 1px solid var(--fail-border); }
.badge.warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge.info, .badge.na { background: #f1f5f9; color: var(--muted); border: 1px solid var(--border-strong); }
.check-msg { margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.util {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.util-bar { width: 200px; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; flex: none; }
.util-fill { height: 100%; background: var(--pass); border-radius: 3px; }
.util-fill.over { background: var(--fail); }

.notes { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--muted); }
.notes li { margin-bottom: 6px; }
.notes li:last-child { margin-bottom: 0; }

.pre {
  margin: 0;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}




.home-body { background: var(--bg); }

.home {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 34px 90px;
}

.home-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.home-top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.brand-mark:hover { text-decoration: none; }
.home-nav { display: flex; gap: 20px; font-size: 13px; }
.home-nav a { color: var(--muted); text-decoration: none; }
.home-nav a:hover { color: var(--primary); }


.auth-user { font-weight: 600; color: var(--primary); }

.home-headline {
  margin: 0 0 14px;
  font-size: 31px;
  line-height: 1.35;
  letter-spacing: -.4px;
}
.home-sub {
  margin: 0;
  max-width: 700px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

.section-title {
  margin: 48px 0 20px;
  font-size: 19px;
  letter-spacing: .3px;
}


.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;

  position: relative;
  background: #f7f8fa;
  border: 1px solid #e9ecf1;
  border-radius: 12px;
  padding: 26px 26px 20px;
  transition: transform .14s, box-shadow .14s, border-color .14s, background .14s;
}
.card:hover {
  transform: translateY(-3px);
  background: #fff;
  border-color: #d5dde9;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}


.card.card-static:hover {
  transform: none;
  background: #f7f8fa;
  border-color: #e9ecf1;
  box-shadow: none;
}
.card-icon { color: var(--primary); margin-bottom: 20px; }
.card-icon svg { display: block; width: 46px; height: 46px; }
.card-title { margin: 0 0 10px; font-size: 17.5px; }
.card-text {
  flex: 1;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.85;

  color: var(--muted);
}
.card-meta { margin: 14px 0 0; font-size: 12.5px; color: #94a3b8; }


.card-note { margin: 18px 0 0; font-size: 13px; color: #94a3b8; }

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.card-action svg {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  transition: color .14s, transform .14s;
}
.card-action:hover { color: var(--primary); }
.card-action:hover svg { color: var(--primary); transform: translateX(2px); }


.card-action::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}


.empty {
  background: #fff;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.empty-title { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.empty-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--muted);
}
.empty-text code, .roadmap code {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  color: #334155;
}


.roadmap { margin: 0; padding: 0; list-style: none; }
.roadmap li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.roadmap-title { font-size: 14px; font-weight: 600; }
.roadmap-note { font-size: 13px; color: var(--muted); }


@media (max-width: 1180px) {
  .layout { grid-template-columns: 226px minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .layout { grid-template-columns: 196px minmax(0, 1fr); }
  .brand { padding: 14px 12px 11px; }
  .brand h1 { font-size: 14.5px; }
  .module-item { font-size: 11.5px; }
  .nav-node > details > summary { font-size: 12px; }
  .nav-tree .nav-tree { padding-left: 7px; }
  .sidebar-foot { padding: 8px 11px; }
}

@media (max-width: 780px) {

  .layout { grid-template-columns: 168px minmax(0, 1fr); }
  .brand h1 { font-size: 13.5px; }
  .module-item { font-size: 11px; }
  .nav-node > details > summary { font-size: 11.5px; }
  .nav-tree .nav-tree { padding-left: 5px; }
}


@media (max-width: 1000px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .reference { position: static; }
}


@media (max-width: 880px) {
  .content { padding: 20px 18px 50px; }
  .util-bar { width: 120px; }
  .home { padding: 26px 18px 60px; }
  .home-headline { font-size: 24px; }
  .home-top-inner { flex-wrap: wrap; gap: 12px; padding: 14px 18px; }
  .section-title { margin-top: 34px; }
}
