:root {
  --bg: #fff;
  --fg: #000;
  --gray: #6b6b6b;
  --line: #e4e4e4;
  --soft: #f4f4f4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

header {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  letter-spacing: -0.02em;
}

header button {
  background: none;
  border: none;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 4px;
}

main {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

h1 {
  font-size: 40px;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 12px;
}

.sub {
  color: var(--gray);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 44ch;
}

#run {
  width: 100%;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  padding: 15px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

#run:hover { opacity: 0.85; }
#run:active { transform: scale(0.99); }
#run:disabled { opacity: 0.4; cursor: wait; }

/* verdict */
#verdict {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  animation: fade 0.4s ease both;
}

#verdictLabel {
  display: inline-block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 1.5px solid #000;
  padding: 6px 14px;
  border-radius: 999px;
}

#verdict.protected #verdictLabel { background: #000; color: #fff; }
#verdict.vulnerable #verdictLabel { background: #fff; color: #000; border-style: dashed; }
#verdict.unprotected #verdictLabel { background: #fff; color: #000; }

#verdictScore {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}

#verdictScore small {
  font-size: 20px;
  font-weight: 400;
  color: var(--gray);
}

#verdictReason {
  color: var(--gray);
  font-size: 15px;
  line-height: 1.5;
  margin: 8px 0 0;
}

/* rows */
#tests {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

#tests li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  animation: fade 0.35s ease both;
}

.k {
  font-size: 14px;
  color: var(--gray);
  flex-shrink: 0;
}

.v {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  text-align: right;
  word-break: break-all;
}

/* skeleton */
.loading {
  color: transparent !important;
  background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
  border-radius: 4px;
  min-width: 120px;
  min-height: 1em;
  user-select: none;
}

@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* why */
#why {
  margin-top: 28px;
  background: var(--soft);
  border-radius: 12px;
  padding: 18px 20px;
  animation: fade 0.4s ease both;
}

#why h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin: 0 0 10px;
  font-weight: 700;
}

#whyList {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.6;
}

#whyList li { padding: 2px 0; }

.hint {
  margin-top: 20px;
  font-size: 13px;
  color: var(--gray);
}

footer {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px 40px;
  font-size: 13px;
  color: var(--gray);
}

@media (max-width: 480px) {
  h1 { font-size: 34px; }
}
