:root {
  --bg: #0e1117;
  --panel: #161b25;
  --panel-2: #1c2330;
  --line: #2a3343;
  --text: #e7ecf3;
  --muted: #8b96a8;
  --accent: #5b8cff;
  --accent-2: #7c5bff;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #1a2233 0%, var(--bg) 55%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1080px, 92vw); margin: 0 auto; }

/* Topbar */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(14, 17, 23, 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 16px;
}
.brand-name { font-size: 17px; letter-spacing: 0.2px; }
.tag { color: var(--muted); font-size: 13px; }

/* Hero */
.main { padding: 36px 0 64px; }
.hero { text-align: center; margin-bottom: 28px; }
.hero h1 {
  font-size: clamp(22px, 3.4vw, 33px);
  line-height: 1.25;
  margin: 0 0 12px;
  background: linear-gradient(120deg, #fff, #b9c6e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub { color: var(--muted); max-width: 720px; margin: 0 auto; font-size: 15px; }
.hero .sub strong { color: var(--text); }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}
.panel h2 { font-size: 16px; margin: 0; }
.head-actions { display: flex; gap: 8px; }

/* Form */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muted { color: var(--muted); font-weight: 400; }

input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}

.entry {
  margin: 16px 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.entry legend { padding: 0 6px; font-size: 13px; color: var(--text); }
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--text);
  margin: 7px 0;
  cursor: pointer;
}
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

button { font-family: inherit; cursor: pointer; border: none; border-radius: 9px; }
.primary {
  width: 100%;
  padding: 12px 16px;
  margin-top: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.08s, filter 0.15s;
}
.primary:hover { filter: brightness(1.08); }
.primary:active { transform: translateY(1px); }
.ghost {
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.ghost:hover { color: var(--text); border-color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

/* Result */
.scorecard-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.overall { display: flex; align-items: center; gap: 16px; }
.grade {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  border-radius: 16px;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.grade[data-g="S"] { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.grade[data-g="A"] { background: linear-gradient(135deg, #34d399, #059669); }
.grade[data-g="B"] { background: linear-gradient(135deg, #5b8cff, #7c5bff); }
.grade[data-g="C"] { background: linear-gradient(135deg, #fbbf24, #d97706); }
.grade[data-g="D"] { background: linear-gradient(135deg, #94a3b8, #475569); }
.overall-score { font-size: 30px; font-weight: 800; }
.overall-score .of { font-size: 15px; color: var(--muted); font-weight: 500; }
.overall-label { color: var(--muted); font-size: 13px; }
.verdict { margin: 0; font-size: 15px; color: var(--text); }

/* Dimensions */
.dims { display: flex; flex-direction: column; gap: 13px; margin-bottom: 18px; }
.dim { }
.dim-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13.5px;
  margin-bottom: 5px;
}
.dim-name { font-weight: 600; }
.dim-metric { color: var(--muted); font-size: 12px; }
.dim-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.bar {
  position: relative;
  height: 9px;
  background: var(--panel-2);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}
.bar-fill.s-good { background: linear-gradient(90deg, #34d399, #059669); }
.bar-fill.s-mid { background: linear-gradient(90deg, #5b8cff, #7c5bff); }
.bar-fill.s-low { background: linear-gradient(90deg, #fbbf24, #f87171); }

/* Findings */
.findings { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 560px) { .findings { grid-template-columns: 1fr; } }
.finding-block h3 { font-size: 14px; margin: 0 0 8px; }
.finding-block ul { margin: 0; padding-left: 18px; }
.finding-block li { font-size: 13.5px; margin-bottom: 7px; color: var(--text); }
.finding-block li .em { color: var(--accent); font-weight: 600; }

.result-actions { display: flex; align-items: center; gap: 12px; }
.result-actions .primary { width: auto; padding: 10px 20px; margin: 0; }
.copied { color: var(--good); font-size: 13px; }

/* How */
.how {
  margin-top: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.how h2 { font-size: 16px; margin: 0 0 12px; }
.how ul { margin: 0; padding-left: 18px; }
.how li { font-size: 14px; margin-bottom: 9px; color: var(--muted); }
.how li strong { color: var(--text); }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
