:root{
  --bg:#07111f;
  --bg-soft:#0c1830;
  --card:rgba(255,255,255,0.06);
  --card-strong:rgba(255,255,255,0.1);
  --line:rgba(255,255,255,0.12);
  --text:#edf2ff;
  --muted:rgba(237,242,255,0.74);
  --blue:#7cc6ff;
  --blue-strong:#60a5fa;
  --ok:#22c55e;
  --warn:#f59e0b;
  --fail:#ef4444;
  --info:#60a5fa;
  --radius:20px;
  --shadow:0 22px 80px rgba(0,0,0,0.35);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:"Segoe UI",Tahoma,Arial,sans-serif;
  background:
    radial-gradient(circle at top left, rgba(96,165,250,.18), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(59,130,246,.14), transparent 26%),
    linear-gradient(180deg, #07111f 0%, #091426 45%, #08111c 100%);
  color:var(--text);
}

a{color:inherit;}
code{
  background:rgba(255,255,255,0.08);
  padding:2px 7px;
  border-radius:8px;
}

.page-shell{
  position:relative;
  overflow:hidden;
}

.ambient{
  position:absolute;
  border-radius:999px;
  filter:blur(70px);
  opacity:.25;
  pointer-events:none;
}

.ambient-a{
  width:260px;
  height:260px;
  background:#2563eb;
  top:90px;
  left:-70px;
}

.ambient-b{
  width:220px;
  height:220px;
  background:#0ea5e9;
  right:-50px;
  top:280px;
}

.wrap{
  position:relative;
  max-width:1160px;
  margin:0 auto;
  padding:32px 18px 54px;
}

.hero{
  padding:18px 0 8px;
}

.hero-grid{
  display:grid;
  grid-template-columns:1.15fr .95fr;
  gap:28px;
  align-items:center;
}

.eyebrow,
.card-kicker,
.section-kicker,
.result-topline,
.insight-label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#bfe3ff;
}

.hero h1{
  margin:14px 0 14px;
  font-size:clamp(38px, 6vw, 64px);
  line-height:1.02;
  letter-spacing:-0.03em;
}

.hero-lead{
  margin:0;
  max-width:700px;
  font-size:20px;
  line-height:1.65;
  color:var(--muted);
}

.hero-points{
  margin-top:26px;
  display:grid;
  gap:12px;
}

.hero-point,
.trust-item{
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:16px;
  padding:14px 16px;
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px;
  margin:18px 0;
  box-shadow:var(--shadow);
  backdrop-filter:blur(10px);
}

.highlight-card{
  background:linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.06));
}

.card-form h2,
.result-hero h2,
.cta-card h2,
.card h2,
.card h3,
.card h4{
  margin:10px 0 10px;
}

.card-intro,
.section-intro,
.result-text,
.insight-card p,
.feature-card p,
.cta-card p{
  color:var(--muted);
  line-height:1.7;
}

.form label{
  display:block;
  font-weight:700;
  margin-bottom:10px;
}

.row{
  display:flex;
  gap:12px;
  align-items:center;
}

.row-main{
  align-items:stretch;
}

input{
  width:100%;
  min-height:54px;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.15);
  background:rgba(4,10,20,0.58);
  color:var(--text);
  font-size:16px;
}

input:focus{
  outline:none;
  border-color:rgba(124,198,255,.8);
  box-shadow:0 0 0 3px rgba(124,198,255,.14);
}

button,
.btn{
  min-height:54px;
  padding:14px 18px;
  border-radius:14px;
  border:0;
  font-weight:800;
  font-size:15px;
  letter-spacing:.01em;
}

button{
  background:linear-gradient(180deg, #8dd6ff, #60a5fa);
  color:#03101f;
  cursor:pointer;
  white-space:nowrap;
}

button:hover{filter:brightness(1.04);}

.mode-switch{
  display:grid;
  gap:10px;
  margin-top:16px;
}

.mode-option{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0;
  padding:13px 14px;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:14px;
  background:rgba(255,255,255,0.04);
  cursor:pointer;
}

.mode-option input{
  width:18px;
  min-height:auto;
  height:18px;
  margin:0;
  padding:0;
  accent-color:#60a5fa;
}

.crawl-settings{
  display:none;
  grid-template-columns:repeat(2, minmax(0, 180px));
  gap:12px;
  margin-top:16px;
}

.crawl-settings.is-visible{
  display:grid;
}

.field-inline label{
  margin-bottom:8px;
  font-size:14px;
}

.field-inline input{
  min-height:48px;
}

.hint{
  margin-top:14px;
  color:var(--muted);
  font-size:14px;
}

.trust-row,
.feature-grid,
.insight-grid{
  display:grid;
  gap:18px;
}

.trust-row{
  grid-template-columns:repeat(2, minmax(0,1fr));
  margin:6px 0 12px;
}

.trust-item strong{
  display:block;
  margin-bottom:6px;
}

.trust-item span{
  color:var(--muted);
  line-height:1.6;
}

.feature-grid{
  grid-template-columns:repeat(3, minmax(0,1fr));
}

.feature-card,
.insight-card{
  min-height:100%;
}

.feature-icon{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(96,165,250,.16);
  border:1px solid rgba(96,165,250,.35);
  font-weight:900;
}

.result-hero{
  background:linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.05));
}

.result-layout{
  margin-top:12px;
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:24px;
  align-items:center;
}

.result-meta{
  margin-top:18px;
  display:grid;
  gap:7px;
  color:var(--muted);
}

.heuristic-note{
  margin-top:10px;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  color:var(--text);
  line-height:1.6;
}

.speed-highlight{
  margin-top:10px;
  padding:16px 18px;
  border-radius:18px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
}

.speed-highlight-head{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.speed-highlight-title{
  font-size:18px;
  font-weight:800;
  color:var(--text);
}

.speed-highlight-score{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(96,165,250,.16);
  border:1px solid rgba(96,165,250,.28);
  color:#d9efff;
  font-weight:800;
  font-size:13px;
}

.speed-highlight p,
.speed-highlight-note{
  margin:10px 0 0;
  line-height:1.65;
}

.speed-highlight-note{
  color:var(--muted);
  font-size:14px;
}

.speed-ok{border-color:rgba(34,197,94,.28);}
.speed-warn{border-color:rgba(245,158,11,.28);}
.speed-fail{border-color:rgba(239,68,68,.28);}

.speed-detail-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}

.speed-table{
  margin-top:18px;
}

.speed-table .thead,
.speed-table .trow{
  grid-template-columns:180px 180px 1fr;
}

.speed-label{
  font-size:30px;
  text-transform:none;
}

.verdict-bad{
  border-color:rgba(239,68,68,.28);
}

.verdict-mid{
  border-color:rgba(245,158,11,.26);
}

.verdict-good{
  border-color:rgba(34,197,94,.26);
}

.score-panel{
  display:grid;
  gap:16px;
}

.score-ring-wrap{
  display:flex;
  justify-content:center;
}

.score-ring{
  --score:0;
  width:180px;
  height:180px;
  border-radius:50%;
  background:conic-gradient(var(--blue) calc(var(--score) * 1%), rgba(255,255,255,.08) 0);
  display:grid;
  place-items:center;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}

.score-ring-inner{
  width:136px;
  height:136px;
  border-radius:50%;
  background:#0a1424;
  border:1px solid rgba(255,255,255,.08);
  display:grid;
  place-items:center;
  text-align:center;
  padding:12px;
}

.score-ring-number{
  font-size:34px;
  font-weight:900;
}

.score-ring-label{
  font-size:13px;
  color:var(--muted);
}

.scorebar{
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  overflow:hidden;
}

.scorefill{
  height:100%;
  background:linear-gradient(90deg, #38bdf8, #60a5fa);
  border-radius:999px;
}

.summary{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.summary-pills{
  margin-top:22px;
}

.metric-grid,
.reason-grid{
  display:grid;
  gap:16px;
  margin-top:22px;
}

.metric-grid{
  grid-template-columns:repeat(4, minmax(0,1fr));
}

.metric-card,
.reason-card{
  padding:18px;
  border-radius:18px;
  background:rgba(255,255,255,0.045);
  border:1px solid rgba(255,255,255,0.08);
}

.metric-title{
  font-size:13px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#bfe3ff;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.metric-help{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.07);
  color:var(--text);
  font-size:11px;
  font-weight:900;
  cursor:help;
}

.metric-tooltip{
  position:absolute;
  left:50%;
  bottom:calc(100% + 10px);
  transform:translateX(-50%) translateY(6px);
  width:min(260px, 70vw);
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(8,14,26,0.96);
  color:var(--text);
  font-size:12px;
  font-weight:600;
  line-height:1.5;
  letter-spacing:normal;
  text-transform:none;
  box-shadow:0 16px 40px rgba(0,0,0,.26);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
  z-index:20;
}

.metric-help:hover .metric-tooltip,
.metric-help:focus .metric-tooltip,
.metric-help:focus-visible .metric-tooltip{
  opacity:1;
  visibility:visible;
  transform:translateX(-50%) translateY(0);
}

.metric-value{
  margin-top:10px;
  font-size:34px;
  font-weight:900;
}

.metric-card p,
.reason-card p{
  margin:10px 0 0;
  color:var(--muted);
  line-height:1.65;
}

.priority-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.1);
  font-size:13px;
  font-weight:800;
  color:var(--text);
}

.action-plan-card h3{
  margin-top:14px;
}

.reason-grid{
  grid-template-columns:repeat(2, minmax(0,1fr));
}

.bullet-list{
  margin:14px 0 0;
  padding-left:18px;
  color:var(--text);
}

.bullet-list li{
  margin:0 0 10px;
  line-height:1.6;
}

.pill,
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  font-weight:800;
  font-size:13px;
}

.pill.ok,.badge.ok{background:rgba(34,197,94,.14);border:1px solid rgba(34,197,94,.32);color:#92f2b1;}
.pill.warn,.badge.warn{background:rgba(245,158,11,.14);border:1px solid rgba(245,158,11,.32);color:#ffd487;}
.pill.fail,.badge.fail{background:rgba(239,68,68,.14);border:1px solid rgba(239,68,68,.32);color:#ffaaa3;}
.pill.info,.badge.info{background:rgba(96,165,250,.14);border:1px solid rgba(96,165,250,.32);color:#b9deff;}

.action-strip,
.export-row,
.cta-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--text);
  transition:transform .08s ease, background .18s ease, border-color .18s ease;
}

.btn:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.22);
  background:rgba(255,255,255,.1);
}

.btn-primary{
  background:linear-gradient(180deg, rgba(141,214,255,.24), rgba(96,165,250,.2));
  border-color:rgba(96,165,250,.34);
}

.btn-ghost{
  background:rgba(255,255,255,.03);
}

.table{
  margin-top:14px;
  border:1px solid rgba(255,255,255,0.1);
  border-radius:16px;
  overflow:hidden;
}

.thead,
.trow{
  display:grid;
  grid-template-columns:110px 220px 1fr;
  gap:14px;
  padding:14px 16px;
}

.thead > div,
.trow > div{
  min-width:0;
}

.thead{
  background:rgba(255,255,255,0.06);
  font-weight:800;
}

.trow{
  border-top:1px solid rgba(255,255,255,0.08);
}

.table.table4 .thead,
.table.table4 .trow{
  grid-template-columns:minmax(160px, 1.15fr) minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(180px, 1fr);
}

.table.table6 .thead,
.table.table6 .trow{
  grid-template-columns:minmax(220px, 1.4fr) minmax(130px, .8fr) minmax(150px, .95fr) minmax(160px, 1fr) minmax(170px, 1fr) minmax(180px, 1fr);
}

.label{font-weight:700;}
.details,
.why,
.muted{color:var(--muted); line-height:1.5;}

.details{
  overflow-wrap:anywhere;
  word-break:break-word;
}

.cta-card{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:22px;
  align-items:center;
  background:linear-gradient(180deg, rgba(96,165,250,.12), rgba(255,255,255,.06));
}

.cta-inline-form{
  margin:0;
}

.footer{
  margin-top:20px;
  color:var(--muted);
  text-align:center;
}

.loading{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(2,8,16,.62);
  backdrop-filter:blur(8px);
  z-index:9999;
}

.loading.hidden,
.hidden{display:none;}

.loading-card{
  width:min(520px, 100%);
  border-radius:18px;
  padding:20px 20px 18px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 18px 60px rgba(0,0,0,.45);
}

.loading-title{
  font-size:18px;
  font-weight:800;
  margin-top:12px;
}

.loading-sub{
  margin-top:6px;
  color:var(--muted);
  line-height:1.6;
  font-size:14px;
}

.spinner{
  width:34px;
  height:34px;
  border-radius:999px;
  border:3px solid rgba(229,231,235,.25);
  border-top-color:rgba(229,231,235,.9);
  animation:spin .9s linear infinite;
}

@keyframes spin{to{transform:rotate(360deg);}}

.metric-grid-public{
  grid-template-columns:repeat(3, minmax(0,1fr));
}

.gate-card{
  background:linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
}

.gate-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:22px;
  align-items:center;
}

.gate-form{
  margin:0;
}

.locked-panel{
  margin-top:20px;
  display:flex;
  gap:16px;
  align-items:center;
  padding:16px 18px;
  border-radius:18px;
  background:rgba(4,10,20,0.42);
  border:1px solid rgba(255,255,255,0.08);
}

.locked-line{
  width:48px;
  height:48px;
  border-radius:16px;
  background:linear-gradient(180deg, rgba(124,198,255,.22), rgba(124,198,255,.08));
  border:1px solid rgba(124,198,255,.22);
  flex:0 0 auto;
}

.locked-copy{
  display:grid;
  gap:6px;
}

.locked-copy span{
  color:var(--muted);
  line-height:1.6;
}

.teaser-reasons{
  margin-top:22px;
}

.inline-message{
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  font-size:15px;
  line-height:1.6;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.05);
}

.notice-banner{
  margin:0 0 18px;
  padding:18px 20px;
  font-size:18px;
  font-weight:800;
  line-height:1.5;
  box-shadow:0 16px 40px rgba(0,0,0,.18);
}

.inline-message-success{
  color:#dfffe9;
  border-color:rgba(34,197,94,.28);
  background:rgba(34,197,94,.12);
}

.inline-message-error{
  color:#ffe3df;
  border-color:rgba(239,68,68,.28);
  background:rgba(239,68,68,.12);
}

@media (max-width: 980px){
  .hero-grid,
  .result-layout,
  .cta-card,
  .trust-row,
  .feature-grid,
  .insight-grid,
  .metric-grid,
  .metric-grid-public,
  .reason-grid,
  .speed-detail-grid,
  .gate-grid{
    grid-template-columns:1fr;
  }

  .table.table4 .thead,
  .table.table4 .trow,
  .speed-table .thead,
  .speed-table .trow,
  .thead,
  .trow{
    grid-template-columns:1fr;
  }

  .thead{display:none;}

  .trow > div::before{
    content:'';
  }
}

@media (max-width: 720px){
  .wrap{padding:22px 14px 40px;}
  .hero h1{font-size:42px;}
  .hero-lead{font-size:18px;}
  .row-main{flex-direction:column;}
  button,
  .btn{width:100%;}
  .crawl-settings{grid-template-columns:1fr;}
  .score-ring{width:160px;height:160px;}
  .score-ring-inner{width:122px;height:122px;}

  .admin-view .ambient,
  .admin-view .hero-points,
  .admin-view .trust-row{
    display:none;
  }

  .admin-view .hero{
    padding:8px 0 0;
  }

  .admin-view .hero-grid{
    gap:14px;
  }

  .admin-view .card-form{
    margin-top:0;
  }

  .teaser-view .hero-points{
    display:none;
  }

  .teaser-view .hero{
    padding:8px 0 0;
  }

  .teaser-view .hero-grid{
    gap:14px;
  }

  .teaser-view .card-form{
    margin-top:0;
  }
}
