:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --line: #2a2f3a;
  --text: #e7e9ee;
  --muted: #97a0b0;
  --accent: #6ea8fe;
  --accent-2: #7bdcb5;
  --warn: #f5b661;
  --danger: #f28b82;
  --good: #7bdcb5;
  --radius: 14px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #1c2230 0%, var(--bg) 55%);
  color: var(--text);
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* topbar */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 30px; }
.topbar h1 { font-size: 19px; margin: 0; letter-spacing: .3px; }
.tagline { margin: 0; font-size: 12.5px; color: var(--muted); }
.topbar-actions { display: flex; gap: 8px; }

/* layout */
.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 22px;
  padding-bottom: 32px;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { font-size: 15px; margin: 0; color: var(--accent); }
.hint-inline { font-size: 12px; color: var(--muted); }
.scenario-tag {
  font-size: 11.5px; color: var(--accent-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}

/* form */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
input, textarea {
  width: 100%;
  margin-top: 5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  font-size: 13.5px;
  resize: vertical;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
.opt { color: #6b7385; font-size: 11px; }
.tip { color: var(--warn); font-size: 11px; }
.privacy { font-size: 11.5px; color: var(--muted); margin: 4px 0 0; }

/* buttons */
.btn {
  background: var(--accent);
  color: #0c1017;
  border: none;
  border-radius: 9px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.tiny { padding: 4px 10px; font-size: 11.5px; }

/* score */
.score-card { display: flex; align-items: center; gap: 18px; padding: 6px 0 12px; }
.score-ring {
  --pct: 0;
  width: 92px; height: 92px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(closest-side, var(--panel) 78%, transparent 79%),
    conic-gradient(var(--accent) calc(var(--pct) * 1%), #2a2f3a 0);
  flex: 0 0 auto;
}
.score-ring span { font-size: 30px; font-weight: 700; line-height: 1; }
.score-ring small { font-size: 11px; color: var(--muted); }
.score-grade { font-size: 13px; color: var(--muted); }
.score-grade b { font-size: 20px; color: var(--accent-2); margin-left: 4px; }
.score-verdict { margin: 4px 0 0; font-size: 13.5px; }

/* dimension bars */
.dim-bars { display: grid; gap: 7px; margin-bottom: 14px; }
.dim-row { display: grid; grid-template-columns: 108px 1fr 34px; align-items: center; gap: 8px; font-size: 12px; }
.dim-row .dim-label { color: var(--muted); }
.dim-track { height: 7px; background: var(--panel-2); border-radius: 6px; overflow: hidden; }
.dim-fill { height: 100%; border-radius: 6px; background: var(--accent); transition: width .35s ease; }
.dim-fill.low { background: var(--danger); }
.dim-fill.mid { background: var(--warn); }
.dim-fill.high { background: var(--good); }
.dim-pts { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* missing */
.missing-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.missing-box h3 { margin: 0 0 8px; font-size: 13px; }
.missing-box ul { margin: 0; padding-left: 18px; }
.missing-box li { font-size: 12.5px; margin-bottom: 6px; color: #cdd3de; }
.missing-box li b { color: var(--warn); }

/* sensitive */
.sensitive-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.sensitive-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sensitive-head h3 { margin: 0; font-size: 13px; }
.sensitive-box ul { margin: 8px 0 0; padding-left: 18px; }
.sensitive-box li { font-size: 12.5px; margin-bottom: 4px; }
.sensitive-box li .stype { color: var(--danger); font-weight: 600; margin-right: 6px; }
.muted { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }

/* channels */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tab {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 6px 12px; font-size: 12.5px; cursor: pointer;
}
.tab.active { background: var(--accent); color: #0c1017; border-color: var(--accent); font-weight: 600; }
.channel-out {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; font-size: 13px; white-space: pre-wrap; word-break: break-word;
  min-height: 150px; max-height: 340px; overflow: auto; margin: 0;
  font-family: "SF Mono", ui-monospace, "PingFang SC", monospace;
}
.out-actions { display: flex; gap: 8px; margin-top: 10px; }

/* footer + toast */
.foot { padding: 20px; text-align: center; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.hidden { display: none !important; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--accent-2); color: #0c1017; padding: 9px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 17px; }
  .dim-row { grid-template-columns: 92px 1fr 30px; }
}
