@font-face { font-family: "Inter"; src: url(/static/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root { --navy:#1e3a8a; --navy-900:#172554; --indigo:#3b5bdb; --tint:#eef2ff; --tint-200:#c7d2fe; --ink:#0f172a; --muted:#475569; --line:#e2e8f0; --bg:#f8fafc;
  --red:#b91c1c; --red-bg:#fef2f2; --amber:#92400e; --amber-bg:#fffbeb; --green:#166534; --green-bg:#f0fdf4; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--navy); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; border-radius: 4px; }
.skip { position:absolute; left:-9999px; } .skip:focus { left: 12px; top: 12px; background:#fff; padding:8px 14px; z-index: 10; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip: rect(0 0 0 0); white-space: nowrap; }
header.top { background:#fff; border-bottom:1px solid var(--line); }
header.top .in, main, footer .in { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
header.top .in { display:flex; align-items:center; justify-content:space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display:flex; gap:10px; align-items:center; font-weight:600; font-size:18px; color: var(--ink); text-decoration:none; }
nav.main ul { list-style:none; display:flex; flex-wrap: wrap; gap: 4px; margin:0; padding:0; align-items:center; }
nav.main a { display:block; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight:500; font-size: 14px; text-decoration:none; }
nav.main a:hover { background: var(--tint); color: var(--navy); }
nav.main a[aria-current="page"] { color: var(--navy); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
main { padding-top: 32px; padding-bottom: 64px; }
h1 { font-size: 30px; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 20px; letter-spacing: -0.01em; margin: 32px 0 12px; }
h3 { font-size: 16px; margin: 0 0 4px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.eyebrow { color: var(--navy); font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.card { background:#fff; border:1px solid var(--line); border-radius: 16px; padding: 24px; }
.narrow { max-width: 480px; margin: 40px auto; }
.grid { display:grid; gap: 16px; } @media (min-width: 760px) { .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3,1fr); } .g4 { grid-template-columns: repeat(4,1fr); } }
.row { display:flex; gap: 12px; align-items:center; flex-wrap: wrap; } .between { justify-content: space-between; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 600; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; } .btn-primary:hover { background: var(--navy-900); }
.btn-secondary { background:#fff; color: var(--navy); border-color: var(--tint-200); } .btn-secondary:hover { background: var(--tint); border-color: var(--navy); }
.btn-danger { background:#fff; color: var(--red); border-color: #fecaca; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
label { display:block; font-weight: 500; margin-bottom: 4px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #94a3b8; border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.field { margin-bottom: 16px; }
.notice { border-left: 4px solid var(--indigo); background: var(--tint); padding: 12px 16px; border-radius: 10px; color: var(--muted); font-size: 14px; margin: 16px 0; }
.notice strong { color: var(--ink); }
.alert { padding: 12px 16px; border-radius: 10px; margin: 16px 0; border: 1px solid; }
.alert-error { background: var(--red-bg); color: var(--red); border-color: #fecaca; } .alert-ok { background: var(--green-bg); color: var(--green); border-color: #bbf7d0; }
.pill { display:inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--tint); color: var(--navy); }
.imp-critical, .imp-serious { background: var(--red-bg); color: var(--red); } .imp-moderate { background: var(--amber-bg); color: var(--amber); } .imp-minor { background: #f1f5f9; color: var(--muted); }
.ok { background: var(--green-bg); color: var(--green); }
.stat { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
.table-wrap { overflow-x: auto; }
code { font-size: 13px; background: #f1f5f9; padding: 1px 6px; border-radius: 6px; word-break: break-all; }
footer { border-top: 1px solid var(--line); background: #fff; } footer .in { padding: 20px; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
nav.main a.btn-primary { color: #fff; padding: 8px 16px; } nav.main a.btn-primary:hover { background: var(--navy-900); color: #fff; }
.lang-switch { display: inline-flex !important; align-items: center; gap: 6px; }
:lang(zh-CN) body, html:lang(zh-CN) { font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", ui-sans-serif, system-ui, sans-serif; }
/* CJK: avoid one-character-per-line wrapping in narrow table cells and pills. */
.pill { white-space: nowrap; }
:lang(zh-CN) th { white-space: nowrap; }
:lang(zh-CN) td { word-break: keep-all; }
.sitebar { background: var(--navy-900, #172554); } .sitebar .in { padding-top: 6px; padding-bottom: 6px; } .sitebar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; justify-content: flex-end; flex-wrap: wrap; }
.sitebar a { color: #fff; font-size: 13px; text-decoration: none; } .sitebar a:hover, .sitebar a:focus-visible { text-decoration: underline; }
.back-site { max-width: 440px; margin: 0 auto 12px; font-size: 14px; }
.footlinks { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; } footer .footlinks a { color: var(--muted); }
header.top .sitebar .in { min-height: 0; display: block; padding-top: 6px; padding-bottom: 6px; }
.danger-zone { border-color:#fecaca; } .btn-danger:hover { background:#fef2f2; border-color: var(--red); }

/* ---- Polish: depth, motion, dashboard widgets (motion off under prefers-reduced-motion) ---- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
main { animation: af-in .28s ease-out both; }
@keyframes af-in { from { transform: translateY(6px); } }
@media (min-width: 760px) { header.top { position: sticky; top: 0; z-index: 20; } }
header.top { background: rgb(255 255 255 / .82); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); }
html { scroll-padding-top: 88px; }
.card { box-shadow: 0 1px 2px rgb(15 23 42 / .04); transition: box-shadow .2s, border-color .2s, transform .2s; }
.btn { transition: background-color .15s, border-color .15s, transform .15s, box-shadow .2s; }
.btn-primary { box-shadow: 0 6px 16px -8px rgb(30 58 138 / .6); } .btn-primary:hover:not([disabled]) { transform: translateY(-1px); }
.btn:active:not([disabled]) { transform: translateY(1px); }
.kpis { display: grid; gap: 16px; margin-top: 8px; } @media (min-width: 900px) { .kpis { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.kpi .stat { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 8px; }
.kpi .sub { color: var(--muted); font-weight: 400; }
.kpi-score { display: flex; gap: 16px; align-items: center; background: linear-gradient(160deg, #fff, var(--tint)); border-color: var(--tint-200); }
.kpi-score p { margin: 0 0 4px; }
.good { color: var(--green); font-weight: 600; }
.ring { --p: 0; position: relative; width: 112px; height: 112px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 10; }
.ring .bg { stroke: #e0e7ff; }
.ring .fg { stroke: #4f46e5; stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: calc(314.16 - 314.16 * var(--p) / 100); transition: stroke-dashoffset 1.2s cubic-bezier(.2,.7,.2,1); }
.ring-v { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-v b { font-size: 28px; line-height: 1; } .ring-v small { font-size: 11px; color: var(--muted); margin-top: 4px; max-width: 80px; line-height: 1.2; }
.spark { display: block; margin: 8px 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.facts p { margin: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.chips { display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.zero { background: #f1f5f9 !important; color: var(--muted) !important; }
.prog { height: 8px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.prog > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--indigo), #6366f1); transition: width .4s ease; }
.scan-progress { margin-top: 16px; max-width: 520px; }
.scan-progress[hidden] { display: none; }
.skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%); background-size: 400% 100%; animation: af-sh 1.4s ease infinite; }
@keyframes af-sh { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.empty { text-align: center; padding: 40px 24px; display: grid; justify-items: center; gap: 4px; }
.empty h2 { margin: 12px 0 4px; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 50; max-width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; align-items: center; background: var(--ink); color: #fff; padding: 12px 12px 12px 16px; border-radius: 14px; box-shadow: 0 18px 40px -12px rgb(0 0 0 / .45); font-size: 14px; opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s; }
.toast.on { opacity: 1; transform: none; }
.toast p { margin: 0; flex: 1; } .toast a { color: #c7d2fe; font-weight: 600; white-space: nowrap; }
.toast-x { background: none; border: 0; color: #fff; font-size: 20px; line-height: 1; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.toast-x:hover { background: rgb(255 255 255 / .12); }
.toast :focus-visible { outline-color: #a5b4fc; }
.danger-zone { border-color: #fecaca; margin-top: 24px; }
.danger-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.danger-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) {
  main, .skel { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .ring .fg, .prog > span, .toast, .card, .btn { transition: none; }
  .btn-primary:hover:not([disabled]), .btn:active:not([disabled]) { transform: none; }
}
.chip.imp-serious { background: #fff7ed; color: #9a3412; }

.score-block { display: flex; gap: 16px; align-items: center; }
.score-block p { margin: 0 0 4px; }
.score-note { max-width: 46ch; }
