:root {
  --bg: #f5f6f8;
  --bg-2: #eef0f3;
  --panel: #ffffff;
  --panel-2: #fbfcfd;
  --ink: #13161b;
  --ink-2: #3a414b;
  --muted: #656d78;
  --faint: #949aa4;
  --line: #e4e7ec;
  --line-2: #d4d9e0;
  --brand: #3a53c5;
  --brand-ink: #2b3e97;
  --brand-bg: #eef1fb;

  --pass: #1f7a4d;
  --pass-bg: #e9f4ee;
  --pass-line: #bfe0cd;
  --warn: #9a6a10;
  --warn-bg: #fbf1dd;
  --warn-line: #ecd6a6;
  --crit: #b42222;
  --crit-bg: #fbe9e9;
  --crit-line: #eec2c2;

  --gA: #1f7a4d; --gB: #4d7a2b; --gC: #9a6a10; --gD: #b45309; --gF: #b42222;

  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --maxw: 1480px;
  --pad: clamp(20px, 4.5vw, 64px);
  --sh-sm: 0 1px 2px rgba(19, 22, 27, 0.04), 0 1px 3px rgba(19, 22, 27, 0.05);
  --sh-md: 0 4px 12px rgba(19, 22, 27, 0.06), 0 1px 3px rgba(19, 22, 27, 0.05);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ico svg { display: block; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 var(--pad);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.brand .wm { font-family: var(--mono); font-size: 14px; letter-spacing: -0.01em; font-weight: 600; }
.brand .wm b { color: var(--brand); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-right a { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.topbar-right a:hover { color: var(--ink); text-decoration: none; }
.topbar-right .live { color: var(--pass); font-family: var(--mono); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.topbar-right .live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pass); }

main { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) 120px; }

.hero { padding: clamp(56px, 9vw, 108px) 0 clamp(40px, 5vw, 60px); max-width: 1040px; margin: 0 auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; color: var(--brand-ink); background: var(--brand-bg); border: 1px solid #dbe1f6; padding: 6px 13px; border-radius: 999px; margin-bottom: 26px; }
.hero h1 { font-size: clamp(33px, 4.4vw, 54px); line-height: 1.16; margin: 0 auto 22px; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; word-break: keep-all; }
.lede { color: var(--muted); font-size: clamp(17px, 1.8vw, 21px); max-width: 640px; margin: 0 auto 40px; text-wrap: balance; word-break: keep-all; }

.searchbar { display: flex; gap: 10px; max-width: 660px; margin: 0 auto; }
.search-wrap { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 9px; box-shadow: var(--sh-sm); transition: border-color 0.15s, box-shadow 0.15s; }
.search-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-bg); }
.search-wrap .ico { color: var(--faint); }
.search-wrap { padding: 2px 16px; }
#url { flex: 1; min-width: 0; padding: 15px 0; font-size: 16.5px; font-family: var(--mono); background: transparent; border: none; color: var(--ink); }
#url::placeholder { color: var(--faint); }
#url:focus { outline: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 16px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; transition: background 0.15s, border-color 0.15s, transform 0.08s; font-family: var(--sans); }
.btn:active { transform: translateY(1px); }
.btn-primary { padding: 14px 26px; background: var(--ink); color: #fff; white-space: nowrap; }
.btn-primary:hover { background: #000; text-decoration: none; }
.btn-primary:disabled { opacity: 0.5; cursor: default; }
.hint { color: var(--faint); font-size: 13.5px; margin: 18px auto 0; max-width: 620px; display: flex; align-items: center; justify-content: center; gap: 7px; }

.status { padding: 40px 0; display: flex; align-items: center; gap: 14px; color: var(--muted); }
.status.error { color: var(--crit); }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status .steps { font-size: 15px; }

.report { animation: fade 0.4s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.summary { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(20px, 3vw, 44px); align-items: center; padding: clamp(20px, 2.6vw, 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-sm); }
.grade-badge { width: 108px; height: 108px; border-radius: 14px; display: grid; place-items: center; position: relative; border: 1.5px solid currentColor; }
.grade-badge .gl { font-family: var(--mono); font-size: 52px; font-weight: 700; line-height: 1; }
.grade-badge .gv { position: absolute; bottom: 9px; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.sum-mid { min-width: 0; }
.sum-host { font-size: clamp(19px, 2.1vw, 24px); font-weight: 700; letter-spacing: -0.01em; word-break: break-all; display: flex; align-items: center; gap: 9px; }
.sum-host .ico { color: var(--faint); }
.sum-sub { color: var(--faint); font-size: 14px; font-family: var(--mono); margin-top: 5px; }
.sum-tally { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-family: var(--mono); padding: 6px 12px; border-radius: 7px; border: 1px solid var(--line-2); color: var(--muted); background: var(--panel-2); }
.chip.crit { color: var(--crit); border-color: var(--crit-line); background: var(--crit-bg); }
.chip.warn { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }
.chip.pass { color: var(--pass); border-color: var(--pass-line); background: var(--pass-bg); }
.sum-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; font-family: var(--mono); }
.toggle input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background 0.15s; flex: none; }
.toggle input:checked { background: var(--brand); }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.toggle input:checked::after { transform: translateX(14px); }

.cat-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 14px; }
.cat-tile { text-align: left; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; font: inherit; color: inherit; }
.cat-tile:hover { border-color: var(--line-2); box-shadow: var(--sh-sm); }
.cat-tile .ct-top { display: flex; align-items: center; justify-content: space-between; }
.cat-tile .ct-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-2); color: var(--ink-2); display: grid; place-items: center; }
.cat-tile .ct-score { font-family: var(--mono); font-size: 23px; font-weight: 700; }
.cat-tile .ct-label { font-size: 15px; font-weight: 600; margin: 13px 0 9px; letter-spacing: -0.01em; }
.cat-tile .ct-bar { height: 5px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.cat-tile .ct-bar i { display: block; height: 100%; border-radius: 3px; transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.cat-tile .ct-meta { font-size: 12.5px; color: var(--faint); font-family: var(--mono); margin-top: 9px; }

.section { margin-top: 40px; scroll-margin-top: 76px; }
.section-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.section-head .sh-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.section-head h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.section-head .sh-score { margin-left: auto; font-family: var(--mono); font-size: 15px; font-weight: 600; }
.section-head .sh-count { font-family: var(--mono); font-size: 12.5px; color: var(--faint); }

.finding-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 12px; align-items: start; }
.finding { border: 1px solid var(--line); border-left-width: 3px; border-radius: 10px; padding: 15px 17px; background: var(--panel); box-shadow: var(--sh-sm); }
.finding.critical { border-left-color: var(--crit); }
.finding.warn { border-left-color: var(--warn); }
.f-head { display: flex; gap: 11px; align-items: flex-start; }
.f-ico { margin-top: 1px; }
.f-ico.critical { color: var(--crit); }
.f-ico.warn { color: var(--warn); }
.f-ico.pass { color: var(--pass); }
.f-body { flex: 1; min-width: 0; }
.f-title { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.f-detail { color: var(--ink-2); font-size: 14.5px; margin-top: 6px; }
.f-why { color: var(--muted); font-size: 13.5px; margin-top: 7px; }
.f-fix { margin-top: 13px; padding: 12px 14px; background: var(--brand-bg); border: 1px solid #dfe4f7; border-radius: 8px; }
.f-fix .fl { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--brand-ink); text-transform: uppercase; letter-spacing: 0.08em; }
.f-fix .ft { font-size: 14px; margin-top: 6px; color: var(--ink-2); }
code { font-family: var(--mono); font-size: 0.85em; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; word-break: break-word; color: #2a3140; }

.passed { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.passed .pchip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.passed .pchip .ico { color: var(--pass); }

.guide { margin-top: 44px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.guide-head { padding: 22px clamp(20px, 2.6vw, 28px); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.guide-head h3 { margin: 0 0 7px; font-size: 19px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.guide-head .gh-ico { color: var(--brand); }
.guide-lede { color: var(--muted); font-size: 14.5px; margin: 0; max-width: 820px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.guide-item { padding: 20px clamp(20px, 2.6vw, 28px); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.guide-item:nth-child(-n + 3) { border-top: none; }
.guide-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.guide-tag .ico { color: var(--brand); }
.guide-title { font-weight: 700; font-size: 15.5px; line-height: 1.42; }
.guide-how { color: var(--muted); font-size: 14px; margin: 9px 0 0; line-height: 1.58; }

.upsell { margin-top: 44px; border: 1px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--ink); color: #eef0f3; }
.upsell-in { padding: clamp(26px, 3.4vw, 42px); }
.upsell-eyebrow { font-family: var(--mono); font-size: 12.5px; color: #9fb0f0; letter-spacing: 0.04em; }
.upsell h3 { margin: 12px 0 9px; font-size: clamp(22px, 2.8vw, 31px); letter-spacing: -0.02em; color: #fff; }
.upsell-lede { color: #b6bcc7; font-size: 15.5px; max-width: 680px; margin: 0 0 28px; }
.upsell-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: #2a2f39; border: 1px solid #2a2f39; border-radius: 10px; overflow: hidden; margin-bottom: 26px; }
.svc { padding: 20px; background: #1b1f27; }
.svc .svc-ico { width: 34px; height: 34px; border-radius: 8px; background: #262b35; color: #9fb0f0; display: grid; place-items: center; }
.svc .svc-t { font-weight: 700; font-size: 15.5px; margin: 14px 0 6px; color: #fff; }
.svc .svc-d { color: #a7adb8; font-size: 13.5px; line-height: 1.55; }
.upsell-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn-invert { padding: 13px 24px; background: #fff; color: var(--ink); }
.btn-invert:hover { background: #eef0f3; text-decoration: none; }
.upsell-note { color: #8b93a0; font-size: 12.5px; }

.explain { margin-top: 8px; padding-top: clamp(40px, 6vw, 68px); border-top: 1px solid var(--line); }
.explain-eyebrow { font-family: var(--mono); font-size: 12.5px; color: var(--brand-ink); letter-spacing: 0.02em; }
.explain h2 { font-size: clamp(22px, 2.8vw, 32px); margin: 12px 0 34px; letter-spacing: -0.02em; }
.explain-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.explain-grid li { background: var(--panel); padding: 22px; }
.explain-grid .eg-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--bg-2); color: var(--ink-2); display: grid; place-items: center; margin-bottom: 13px; }
.explain-grid strong { display: block; color: var(--ink); font-size: 16.5px; margin-bottom: 8px; }
.explain-grid p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }

.footer { border-top: 1px solid var(--line); background: var(--panel); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 32px var(--pad); color: var(--muted); }
.footer-inner .fmark { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.footnote { font-size: 12px; color: var(--faint); margin: 10px 0 0; max-width: 820px; }

@media (max-width: 1120px) { .cat-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .summary { grid-template-columns: auto 1fr; }
  .sum-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; }
  .finding-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar-right .live { display: none; }
  .cat-strip { grid-template-columns: repeat(2, 1fr); }
  .searchbar { flex-direction: column; }
  .btn-primary { width: 100%; }
  .summary { grid-template-columns: 1fr; text-align: left; }
  .grade-badge { width: 88px; height: 88px; }
  .grade-badge .gl { font-size: 42px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
