/* URLセキュリティ診断 — dark "security console" by default, light theme via prefers-color-scheme. */
:root {
  color-scheme: dark;
  --bg: #070d1a;
  --bg-glow: rgba(45, 212, 191, 0.10);
  --surface: #0d1527;
  --surface-2: #121c33;
  --surface-3: #18243f;
  --border: #1f2b46;
  --border-strong: #2b3a5c;
  --text: #e7eef9;
  --muted: #93a1bd;
  --faint: #5d6b88;
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --accent-ink: #032420;
  --safe: #34d399;
  --caution: #fbbf24;
  --danger: #fb7185;
  --info: #7dd3fc;
  --safe-bg: rgba(52, 211, 153, 0.12);
  --caution-bg: rgba(251, 191, 36, 0.12);
  --danger-bg: rgba(251, 113, 133, 0.13);
  --info-bg: rgba(125, 211, 252, 0.10);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --font: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Noto Sans Mono", monospace;
  --tabbar-h: 64px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f4f7fb;
    --bg-glow: rgba(14, 159, 142, 0.08);
    --surface: #ffffff;
    --surface-2: #f1f5fa;
    --surface-3: #e7edf6;
    --border: #dde4ef;
    --border-strong: #c7d2e3;
    --text: #0f172a;
    --muted: #52607a;
    --faint: #8090aa;
    --accent: #0d9488;
    --accent-2: #0284c7;
    --accent-ink: #ffffff;
    --safe: #059669;
    --caution: #b45309;
    --danger: #e11d48;
    --info: #0369a1;
    --safe-bg: rgba(5, 150, 105, 0.09);
    --caution-bg: rgba(217, 119, 6, 0.10);
    --danger-bg: rgba(225, 29, 72, 0.08);
    --info-bg: rgba(2, 132, 199, 0.08);
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 50% -200px, var(--bg-glow), transparent 70%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- icons ---------- */
.ic, [data-icon] svg { display: inline-flex; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
.ic svg, .feature-ic svg { width: 100%; height: 100%; }

/* ---------- app bar / tab bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.appbar-inner { max-width: 680px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: url("/icons/icon.svg") center / cover no-repeat;
  box-shadow: 0 0 0 1px var(--border-strong), 0 0 18px var(--bg-glow);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: 0.02em; }
.brand-text span { font-size: 11.5px; color: var(--muted); letter-spacing: 0.08em; }

main { max-width: 680px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.tab {
  border: 0; background: none; color: var(--faint);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em;
}
.tab .ic { width: 24px; height: 24px; }
.tab.is-active { color: var(--accent); }

/* ---------- generic ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.section-title { font-size: 17px; margin: 28px 0 12px; letter-spacing: 0.02em; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.view-head .section-title { margin-bottom: 8px; }
.hint { display: flex; gap: 6px; align-items: flex-start; color: var(--muted); font-size: 12.5px; margin: 8px 0 12px; }
.hint .ic { margin-top: 3px; color: var(--accent); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1 1 0; min-width: 0; }
.error {
  margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  font-size: 14px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface-2);
  font-weight: 700; letter-spacing: 0.03em; white-space: nowrap;
  transition: transform .08s ease, background .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary {
  width: 100%; border: 0; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 30%, transparent);
}
.row .btn-primary { width: auto; }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }

/* ---------- hero / input ---------- */
.hero { padding: 14px; }
.seg {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
  margin-bottom: 16px;
}
.seg-btn {
  border: 0; background: transparent; border-radius: 9px; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13.5px; font-weight: 700; color: var(--muted);
}
.seg-btn.is-active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg-btn.is-active .ic { color: var(--accent); }
.mode { display: none; }
.mode.is-active { display: block; }
.label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 0 6px; letter-spacing: 0.04em; }
.field {
  display: flex; align-items: center; gap: 6px; margin-bottom: 12px;
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 12px; padding: 4px 4px 4px 12px;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-family: var(--mono); font-size: 15px; padding: 10px 0; }
.field-btn {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  border: 0; border-radius: 9px; padding: 8px 10px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 700;
}
textarea {
  width: 100%; resize: vertical; min-height: 120px; padding: 12px;
  border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg); outline: none; font-size: 14.5px; line-height: 1.6;
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.chips-label { font-size: 12px; color: var(--faint); }
.chip { border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-family: var(--mono); }

/* ---------- QR ---------- */
.qr-stage { position: relative; aspect-ratio: 1 / 1; max-height: 360px; margin: 0 auto 12px; border-radius: 14px; overflow: hidden; background: #000; }
.qr-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-frame { position: absolute; inset: 16%; }
.qr-frame i { position: absolute; width: 28px; height: 28px; border: 3px solid var(--accent); }
.qr-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.qr-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.qr-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.qr-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.qr-beam { position: absolute; left: 6%; right: 6%; height: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: beam 2s ease-in-out infinite; }
@keyframes beam { 0%, 100% { top: 6%; } 50% { top: 94%; } }
.qr-stop { position: absolute; right: 10px; bottom: 10px; min-height: 36px; background: rgba(0,0,0,.55); color: #fff; border-color: rgba(255,255,255,.3); }
.qr-found { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.qr-found .mono { display: block; word-break: break-all; margin: 4px 0 10px; }

/* ---------- scanning ---------- */
.scanning { margin-top: 16px; padding: 18px; display: flex; gap: 18px; align-items: center; }
.radar {
  position: relative; width: 92px; height: 92px; flex: none; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 30%, color-mix(in srgb, var(--accent) 25%, transparent) 31%, transparent 32%, transparent 60%, color-mix(in srgb, var(--accent) 25%, transparent) 61%, transparent 62%),
    radial-gradient(circle, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  overflow: hidden;
}
.sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70deg); animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.blip { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blink 1.6s ease-in-out infinite; }
.b1 { top: 26%; left: 62%; } .b2 { top: 64%; left: 30%; animation-delay: .5s; } .b3 { top: 40%; left: 22%; animation-delay: 1s; }
@keyframes blink { 0%, 100% { opacity: .1; } 50% { opacity: 1; } }
.scanning-title { margin: 0; font-weight: 800; }
.scanning-target { margin: 0 0 6px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); word-break: break-all; }
.steps { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--faint); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.steps li.is-active { color: var(--text); }
.steps li.is-active::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps li.is-done { color: var(--muted); }
.steps li.is-done::before { background: var(--accent); border-color: var(--accent); }

/* ---------- intro ---------- */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.feature strong { font-size: 14px; }
.feature span:last-child { font-size: 12px; color: var(--muted); line-height: 1.55; }
.feature-ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; margin-bottom: 6px; }
.tip { display: flex; gap: 10px; padding: 14px; margin-top: 12px; align-items: flex-start; }
.tip .ic { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.tip p { margin: 0; font-size: 13px; color: var(--muted); }
.tip strong { color: var(--text); }

.tone-safe { color: var(--safe); background: var(--safe-bg); }
.tone-caution { color: var(--caution); background: var(--caution-bg); }
.tone-danger { color: var(--danger); background: var(--danger-bg); }
.tone-info { color: var(--info); background: var(--info-bg); }

/* ---------- result: verdict ---------- */
.result { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.verdict {
  --tone: var(--safe); --tone-bg: var(--safe-bg);
  position: relative; overflow: hidden;
  padding: 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--tone-bg), transparent 75%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--tone) 45%, var(--border));
  display: flex; gap: 14px; align-items: flex-start;
}
.verdict[data-level="caution"] { --tone: var(--caution); --tone-bg: var(--caution-bg); }
.verdict[data-level="danger"] { --tone: var(--danger); --tone-bg: var(--danger-bg); }
.verdict-ic { width: 48px; height: 48px; flex: none; color: var(--tone); }
.verdict-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em; color: var(--tone); margin: 0; }
.verdict-title { font-size: 21px; margin: 0 0 4px; line-height: 1.35; }
.verdict-reasons { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.verdict-reasons li { display: flex; gap: 6px; }
.verdict-reasons li::before { content: "›"; color: var(--tone); font-weight: 800; }
.verdict-url { margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--faint); word-break: break-all; }

/* ---------- result: score ---------- */
.score-card { padding: 16px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.ring { position: relative; width: 120px; height: 120px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-3); }
.ring .bar { stroke: var(--tone, var(--accent)); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-unit { font-size: 11px; color: var(--muted); }
.score-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.grade { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.grade-pill { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 18px; color: var(--accent-ink); background: var(--tone, var(--accent)); }
.host { font-family: var(--mono); font-size: 13.5px; word-break: break-all; }
.meta-line { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sub-scores { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; width: 100%; }
.sub-score { display: grid; grid-template-columns: 5.6em 1fr 2.2em; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.sub-score b { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.delta-up { color: var(--safe); font-weight: 700; }
.delta-down { color: var(--danger); font-weight: 700; }

/* ---------- result: route map ---------- */
.panel { padding: 16px; }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin: 0 0 12px; }
.panel-title .ic { color: var(--accent); }
.route { list-style: none; margin: 0; padding: 0; position: relative; }
.route li { position: relative; padding: 0 0 14px 30px; }
.route li:last-child { padding-bottom: 0; }
.route li::before { content: ""; position: absolute; left: 9px; top: 22px; bottom: -2px; width: 2px; background: var(--border-strong); }
.route li:last-child::before { display: none; }
.route li.is-downgrade::before { background: var(--danger); }
.route-dot { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 2px solid var(--border-strong); color: var(--muted); }
.route-dot .ic { width: 11px; height: 11px; }
.route li.is-final .route-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.route li.is-http .route-dot { border-color: var(--caution); color: var(--caution); }
.route-host { font-family: var(--mono); font-size: 13.5px; font-weight: 700; word-break: break-all; }
.route-sub { font-size: 12px; color: var(--faint); font-family: var(--mono); word-break: break-all; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; margin-left: 6px; vertical-align: 1px; }
.tag-danger { color: var(--danger); background: var(--danger-bg); }
.tag-caution { color: var(--caution); background: var(--caution-bg); }
.tag-info { color: var(--info); background: var(--info-bg); }
.tag-safe { color: var(--safe); background: var(--safe-bg); }

/* ---------- result: groups / categories ---------- */
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 10px 2px 0; }
.group-head h2 { font-size: 17px; margin: 0; }
.group-head p { margin: 0; font-size: 12px; color: var(--muted); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cat {
  text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  display: flex; flex-direction: column; gap: 8px;
}
.cat-name { font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cat-name .ic { color: var(--tone); }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--tone); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.cat-counts { display: flex; gap: 8px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-counts b { font-weight: 800; }
.c-fail { color: var(--danger); } .c-warn { color: var(--caution); } .c-pass { color: var(--safe); }
.cat[data-tone="safe"], .verdict-tone-safe { --tone: var(--safe); }
.cat[data-tone="caution"] { --tone: var(--caution); }
.cat[data-tone="danger"] { --tone: var(--danger); }

/* ---------- result: checks ---------- */
.checks { display: flex; flex-direction: column; gap: 8px; }
.cat-block { scroll-margin-top: 80px; }
.cat-block h3 { font-size: 13px; color: var(--muted); letter-spacing: 0.06em; margin: 12px 2px 8px; display: flex; align-items: center; gap: 6px; }
.check { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.check[data-status="fail"] { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.check[data-status="warn"] { border-color: color-mix(in srgb, var(--caution) 35%, var(--border)); }
.check summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px; cursor: pointer; }
.check summary::-webkit-details-marker { display: none; }
.check-ic { width: 26px; height: 26px; padding: 5px; border-radius: 8px; flex: none; }
.check-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.4; }
.check-badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; flex: none; }
.check-pts { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.chev { width: 16px; height: 16px; color: var(--faint); transition: transform .2s; flex: none; }
.check[open] .chev { transform: rotate(180deg); }
.check-body { padding: 0 12px 12px 48px; font-size: 13.5px; }
.evidence { margin: 0; color: var(--muted); word-break: break-word; }
.advice { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--accent); }
.advice b { display: block; font-size: 11.5px; color: var(--accent); letter-spacing: 0.08em; margin-bottom: 2px; }
.more-btn { align-self: center; margin-top: 4px; }
.rest > summary { list-style: none; display: flex; width: fit-content; margin: 2px auto 0; color: var(--muted); }
.rest > summary::-webkit-details-marker { display: none; }
.rest[open] > summary { display: none; }

/* ---------- message analysis ---------- */
.msg-card { margin-top: 18px; padding: 16px; animation: rise .35s ease both; }
.msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.msg-level { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 8px; white-space: nowrap; flex: none; }
.msg-head h2 { font-size: 16px; margin: 0; }
.msg-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); margin: 0 0 12px; max-height: 260px; overflow: auto; }
.msg-text mark { background: var(--caution-bg); color: inherit; border-bottom: 2px solid var(--caution); border-radius: 3px; padding: 0 1px; }
.msg-text mark.hl-url { background: var(--info-bg); border-bottom-color: var(--info); }
.msg-hits { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.msg-hits li { display: flex; gap: 8px; font-size: 13px; }
.msg-hits li .ic { color: var(--caution); margin-top: 3px; }
.msg-hits small { color: var(--muted); }
.msg-urls { display: flex; flex-direction: column; gap: 8px; }
.msg-url { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.msg-url code { flex: 1; min-width: 0; font-size: 12.5px; word-break: break-all; }
.mono { font-family: var(--mono); }

/* ---------- history ---------- */
.history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.h-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.h-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 0; }
.h-score { width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.h-main { min-width: 0; display: flex; flex-direction: column; }
.h-host { font-family: var(--mono); font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-sub { font-size: 12px; color: var(--muted); }
.h-del { border: 0; background: none; color: var(--faint); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.h-del .ic { width: 18px; height: 18px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--border-strong); border-radius: 16px; font-size: 14px; }

/* ---------- help ---------- */
.prose { padding: 4px 18px 14px; font-size: 14px; }
.prose h3 { font-size: 15px; margin: 18px 0 6px; }
.prose ul, .prose ol { padding-left: 20px; margin: 6px 0; }
.prose li { margin: 4px 0; }
.legend { list-style: none; padding-left: 0 !important; }
.legend li { display: flex; gap: 8px; align-items: baseline; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: currentColor; }
.footer-links { text-align: center; font-size: 13px; margin-top: 18px; }
.version { text-align: center; font-size: 11.5px; color: var(--faint); }

/* ---------- privacy page ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.doc h1 { font-size: 22px; }
.doc h2 { font-size: 16px; margin-top: 28px; }
.doc p, .doc li { font-size: 14px; color: var(--text); }

@media (max-width: 380px) {
  .features { grid-template-columns: 1fr; }
  .score-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .score-meta { align-items: center; width: 100%; }
  .scanning { flex-direction: column; text-align: center; }
  .steps li { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
