

:root {

  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #1f2329;
  --muted: #5a6472;
  --line: #e6e8ee;
  --brand: #2f54eb;
  --brand-ink: #1d39c4;
  --brand-soft: #ecf2fe;
  --danger: #c2410c;
  --danger-soft: #fff1ea;
  --ok: #12805c;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 24px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.65 "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: .88em;
  background: #eef1f6;
  border-radius: 5px;
  padding: 1px 5px;
}


.wrap { width: 100%; max-width: 1060px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }



.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 58px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--brand); }
.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;
}
.logo-name { font-weight: 700; }
.topnav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.navlink {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.navlink:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.navlink.is-active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.navlink.subtle { color: #99a3b1; font-size: 13px; }
.auth-user { color: var(--brand-ink); font-size: 13px; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }



.page { flex: 1; padding-top: 30px; padding-bottom: 64px; }

.hero { padding: 18px 0 26px; }
.hero h1, h1.page-title {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 10px;
  letter-spacing: -.01em;
}
.page-title { margin-bottom: 8px; }
.lede { color: var(--muted); font-size: 15px; margin: 0 0 22px; max-width: 720px; }
.muted { color: var(--muted); }
.empty {
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs .sep { margin: 0 6px; color: #c3cad4; }
.crumbs .here { color: var(--ink); font-weight: 600; }



.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
a.card:hover {
  transform: translateY(-2px);
  border-color: #c9d8f8;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 14px 30px rgba(47, 84, 235, .12);
}
.card-head { display: flex; align-items: center; gap: 8px; }
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 13px;
}
.card-title { font-size: 16px; font-weight: 650; flex: 1; }
.card-summary { color: var(--muted); font-size: 13.5px; }
.card-foot { color: var(--brand); font-size: 13px; margin-top: 2px; }
.badge {
  background: #eef1f6;
  color: var(--muted);
  border-radius: 999px;
  font-size: 12px;
  padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}
.card-broken {
  background: #fbfbfc;
  border-style: dashed;
  box-shadow: none;
  cursor: default;
}
.card-broken .card-title { color: var(--muted); }
.card-broken .card-foot { color: var(--muted); }



.block { margin-top: 34px; }
.block-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 0 0 12px;
}



.tool { max-width: 860px; }
.tool .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: #9aa4b2; margin-top: 6px; }

textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  font: inherit;
  color: inherit;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea.result { background: #fafbfd; }

.checks { display: flex; flex-wrap: wrap; gap: 18px; margin: 4px 0 18px; }
.checks label { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink); }
.checks input { width: auto; }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 10px;
  cursor: pointer;
}
.btn:hover { border-color: #c9d8f8; background: #fbfcff; }
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(47, 84, 235, .35);
}
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }

.note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}
.note-bad { color: var(--danger); }



.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  min-width: 110px;
}
.stat-num { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-bad .stat-num { color: var(--danger); }

.problem {
  background: var(--danger-soft);
  border: 1px solid #f3d3c2;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.problem-head { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.problem-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12.5px;
  color: #7c3010;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 6px;
}

.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree li { margin: 2px 0; }
.tree-label, .tree-tool { display: block; padding: 3px 0; font-size: 14px; }
.tree-label { font-weight: 600; }
.tree-tool { color: var(--muted); font-size: 13px; }
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--danger); }

.notes { color: var(--muted); font-size: 14px; padding-left: 20px; }
.notes li { margin: 4px 0; }




.foot {
  border-top: 1px solid var(--line);
  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(--brand); text-decoration: underline; }

@media (max-width: 640px) {
  .hero h1, h1.page-title { font-size: 24px; }
  .topbar-inner { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .topnav { order: 3; width: 100%; }
}
