/* PureRank — design system */
:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e6eaf2;
  --muted: #8b94a7;
  --faint: #5b6478;
  --accent: #6366f1;
  --accent-2: #22d3ee;
  --grad: linear-gradient(92deg, #6366f1 0%, #8b5cf6 45%, #22d3ee 100%);
  --ok: #34d399;
  --warn: #fbbf24;
  --high: #fb923c;
  --bad: #f87171;
  --crit: #f43f5e;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 75% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(700px 420px at 10% 0%, rgba(34, 211, 238, 0.08), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
main, header.topbar, footer { position: relative; z-index: 1; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.topbar .container {
  display: flex; align-items: center; gap: 28px; height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.12rem; color: var(--text); letter-spacing: -0.01em; }
.logo:hover { text-decoration: none; }
.logo svg { width: 26px; height: 26px; }
.logo .tld { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; cursor: pointer;
  font: 600 0.95rem var(--font);
  padding: 12px 22px; color: #fff;
  background: var(--grad);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(99, 102, 241, 0.45); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.ghost {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: none;
}
.btn.small { padding: 8px 16px; font-size: 0.85rem; border-radius: 10px; }
.topbar .btn { padding: 9px 18px; font-size: 0.88rem; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 40px; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #b6b9ff; font-size: 0.82rem; font-weight: 600;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.hero h1 {
  margin: 26px auto 18px; max-width: 820px;
  font-size: clamp(2.3rem, 5.4vw, 3.7rem);
  line-height: 1.08; letter-spacing: -0.03em; font-weight: 800;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { max-width: 640px; margin: 0 auto 38px; color: var(--muted); font-size: 1.08rem; }
.hero .sub strong { color: var(--text); font-weight: 600; }

.scanbox {
  max-width: 640px; margin: 0 auto;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 18px; padding: 10px;
  display: flex; gap: 10px;
  box-shadow: var(--shadow);
}
.scanbox input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text); font: 500 1.02rem var(--font); padding: 10px 14px;
}
.scanbox input::placeholder { color: var(--faint); }
.scanbox select.depth {
  background: transparent; border: none; outline: none; cursor: pointer;
  color: var(--muted); font: 500 0.9rem var(--font);
  border-left: 1px solid var(--border); padding: 0 10px;
}
.scanbox select.depth option { background: #0b1120; color: var(--text); }
.scan-note { margin-top: 14px; color: var(--faint); font-size: 0.84rem; }
.scan-error {
  max-width: 640px; margin: 14px auto 0; padding: 12px 18px;
  background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 12px; color: #fda4af; font-size: 0.92rem; display: none;
}
.hero-stats { display: flex; justify-content: center; gap: 44px; margin-top: 46px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-stats .stat span { color: var(--faint); font-size: 0.85rem; }

.recent { margin: 34px auto 0; max-width: 860px; }
.recent-title { color: var(--faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px; }
.recent-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--muted); font-size: 0.84rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }
.chip .score { font-weight: 700; }

/* ---------- section scaffolding ---------- */
section { padding: 76px 0; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.sec-head .kicker { color: var(--accent-2); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em; }
.sec-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.02em; margin: 10px 0 12px; }
.sec-head p { color: var(--muted); }

/* ---------- scan progress panel ---------- */
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
#scan-panel { display: none; padding-top: 30px; padding-bottom: 10px; }
.scan-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.scan-head h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
.scan-head .target { color: var(--muted); font-family: var(--mono); font-size: 0.88rem; }
.progress-track { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--grad); border-radius: 99px; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 22px 0; }
.step { display: flex; flex-direction: column; gap: 7px; padding: 12px; border-radius: var(--radius-s); background: var(--panel); border: 1px solid var(--border); font-size: 0.8rem; color: var(--faint); transition: all 0.3s; }
.step .n { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.07); font-weight: 700; font-size: 0.72rem; }
.step.active { border-color: rgba(99, 102, 241, 0.6); color: var(--text); background: rgba(99, 102, 241, 0.1); }
.step.active .n { background: var(--grad); color: #fff; }
.step.done { color: var(--muted); }
.step.done .n { background: rgba(52, 211, 153, 0.2); color: var(--ok); }
.console {
  background: #05080f; border: 1px solid var(--border);
  border-radius: var(--radius-s); padding: 16px 18px;
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.75;
  height: 190px; overflow-y: auto; color: #9fb0c8;
}
.console .ts { color: var(--faint); }

/* ---------- report ---------- */
#report-panel { display: none; padding-top: 20px; }
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.report-head h2 { font-size: 1.6rem; letter-spacing: -0.02em; }
.report-head .meta { color: var(--faint); font-size: 0.85rem; margin-top: 4px; }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.score-grid { display: grid; grid-template-columns: 380px 1fr; gap: 22px; margin-bottom: 22px; }
.gauge-card { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-wrap { position: relative; width: 260px; }
.gauge-num {
  position: absolute; left: 0; right: 0; bottom: 8px;
  font-size: 3.1rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1;
}
.gauge-num small { display: block; font-size: 0.72rem; font-weight: 600; color: var(--faint); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 6px; }
.verdict-pill { display: inline-flex; padding: 7px 18px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; margin-top: 18px; }
.verdict-pill.low { background: rgba(52, 211, 153, 0.13); color: var(--ok); border: 1px solid rgba(52, 211, 153, 0.4); }
.verdict-pill.moderate { background: rgba(251, 191, 36, 0.12); color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.4); }
.verdict-pill.high { background: rgba(251, 146, 60, 0.12); color: var(--high); border: 1px solid rgba(251, 146, 60, 0.4); }
.verdict-pill.critical { background: rgba(244, 63, 94, 0.13); color: var(--crit); border: 1px solid rgba(244, 63, 94, 0.45); }
.headline { margin-top: 16px; color: var(--muted); font-size: 0.95rem; max-width: 300px; }
.conf { margin-top: 12px; font-size: 0.78rem; color: var(--faint); }

.overview-card h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.fact { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 14px 16px; }
.fact b { display: block; font-size: 1.25rem; letter-spacing: -0.02em; }
.fact span { color: var(--faint); font-size: 0.78rem; }
.update-flag {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-s);
  background: rgba(99, 102, 241, 0.08); border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--muted); font-size: 0.88rem;
}
.update-flag b { color: var(--text); }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.cat-card { padding: 20px; }
.cat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.cat-top h5 { font-size: 0.95rem; font-weight: 600; }
.cat-score { font-weight: 800; font-size: 1.05rem; }
.cat-desc { color: var(--faint); font-size: 0.78rem; min-height: 34px; margin-bottom: 10px; }
.bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; margin-bottom: 14px; }
.bar i { display: block; height: 100%; border-radius: 99px; width: 0%; transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cat-summary { color: var(--muted); font-size: 0.83rem; margin-bottom: 12px; }
.sig { display: flex; align-items: baseline; gap: 8px; font-size: 0.8rem; padding: 4px 0; color: var(--muted); }
.sig .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.sig .dot.ok { background: var(--ok); } .sig .dot.warn { background: var(--warn); } .sig .dot.bad { background: var(--crit); }
.sig .v { margin-left: auto; color: var(--text); font-weight: 600; text-align: right; }
.sig .d { color: var(--faint); font-size: 0.72rem; }

.tbl-wrap { overflow-x: auto; }
table.pages { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.pages th { text-align: left; color: var(--faint); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.pages td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.pages tr:last-child td { border-bottom: none; }
.page-url { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-2); word-break: break-all; }
.page-title { color: var(--faint); font-size: 0.78rem; margin-top: 3px; }
.score-chip { display: inline-block; min-width: 46px; text-align: center; padding: 4px 10px; border-radius: 8px; font-weight: 800; font-size: 0.88rem; }
.score-chip.low { background: rgba(52,211,153,0.13); color: var(--ok); }
.score-chip.moderate { background: rgba(251,191,36,0.12); color: var(--warn); }
.score-chip.high { background: rgba(251,146,60,0.12); color: var(--high); }
.score-chip.critical { background: rgba(244,63,94,0.13); color: var(--crit); }
.flags { color: var(--faint); font-size: 0.78rem; }
.flags li { margin-left: 16px; }

.recs { display: flex; flex-direction: column; gap: 12px; }
.rec { display: flex; gap: 16px; padding: 18px 20px; border-radius: var(--radius-s); background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--faint); }
.rec.critical { border-left-color: var(--crit); }
.rec.warning { border-left-color: var(--warn); }
.rec.info { border-left-color: var(--accent-2); }
.rec b { display: block; margin-bottom: 4px; font-size: 0.95rem; }
.rec p { color: var(--muted); font-size: 0.87rem; }
.rec .sev { flex: none; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; padding: 3px 10px; border-radius: 6px; height: fit-content; margin-top: 2px; }
.rec.critical .sev { background: rgba(244,63,94,0.15); color: var(--crit); }
.rec.warning .sev { background: rgba(251,191,36,0.13); color: var(--warn); }
.rec.info .sev { background: rgba(34,211,238,0.12); color: var(--accent-2); }

.subhead { font-size: 1.05rem; font-weight: 700; margin: 30px 0 14px; letter-spacing: -0.01em; }
.disclaimer { margin-top: 26px; padding: 14px 18px; border-radius: var(--radius-s); background: var(--panel); border: 1px dashed var(--border-strong); color: var(--faint); font-size: 0.8rem; }

/* ---------- features ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { padding: 26px; transition: transform 0.2s, border-color 0.2s; }
.feat:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.feat .ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(99,102,241,0.13); border: 1px solid rgba(99,102,241,0.3); margin-bottom: 18px; font-size: 1.25rem; }
.feat h4 { font-size: 1.02rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.feat p { color: var(--muted); font-size: 0.88rem; }

/* ---------- how ---------- */
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: how; }
.how { padding: 24px; position: relative; }
.how::before { counter-increment: how; content: "0" counter(how); font-size: 2rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; margin-bottom: 12px; }
.how h4 { font-size: 0.98rem; margin-bottom: 6px; }
.how p { color: var(--muted); font-size: 0.85rem; }

/* ---------- update section ---------- */
.update-card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px; }
.update-card h3 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 14px; }
.update-card p { color: var(--muted); font-size: 0.93rem; margin-bottom: 12px; }
.timeline { list-style: none; position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); opacity: 0.5; }
.timeline li { position: relative; padding-bottom: 20px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline b { display: block; font-size: 0.92rem; }
.timeline span { color: var(--muted); font-size: 0.85rem; }
.timeline .date { color: var(--accent-2); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.src-list { margin-top: 8px; font-size: 0.83rem; color: var(--faint); }
.src-list a { display: block; margin-top: 6px; }

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.price { padding: 30px; display: flex; flex-direction: column; }
.price.popular { border-color: rgba(99,102,241,0.55); background: linear-gradient(180deg, rgba(99,102,241,0.1), rgba(255,255,255,0.02)); position: relative; }
.price .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--grad); padding: 4px 14px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; }
.price h4 { font-size: 1rem; color: var(--muted); font-weight: 600; }
.price .amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 4px; }
.price .amount small { font-size: 0.9rem; color: var(--faint); font-weight: 500; }
.price ul { list-style: none; margin: 22px 0 26px; flex: 1; }
.price li { padding: 7px 0; color: var(--muted); font-size: 0.89rem; display: flex; gap: 10px; }
.price li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.price .btn { width: 100%; }

/* ---------- faq ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
details.faq { border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--panel); padding: 0 22px; }
details.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 0.98rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--faint); transition: transform 0.2s; flex: none; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { color: var(--muted); font-size: 0.9rem; padding-bottom: 20px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 40px 0 48px; margin-top: 40px; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--faint); font-size: 0.84rem; }
.foot .logo { font-size: 1rem; }
.foot-note { margin-top: 18px; color: var(--faint); font-size: 0.76rem; max-width: 720px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .score-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .update-card { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  .cat-grid, .feat-grid, .how-grid { grid-template-columns: 1fr; }
  .scanbox { flex-direction: column; }
  .scanbox .btn { width: 100%; }
  .hero { padding-top: 56px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  section { padding: 54px 0; }
}

@media print {
  body::before, body::after, .topbar, .hero, #scan-panel, .report-actions,
  #features, #how, #update, #pricing, #faq, footer { display: none !important; }
  body { background: #fff; color: #111; }
  .panel, .fact, .rec, details.faq { border-color: #ddd; background: #fff; }
}
