/* pwnsy Tools — shared base + cross-site nav. Light theme (matches news/data/blog
   and the prompt20 tools style). The .site-nav bar is the canonical cross-site nav. */
*,*::before,*::after { box-sizing: border-box; }
:root {
  --bg1: #fafbfc; --bg2: #f2f5f7; --surface: #ffffff; --surface-2: #f7f9fa;
  --text: #0f172a; --muted: #5b6675; --dim: #94a3b8;
  --border: #e6eaef; --border-2: #d5dce4;
  --accent: #059669; --accent-2: #10b981; --tone: 5,150,105;
  --kev: #dc2626; --ransom: #e11d48; --info: #0284c7;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html, body { margin: 0; padding: 0; }
body {
  color: var(--text); font-family: var(--mono); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; min-height: 100dvh; overflow-x: clip;
  background:
    radial-gradient(1000px 560px at 12% -8%, rgba(5,150,105,0.06), transparent 60%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
}
a { color: inherit; }

/* Brand strip — canonical, keep identical across news/data/blog/tools. Sits above
   .site-nav at the same 40px height, so the lockup reads big while the header
   gains no extra height. */
.site-brand { position: sticky; top: 0; z-index: 101; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-brand-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: center; height: 40px; }
.site-brand-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: opacity .15s ease; }
.site-brand-link:hover { opacity: .85; }
.site-brand-mark { width: 30px; height: 30px; display: block; flex-shrink: 0; }
.site-brand-text { font-family: var(--display); font-size: 22px; font-weight: 700; color: #0f172a; letter-spacing: -0.5px; line-height: 1; }
@media (max-width: 640px) {
  .site-brand-inner { padding: 0 12px; }
  .site-brand-mark { width: 26px; height: 26px; }
  .site-brand-text { font-size: 19px; }
}

/* Canonical cross-site nav — keep identical across news/data/blog/tools */
.site-nav { position: sticky; top: 40px; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; }
.site-nav-link { font-family: var(--mono); font-size: 12px; font-weight: 600; color: #64748b; text-decoration: none; padding: 6px 10px; border-radius: 6px; transition: all .15s; white-space: nowrap; letter-spacing: .01em; }
.site-nav-link:hover { color: #0f172a; background: #eef2f5; }
.site-nav-link.active { color: var(--accent); font-weight: 700; }
.site-nav-dot { color: #94a3b8; opacity: .5; font-size: 11px; line-height: 1; user-select: none; }
@media (max-width: 640px) {
  .site-nav-inner { padding: 0 12px; gap: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .site-nav-inner::-webkit-scrollbar { display: none; }
  .site-nav-link { font-size: 11px; padding: 8px 8px; min-height: 40px; display: flex; align-items: center; flex-shrink: 0; }
}

.wrap { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 26px 16px 72px; }
.hero { text-align: center; margin: 4px 0 20px; }
.hero .kicker { display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); }
.hero h1 { margin: 8px 0 6px; font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; font-size: clamp(1.7rem, 5.5vw, 2.5rem); line-height: 1.04; color: #0b1220; }
.hero h1 .a { color: var(--accent); }
.hero p { margin: 4px auto 0; color: var(--muted); font-size: 13px; max-width: 560px; }
.hero .live { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); border: 1px solid rgba(5,150,105,0.3); border-radius: 999px; padding: 3px 11px; margin-top: 12px; }
.hero .live .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.16); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 1px 2px rgba(15,23,42,0.04); }
.controls { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin: 0 0 14px; }
label.fld { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
input[type=text], select { font-family: var(--mono); font-size: 13px; color: var(--text); background: #fff; border: 1px solid var(--border-2); border-radius: 10px; padding: 9px 12px; outline: none; }
input[type=text]:focus, select:focus { border-color: var(--accent); }
button.go { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--accent); border: none; border-radius: 10px; padding: 10px 16px; cursor: pointer; transition: filter .15s, transform .1s; }
button.go:hover { filter: brightness(1.06); }
button.go:active { transform: translateY(1px); }
.chip { font-family: var(--mono); font-size: 12px; color: var(--text); background: #fff; border: 1px solid var(--border-2); border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: all .15s; user-select: none; }
.chip.on { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th { position: sticky; top: 82px; background: var(--surface); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; padding: 9px 10px; border-bottom: 1px solid var(--border-2); white-space: nowrap; }
tbody td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
tbody tr:hover td { background: rgba(5,150,105,0.03); }
.cve { font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.cve:hover { text-decoration: underline; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Mobile: collapse dense tables into prompt20-style cards — a left accent bar,
   a prominent title head, then stacked label/value rows. */
@media (max-width: 640px) {
  table { font-size: 14px; display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody { display: block; }
  tbody tr {
    display: block; position: relative; background: var(--surface);
    border: 1px solid var(--border); border-left: 3px solid var(--accent);
    border-radius: 12px; padding: 13px 15px; margin-bottom: 12px;
    box-shadow: 0 6px 18px -14px rgba(15,23,42,0.35);
  }
  tbody tr:hover td { background: transparent; }
  tbody td {
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
    padding: 6px 0; border: none; border-bottom: 1px solid var(--border); text-align: right;
  }
  tbody td:last-child { border-bottom: none; padding-bottom: 0; }
  tbody td::before {
    content: attr(data-label); color: var(--muted); font-size: 9.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .12em; text-align: left; flex: 0 0 auto; align-self: center;
  }
  /* The title cell (CVE / vendor) spans the top of the card, no label. */
  tbody td.cardhead {
    display: block; text-align: left; padding: 0 0 10px; margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  tbody td.cardhead::before { content: none; }
  tbody td.cardhead .cve { font-size: 16px; }
  tbody td.hide-m { display: none; }
  tbody td.num { text-align: right; }
}

.tag { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.tag-kev { color: var(--kev); background: #fef2f2; border: 1px solid #fecaca; }
.tag-ransom { color: #fff; background: var(--ransom); border: 1px solid var(--ransom); }
.tag-crit { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }
.tag-high { color: #c2410c; background: #fff7ed; border: 1px solid #fed7aa; }
.tag-med { color: #a16207; background: #fefce8; border: 1px solid #fde68a; }
.tag-low { color: var(--muted); background: #f3f5f7; border: 1px solid var(--border); }

.bar { position: relative; height: 26px; background: #eef2f5; border-radius: 7px; overflow: hidden; border: 1px solid var(--border); }
.bar > span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 7px 0 0 7px; }
.bar.spike > span { background: linear-gradient(90deg, #f43f5e, var(--ransom)); }
.bar > b { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.state { text-align: center; color: var(--muted); padding: 44px 20px; border: 1px dashed var(--border-2); border-radius: 14px; }
.spin { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--border-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { color: #b91c1c; }

.meta { font-size: 11px; color: var(--dim); margin-top: 10px; }

footer { text-align: center; color: var(--dim); font-size: 11.5px; margin-top: 34px; }
footer a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--border-2); }
footer a:hover { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }


/* ==========================================================================
   CANONICAL SITE HEADER
   Byte-identical across every property and framework. Do not edit in one repo
   only — change it here and re-apply everywhere, or the headers drift again.
   Per-brand differences are limited to: the mark artwork, the wordmark text,
   and --site-accent. Appended last so it beats earlier per-site rules.
   ========================================================================== */
:root {
  --site-accent: #10b981;
  --site-header-bg: #ffffff;
  --site-header-border: #e2e8f0;
  --site-header-text: #0f172a;
  --site-header-link: #64748b;
  --site-header-link-hover: #0f172a;
  --site-header-link-hover-bg: #f1f5f9;
}

/* The strip and the nav pin as one block: no offsets to keep in sync, and no
   seam for page content to show through on scroll. */
.site-header { position: sticky; top: 0; z-index: 101; background: var(--site-header-bg); }
/* No wrapper (the static tool pages): each bar pins itself, strip then nav. */
.site-brand { position: sticky; top: 0; z-index: 101; }
.site-nav { position: sticky; top: 41px; z-index: 100; }
/* With a wrapper, the wrapper does the pinning and the bars sit still. */
.site-header .site-brand, .site-header .site-nav { position: static; z-index: auto; }

.site-brand {
  display: block; margin: 0; padding: 0;
  background: var(--site-header-bg);
  border-bottom: 1px solid var(--site-header-border);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.site-brand-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: center;
  height: 40px;
}
.site-brand-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: opacity .15s ease; }
.site-brand-link:hover { opacity: .85; }
.site-brand-mark { width: 30px; height: 30px; display: block; flex-shrink: 0; }
.site-brand-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -0.5px;
  color: var(--site-header-text);
}
.site-brand-text span { color: var(--site-accent); }

/* Two markup shapes exist in the wild: links directly inside .site-nav, and
   links inside a .site-nav-inner wrapper. Both must render identically. */
.site-nav {
  margin: 0; padding: 0; gap: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--site-header-bg);
  border-bottom: 1px solid var(--site-header-border);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.site-nav > .site-nav-link, .site-nav > .site-nav-dot { margin: 0 4px; }
.site-nav-inner {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px;
}
.site-nav:not(:has(.site-nav-inner)) { height: 40px; padding: 0 24px; }
.site-nav-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .01em;
  color: var(--site-header-link); text-decoration: none;
  padding: 6px 10px; border-radius: 4px; white-space: nowrap;
  transition: color .15s, background .15s;
  text-transform: none;
}
.site-nav-link:hover { color: var(--site-header-link-hover); background: var(--site-header-link-hover-bg); }
.site-nav-link.active { color: var(--site-accent); font-weight: 700; }
.site-nav-dot { color: #94a3b8; opacity: .45; font-size: 11px; line-height: 1; user-select: none; pointer-events: none; }

@media (max-width: 640px) {
  .site-brand-inner { padding: 0 12px; height: 40px; }
  .site-brand-mark { width: 26px; height: 26px; }
  .site-brand-text { font-size: 19px; }
  .site-nav-inner, .site-nav:not(:has(.site-nav-inner)) {
    padding: 0 12px; gap: 0; height: 40px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .site-nav-inner::-webkit-scrollbar, .site-nav::-webkit-scrollbar { display: none; }
  .site-nav-link { font-size: 11px; padding: 8px; min-height: 40px; display: flex; align-items: center; flex-shrink: 0; }
}
