:root {
  --bg: #0e0d0b;
  --elev: #161512;
  --elev-2: #1f1d18;
  --line: rgba(244, 240, 230, 0.12);
  --line-strong: rgba(244, 240, 230, 0.22);
  --ink: #f4f0e6;
  --muted: #a69f92;
  --emerald: #19c39f;
  --emerald-dark: #119e80;
  --warn: #f0b44c;
  --fail: #ef5b5b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(900px 420px at 50% -80px, rgba(25, 195, 159, 0.14), transparent 70%), var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Manrope", -apple-system, sans-serif; letter-spacing: -0.03em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

.hdr {
  position: sticky; top: 0; z-index: 40;
  background: rgba(14, 13, 11, 0.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr-in { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt strong { font-family: "Manrope", sans-serif; font-size: 17px; font-weight: 800; }
.brand-txt small { font-size: 11px; color: var(--muted); }
.hdr-acts { display: flex; align-items: center; gap: 12px; }
.hdr-link { color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.hdr-link:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-family: "Manrope", sans-serif;
  font-size: 13.5px; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: all 0.16s ease;
}
.btn-emerald { background: var(--emerald); color: #0b1613; }
.btn-emerald:hover { background: #2bd8b3; transform: translateY(-1px); }
.btn-emerald:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-ghost { background: rgba(244, 240, 230, 0.06); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: rgba(244, 240, 230, 0.12); }

.hero { padding: 68px 0 44px; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 15px; border-radius: 999px;
  background: var(--elev); border: 1px solid var(--line-strong);
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--emerald); margin-bottom: 20px;
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); display: inline-block; box-shadow: 0 0 10px var(--emerald); }
.hero h1 { margin: 0 auto 16px; max-width: 820px; font-size: clamp(34px, 5.4vw, 60px); line-height: 1.05; }
.hero h1 em { font-style: normal; color: var(--emerald); }
.hero-lead { margin: 0 auto 30px; max-width: 640px; color: var(--muted); font-size: 16px; }

.mode-tabs {
  display: inline-flex; gap: 6px; padding: 5px; margin-bottom: 22px;
  background: var(--elev); border: 1px solid var(--line-strong); border-radius: 999px;
}
.m-tab {
  border: 0; background: transparent; color: var(--muted);
  font-family: "Manrope", sans-serif; font-size: 13px; font-weight: 700;
  padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: all 0.15s;
}
.m-tab.is-on { background: var(--emerald); color: #0b1613; }
.mode-panel { display: none; }
.mode-panel.is-on { display: block; }

.mob-auditor { max-width: 760px; margin: 0 auto; text-align: left; }
.mob-drop {
  background: var(--elev); border: 1px solid var(--line-strong); border-radius: 20px;
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.mob-drop-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mob-drop textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  background: #0a0a08; color: #d6efe9; font-family: "JetBrains Mono", monospace;
  font-size: 12px; line-height: 1.5; resize: vertical; outline: none;
}
.mob-drop textarea:focus { border-color: var(--emerald); }

.scan-form {
  max-width: 680px; margin: 0 auto 16px;
  display: flex; gap: 10px; padding: 7px;
  background: var(--elev); border: 1px solid var(--line-strong); border-radius: 999px;
}
.scan-form input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font-family: "JetBrains Mono", monospace; font-size: 14px; padding: 10px 16px; outline: none;
}
.scan-form input::placeholder { color: #756f64; }

.quick-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted);
}
.q-chip {
  background: var(--elev); border: 1px solid var(--line); color: var(--ink);
  font-family: "JetBrains Mono", monospace; font-size: 11.5px; padding: 5px 12px;
  border-radius: 999px; cursor: pointer; transition: border-color 0.15s;
}
.q-chip:hover { border-color: var(--emerald); color: var(--emerald); }

.status-msg {
  max-width: 680px; margin: 18px auto 0; padding: 12px 16px; border-radius: 14px;
  background: var(--elev-2); border: 1px solid var(--line-strong);
  font-size: 13.5px; color: var(--ink);
}
.status-msg.is-error { border-color: rgba(239, 91, 91, 0.5); color: #ffb5b5; }

.results-sec { padding: 10px 22px 56px; }
.score-banner {
  background: var(--elev); border: 1px solid var(--line-strong); border-radius: 22px;
  padding: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
  margin-bottom: 22px;
}
.grade-ring {
  width: 96px; height: 96px; border-radius: 22px; flex-shrink: 0;
  background: rgba(25, 195, 159, 0.12); border: 2px solid var(--emerald);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.grade-ring.is-warn { background: rgba(240, 180, 76, 0.12); border-color: var(--warn); }
.grade-ring.is-fail { background: rgba(239, 91, 91, 0.12); border-color: var(--fail); }
.grade-ring strong { font-family: "Manrope", sans-serif; font-size: 36px; line-height: 1; }
.grade-ring span { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); margin-top: 4px; }

.score-info { flex: 1; min-width: 220px; }
.mono-k { display: block; font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--emerald); margin-bottom: 4px; }
.score-info h2 { margin: 0 0 10px; font-size: 26px; word-break: break-word; }
.meta-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-pills span {
  font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--muted);
  background: var(--elev-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px;
}
.score-acts { display: flex; flex-wrap: wrap; gap: 10px; }

.checks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chk-card {
  background: var(--elev); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.chk-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.chk-group { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.chk-card h3 { margin: 2px 0 0; font-size: 16px; }
.chk-badge {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.chk-badge.pass { background: rgba(25, 195, 159, 0.16); color: var(--emerald); }
.chk-badge.warn { background: rgba(240, 180, 76, 0.16); color: var(--warn); }
.chk-badge.fail { background: rgba(239, 91, 91, 0.16); color: var(--fail); }
.chk-val { font-family: "JetBrains Mono", monospace; font-size: 12px; color: #d8d2c6; word-break: break-word; }
.chk-fix { font-size: 13px; color: var(--muted); margin: 0; padding-top: 6px; border-top: 1px solid var(--line); }
.chk-card.is-locked {
  position: relative; overflow: hidden;
  border-style: dashed; border-color: rgba(239, 91, 91, 0.32);
  background: linear-gradient(160deg, var(--elev) 0%, #12110e 100%);
}
.chk-card.is-locked h3,
.chk-card.is-locked .chk-val { filter: blur(5px); user-select: none; pointer-events: none; opacity: 0.7; }
.chk-lock-cta {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  font-family: "Manrope", sans-serif; font-size: 12.5px; font-weight: 700;
  color: var(--emerald); text-decoration: none;
}
.chk-lock-cta:hover { text-decoration: underline; }

.patch-box {
  margin-top: 22px; background: var(--elev); border: 1px solid var(--line-strong); border-radius: 20px; overflow: hidden;
}
.patch-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px;
  padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--elev-2);
}
.patch-head h3 { margin: 2px 0 0; font-size: 17px; }
.patch-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p-tab {
  background: transparent; border: 1px solid var(--line-strong); color: var(--muted);
  font-family: "JetBrains Mono", monospace; font-size: 11.5px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.p-tab.is-on { background: var(--emerald); border-color: var(--emerald); color: #0b1613; }
.patch-stage { position: relative; }
.patch-pre {
  margin: 0; padding: 18px 22px; overflow-x: auto; background: #0a0a08;
  font-family: "JetBrains Mono", monospace; font-size: 12px; line-height: 1.55; color: #d6efe9;
}
.patch-pre.is-blurred { filter: blur(4px); user-select: none; pointer-events: none; min-height: 170px; opacity: 0.45; }
.patch-lock {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; gap: 12px; background: rgba(10, 10, 8, 0.72); backdrop-filter: blur(4px);
}
.patch-lock[hidden] { display: none; }
.lock-badge {
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--warn); background: rgba(240, 180, 76, 0.14); border: 1px solid rgba(240, 180, 76, 0.38);
  padding: 5px 12px; border-radius: 999px;
}
.patch-lock p { margin: 0; max-width: 520px; font-size: 13.5px; color: #ddd7cb; }

.masvs-sec { padding: 18px 22px 44px; }
.masvs-head { max-width: 720px; margin-bottom: 24px; }
.masvs-head h2 { margin: 4px 0 8px; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.12; }
.masvs-head p { margin: 0; color: var(--muted); font-size: 15px; }
.masvs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.masvs-card {
  background: var(--elev); border: 1px solid var(--line); border-radius: 18px; padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.masvs-card h3 { margin: 2px 0 4px; font-size: 17px; line-height: 1.25; }
.masvs-card p { margin: 0; font-size: 13.5px; color: var(--muted); }
.masvs-card strong { color: var(--ink); }
.masvs-fix { padding-top: 8px; border-top: 1px solid var(--line); color: #cbeee6 !important; }
@media (max-width: 920px) { .masvs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .masvs-grid { grid-template-columns: minmax(0, 1fr); } }

.admin-logs-sec { padding: 8px 22px 36px; }
.logs-box {
  background: var(--elev); border: 1px solid var(--line-strong); border-radius: 22px; overflow: hidden;
}
.logs-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px;
  padding: 20px 24px; border-bottom: 1px solid var(--line); background: var(--elev-2);
}
.logs-head h2 { margin: 2px 0 0; font-size: 20px; }
.logs-acts { display: flex; align-items: center; gap: 10px; }
.logs-mode-pill {
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px;
}
.logs-table-wrap { overflow-x: auto; }
.logs-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.logs-table th {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.logs-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); white-space: nowrap;
}
.logs-table tr:last-child td { border-bottom: 0; }
.logs-domain-btn {
  background: transparent; border: 0; padding: 0; color: var(--emerald);
  font-family: "JetBrains Mono", monospace; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.logs-domain-btn:hover { text-decoration: underline; }
.logs-empty { text-align: center; color: var(--muted); padding: 26px !important; }

.bot-sec { padding: 28px 22px 72px; }
.bot-card {
  background: var(--elev); border: 1px solid var(--line-strong); border-radius: 24px; padding: 34px;
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 30px; align-items: center;
}
.bot-card h2 { margin: 4px 0 12px; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
.bot-card p { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }
.bot-list { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.bot-list li::before { content: "✓ "; color: var(--emerald); font-weight: 800; }

.code-box {
  background: #0a0a08; border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden;
}
.code-bar {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 14px;
  background: var(--elev-2); border-bottom: 1px solid var(--line);
  font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--muted);
}
.copy-code-btn {
  background: transparent; border: 1px solid var(--line-strong); color: var(--ink);
  font-family: "Manrope", sans-serif; font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 8px; cursor: pointer;
}
.copy-code-btn:hover { border-color: var(--emerald); color: var(--emerald); }
.code-box pre {
  margin: 0; padding: 16px; overflow-x: auto; font-family: "JetBrains Mono", monospace;
  font-size: 12px; line-height: 1.55; color: #d6efe9;
}

.ftr { border-top: 1px solid var(--line); padding: 26px 0; font-size: 13px; color: var(--muted); }
.ftr-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.ftr a { color: var(--ink); text-decoration: none; }

.btn-admin-on { background: rgba(25, 195, 159, 0.16); border-color: var(--emerald); color: var(--emerald); }

.adm-modal[hidden] { display: none; }
.adm-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px; }
.adm-bg { position: absolute; inset: 0; background: rgba(8, 8, 6, 0.82); backdrop-filter: blur(8px); }
.adm-card {
  position: relative; z-index: 2; width: min(440px, 100%);
  background: var(--elev); border: 1px solid var(--line-strong); border-radius: 22px; padding: 26px;
}
.adm-card h3 { margin: 4px 0 8px; font-size: 20px; }
.adm-card p { margin: 0 0 16px; font-size: 13.5px; color: var(--muted); }
.adm-card input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: #0a0a08; color: var(--ink); font-family: "JetBrains Mono", monospace; font-size: 13px;
  outline: none; margin-bottom: 12px;
}
.adm-card input:focus { border-color: var(--emerald); }
.adm-err { font-size: 12.5px; color: var(--fail); margin-bottom: 12px; }
.adm-acts { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 820px) {
  .checks-grid, .bot-card { grid-template-columns: minmax(0, 1fr); }
  .bot-card { padding: 24px 18px; }
  .hdr-link, .hdr-bot-link { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 44px 0 32px; }
  .mode-tabs {
  display: inline-flex; gap: 6px; padding: 5px; margin-bottom: 22px;
  background: var(--elev); border: 1px solid var(--line-strong); border-radius: 999px;
}
.m-tab {
  border: 0; background: transparent; color: var(--muted);
  font-family: "Manrope", sans-serif; font-size: 13px; font-weight: 700;
  padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: all 0.15s;
}
.m-tab.is-on { background: var(--emerald); color: #0b1613; }
.mode-panel { display: none; }
.mode-panel.is-on { display: block; }

.mob-auditor { max-width: 760px; margin: 0 auto; text-align: left; }
.mob-drop {
  background: var(--elev); border: 1px solid var(--line-strong); border-radius: 20px;
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.mob-drop-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mob-drop textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  background: #0a0a08; color: #d6efe9; font-family: "JetBrains Mono", monospace;
  font-size: 12px; line-height: 1.5; resize: vertical; outline: none;
}
.mob-drop textarea:focus { border-color: var(--emerald); }

.scan-form { flex-direction: column; border-radius: 18px; padding: 10px; }
  .scan-form .btn { width: 100%; }
  .score-banner { padding: 20px 18px; }
  .score-acts { width: 100%; flex-direction: column; }
  .score-acts .btn { width: 100%; }
}
