:root {
  --bg: #0c1220;
  --panel: #151d2e;
  --panel2: #1b2538;
  --line: #2a3750;
  --text: #e8eef8;
  --muted: #93a4bd;
  --accent: #5b9dff;
  --good: #3dd68c;
  --warn: #e0b56a;
  --bad: #ff7b7b;
  --soft: #223049;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 0% -10%, #1a2d55 0%, transparent 55%),
    radial-gradient(800px 420px at 100% 0%, #163528 0%, transparent 50%),
    var(--bg);
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(960px, 92vw); margin: 0 auto; }
header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(12,18,32,.88);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand h1 { margin: 0; font-size: 1.1rem; letter-spacing: .02em; }
.brand h1 em { font-style: normal; color: var(--accent); }
.lang { display: flex; gap: 6px; }
.lang button, .chip, .btn, .ans button {
  appearance: none; border: 1px solid var(--line); background: var(--soft);
  color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: .85rem; cursor: pointer;
}
.lang button.on, .chip.on { border-color: var(--accent); background: #243552; }
.hero { padding: 28px 0 8px; }
.hero h2 { margin: 0 0 8px; font-size: clamp(1.45rem, 3vw, 1.9rem); }
.lead { color: var(--muted); max-width: 42rem; margin: 0 0 16px; }
.panel {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 14px 0;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 220px; font-size: .9rem; color: var(--muted); }
input[type=url] {
  border: 1px solid var(--line); background: #0f1624; color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 1rem;
}
.btn.primary { background: var(--accent); color: #061018; font-weight: 700; border-color: transparent; border-radius: 10px; padding: 10px 16px; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.hint { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.block { margin: 22px 0; }
.block h3 { margin: 0 0 10px; font-size: 1.05rem; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.block .w { font-size: .78rem; color: var(--muted); font-weight: 500; }
.item {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0;
  background: rgba(15,22,36,.55);
}
.item.hard { border-color: #5a3a3a; }
.item .q { margin: 0 0 8px; font-size: .95rem; }
.item .meta { font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.ans { display: flex; gap: 6px; flex-wrap: wrap; }
.ans button.on.yes { border-color: var(--good); background: #1b3a2c; }
.ans button.on.half { border-color: var(--warn); background: #3a3220; }
.ans button.on.no { border-color: var(--bad); background: #3a2222; }
.ans button.on.na { border-color: var(--muted); background: #2a3140; }
.probe-box .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font-size: .75rem; padding: 3px 8px; border-radius: 999px;
  background: #243552; color: #cfe0ff;
}
.tag.ok { background: #1b3a2c; color: #b9f0d0; }
.tag.bad { background: #3a2222; color: #ffc9c9; }
.score-hero {
  display: grid; gap: 14px; grid-template-columns: 140px 1fr;
  align-items: center;
}
@media (max-width: 640px) { .score-hero { grid-template-columns: 1fr; } }
.ring {
  width: 120px; height: 120px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #243049 0);
  position: relative;
}
.ring::after {
  content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--panel);
}
.ring span { position: relative; z-index: 1; font-size: 1.6rem; font-weight: 750; }
.grade { font-size: 1.15rem; font-weight: 700; margin: 0 0 4px; }
.grade.good { color: var(--good); }
.grade.warn { color: var(--warn); }
.grade.bad { color: var(--bad); }
.bars { display: grid; gap: 8px; margin-top: 12px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 40px; gap: 8px; align-items: center; font-size: .85rem; }
.bar { height: 8px; background: #243049; border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.gap {
  border-left: 3px solid var(--bad); padding: 10px 12px; margin: 8px 0;
  background: rgba(255,123,123,.06); border-radius: 0 10px 10px 0;
}
.gap.warn { border-left-color: var(--warn); background: rgba(224,181,106,.06); }
.gap h4 { margin: 0 0 4px; font-size: .95rem; }
.gap p { margin: 0; color: var(--muted); font-size: .88rem; }
.recs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.rec {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  background: var(--panel);
}
.rec h4 { margin: 0 0 6px; }
.rec p { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: #243552; border: 1px solid var(--accent); color: var(--text);
  padding: 8px 14px; border-radius: 999px; font-size: .85rem; opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.toast.show { opacity: 1; }
footer {
  border-top: 1px solid var(--line); margin-top: 36px; padding: 24px 0 40px;
  color: var(--muted); font-size: .85rem;
}
.hidden { display: none !important; }
.optional-note { font-size: .8rem; color: var(--warn); }
