:root {
  --navy: #0E1530;
  --navy-2: #172146;
  --blue: #4054B2;
  --blue-soft: #e9ecfb;
  --magenta: #D41961;
  --ink: #1b2340;
  --muted: #5f6782;
  --line: #e3e6f0;
  --bg: #f5f6fb;
  --card: #ffffff;
  --ok: #138a52;   --ok-bg: #e8f7ef;
  --warn: #b26a00; --warn-bg: #fff4e0;
  --bad: #c1122f;  --bad-bg: #fdebee;
  --info: #4054B2; --info-bg: #eef0fb;
  --gray: #5f6782; --gray-bg: #f0f1f6;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(14, 21, 48, .08), 0 2px 6px rgba(14, 21, 48, .05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.topbar { background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--magenta)); font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.topbar-cta {
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 500;
  border: 1px solid rgba(255,255,255,.25); padding: 8px 16px; border-radius: 999px; transition: background .2s;
}
.topbar-cta:hover { background: rgba(255,255,255,.08); }

/* Hero */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(212,25,97,.28), transparent 60%),
    radial-gradient(700px 400px at 0% 0%, rgba(64,84,178,.45), transparent 60%),
    var(--navy);
  color: #fff;
  padding: 56px 0 120px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  padding: 6px 14px; border-radius: 999px; color: #ffd6e5;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 0 0 rgba(212,25,97,.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(212,25,97,0); } 100% { box-shadow: 0 0 0 0 rgba(212,25,97,0); } }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 700; margin: 20px 0 14px; max-width: 820px; }
.hl { background: linear-gradient(90deg, #ff7aac, #a9b6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: #c8cde3; max-width: 680px; font-size: 16px; margin: 0 0 28px; }

/* Tabs */
.tabs {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px; padding: 5px; min-width: min(460px, 100%);
}
.tab {
  position: relative; z-index: 1; appearance: none; border: 0; background: transparent; color: #c8cde3;
  font: inherit; font-weight: 600; font-size: 15px; padding: 12px 18px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: color .25s;
}
.tab.is-active { color: var(--navy); }
.tab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tab-ico { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 700; opacity: .8; }
.tab-slider {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px);
  background: #fff; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: transform .3s cubic-bezier(.4,.1,.2,1);
}
.tabs[data-active="java"] .tab-slider { transform: translateX(100%); }

.advisory { margin-top: 22px; max-width: 760px; }
.adv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff;
}
.chip-crit { background: var(--magenta); border-color: var(--magenta); }
.adv-summary { color: #c8cde3; margin: 0; font-size: 14.5px; }

/* Main */
.main { margin-top: -78px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 56px; }
.result { grid-template-columns: minmax(0, 1fr); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }

.checker .field-label { display: block; font-weight: 600; margin-bottom: 10px; }
.field-labels { display: flex; gap: 12px; }
.field-labels .field-label:first-child { flex: 1; }
.field-label-2 { width: 250px; flex: none; margin-right: calc(12px + 196px); }
.field-label em { font-style: normal; font-weight: 400; color: var(--muted); }
.field-row { display: flex; gap: 12px; }
.select-wrap { position: relative; width: 250px; flex: none; }
.select-wrap select {
  appearance: none; -webkit-appearance: none; width: 100%; height: 56px; padding: 0 40px 0 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fbfbfe; color: var(--ink);
  font: inherit; font-size: 15px; cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.select-wrap select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(64,84,178,.14); background: #fff; }
.select-wrap select.has-value { border-color: var(--blue); background: var(--blue-soft); font-weight: 500; }
.select-wrap svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
#submitBtn { width: 196px; }
.input-wrap { position: relative; flex: 1; }
.input-wrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.input-wrap input {
  width: 100%; height: 56px; padding: 0 16px 0 46px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fbfbfe; transition: border-color .2s, box-shadow .2s;
}
.input-wrap input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(64,84,178,.14); background: #fff; }
.input-wrap input[aria-invalid="true"] { border-color: var(--bad); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 28px; border-radius: 12px; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 15.5px; text-decoration: none; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(64,84,178,.3); }
.btn-primary:hover { background: #3546a0; }
.btn-accent { background: var(--magenta); color: #fff; box-shadow: 0 8px 20px rgba(212,25,97,.35); }
.btn-accent:hover { background: #b9124f; }
.btn-ghost { background: var(--blue-soft); color: var(--blue); height: 42px; padding: 0 16px; font-size: 14px; }
.btn-ghost:hover { background: #dde2f8; }
.btn[disabled] { opacity: .75; cursor: progress; }
.spinner { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.captcha-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.fine { color: var(--muted); font-size: 13px; margin: 0; flex: 1; min-width: 220px; }
.dev-note { margin: 0; font-size: 12.5px; color: var(--warn); background: var(--warn-bg); padding: 6px 10px; border-radius: 8px; }
.form-error { margin: 14px 0 0; color: var(--bad); background: var(--bad-bg); padding: 12px 14px; border-radius: 10px; font-size: 14px; }

/* Result */
.result { display: grid; gap: 24px; animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.verdict { border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; background: #fff; }
.verdict-head { display: flex; gap: 18px; align-items: flex-start; padding: 26px 28px; }
.verdict-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.verdict-icon svg { width: 28px; height: 28px; }
.verdict-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.verdict h2 { font-size: clamp(19px, 2.4vw, 24px); }
.verdict-msg { margin: 10px 0 0; color: var(--ink); }
.verdict.safe { border-top: 5px solid var(--ok); } .verdict.safe .verdict-icon { background: var(--ok-bg); color: var(--ok); } .verdict.safe .verdict-kicker { color: var(--ok); }
.verdict.vulnerable { border-top: 5px solid var(--bad); } .verdict.vulnerable .verdict-icon { background: var(--bad-bg); color: var(--bad); } .verdict.vulnerable .verdict-kicker { color: var(--bad); }
.verdict.verify { border-top: 5px solid var(--warn); } .verdict.verify .verdict-icon { background: var(--warn-bg); color: var(--warn); } .verdict.verify .verdict-kicker { color: var(--warn); }
.verdict.need { border-top: 5px solid var(--blue); } .verdict.need .verdict-icon { background: var(--blue-soft); color: var(--blue); } .verdict.need .verdict-kicker { color: var(--blue); }
.select-wrap select[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(193,18,47,.12); }
.verdict.unknown { border-top: 5px solid var(--gray); } .verdict.unknown .verdict-icon { background: var(--gray-bg); color: var(--gray); } .verdict.unknown .verdict-kicker { color: var(--gray); }

.reco {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin: 0 28px 24px; padding: 18px 20px; border-radius: 12px; background: var(--blue-soft);
}
.reco small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.reco strong { font-size: 18px; color: var(--navy); }
.reco-arrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ver-pill { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; padding: 6px 12px; border-radius: 8px; font-size: 15px; }
.ver-pill.bad { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.ver-pill.good { background: var(--ok-bg); color: var(--ok); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-top: 1px solid var(--line); }
.fact { padding: 16px 28px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; }
.fact small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.fact span { display: block; font-weight: 600; overflow-wrap: anywhere; }

.cross-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 28px 24px; padding: 14px 18px; border: 1.5px dashed var(--blue); border-radius: 12px; color: var(--navy); font-weight: 500;
}

/* Business owner guide */
.owner-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.questions { margin: 0; padding: 0; list-style: none; counter-reset: q; display: grid; gap: 10px; }
.questions li { counter-increment: q; display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.questions li::before {
  content: counter(q); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 700; margin-top: 1px;
}
.who { border-radius: 12px; padding: 16px 18px; background: var(--info-bg); }
.who small { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.who strong { display: block; margin: 4px 0 6px; color: var(--navy); }
.who p { margin: 0; font-size: 14px; }
.who.vps { background: var(--warn-bg); }
@media (max-width: 760px) { .owner-grid { grid-template-columns: 1fr; } }

/* Manual version check */
.manual { border: 2px solid var(--blue-soft); }
.manual-row { display: flex; gap: 12px; flex-wrap: wrap; }
.manual-row input {
  flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #fbfbfe; color: var(--ink);
}
.manual-row input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(64,84,178,.14); background: #fff; }
.manual-row .btn { height: 48px; }
.manual-out { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; font-weight: 500; font-size: 14.5px; }
.manual-out.ok { background: var(--ok-bg); color: var(--ok); }
.manual-out.bad { background: var(--bad-bg); color: var(--bad); }
.manual-out.warn { background: var(--warn-bg); color: var(--warn); }
.manual-out.error { background: var(--gray-bg); color: var(--ink); }
.where { margin-top: 16px; font-size: 14px; }
.where summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.where ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink); }
.where code { font-size: 13px; background: #f0f1f6; padding: 1px 6px; border-radius: 5px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Wrong tab selected */
.mismatch {
  display: flex; gap: 20px; align-items: flex-start; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; border: 2px solid var(--blue);
}
.mm-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.mm-icon svg { width: 28px; height: 28px; }
.mm-body { min-width: 0; flex: 1; }
.mm-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; overflow-wrap: anywhere; }
.mismatch h2 { font-size: clamp(19px, 2.4vw, 24px); }
.mismatch p { margin: 10px 0 0; max-width: 68ch; }
.mm-found { margin-top: 14px; padding: 12px 16px; background: #f7f8fc; border-radius: 10px; }
.mm-found small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.mm-found ul { margin: 0; padding-left: 18px; font-size: 14px; }
.mm-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 20px; }
.btn-link { background: transparent; color: var(--muted); height: auto; padding: 8px 4px; font-weight: 500; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--navy); }
.btn-link:focus-visible, .btn-primary:focus-visible, .btn-ghost:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 760px) {
  .mismatch { flex-direction: column; padding: 20px; gap: 14px; }
  .mm-icon { width: 44px; height: 44px; }
  .btn-link { width: auto; }
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card h3 { font-size: 18px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

.care { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.care li { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.care li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; }
.care .warn { background: var(--warn-bg); } .care .warn::before { background: var(--warn); }
.care .info { background: var(--info-bg); } .care .info::before { background: var(--info); }
.care .ok { background: var(--ok-bg); } .care .ok::before { background: var(--ok); }

.msg-box {
  white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.8px; line-height: 1.6;
  background: #f7f8fc; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0 0 14px;
  max-height: 260px; overflow: auto; color: var(--ink);
}

.checklist { list-style: none; counter-reset: c; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checklist li { counter-increment: c; }
.checklist label {
  display: flex; gap: 14px; padding: 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; height: 100%;
  transition: border-color .2s, background .2s;
}
.checklist label:hover { border-color: #c9cfee; }
.checklist input { position: absolute; opacity: 0; pointer-events: none; }
.checklist .box {
  flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #c9cfee; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--blue); transition: all .2s;
}
.checklist .box::before { content: counter(c); }
.checklist input:checked + .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist input:checked + .box::before { content: "✓"; }
.checklist input:focus-visible + .box { outline: 2px solid var(--blue); outline-offset: 2px; }
.checklist input:checked ~ .txt strong { text-decoration: line-through; color: var(--muted); }
.checklist .txt strong { display: block; font-size: 14.5px; margin-bottom: 2px; }
.checklist .txt span { color: var(--muted); font-size: 13.5px; }
.check-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.bar { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .3s; }

.how { font-size: 13px; color: var(--muted); margin: 0; padding: 0 4px; }

/* Versions table */
.info-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 16px; }
.info h2 { font-size: 20px; }
.muted { color: var(--muted); font-size: 13.5px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.vtable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.vtable th { text-align: left; background: #f7f8fc; color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; }
.vtable td { padding: 12px 16px; border-top: 1px solid var(--line); }
.vtable td:first-child { font-weight: 600; }
.vtable td:last-child { color: var(--ok); font-weight: 600; }
.note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }

/* CTA band */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-radius: var(--radius); padding: 34px 36px; color: #fff;
  background: radial-gradient(500px 220px at 100% 0%, rgba(212,25,97,.45), transparent 70%), linear-gradient(120deg, var(--navy), var(--navy-2) 60%, #26306b);
  box-shadow: var(--shadow);
}
.cta-band h2 { font-size: clamp(20px, 2.6vw, 26px); margin-bottom: 8px; }
.cta-band p { margin: 0; color: #c8cde3; max-width: 600px; }
.result .cta-band { margin: 0; }

.footer { background: var(--navy); color: #9aa2c2; font-size: 13px; }
.footer-in { padding: 22px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer p { margin: 0; }
.footer a { color: #c8cde3; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; transition: all .25s; z-index: 9;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 104px; }
  .tabs { display: grid; width: 100%; }
  .tab { padding: 12px 8px; font-size: 14px; }
  .tab-ico { display: none; }
  .card { padding: 20px; }
  .field-row { flex-direction: column; }
  .field-labels .field-label-2 { display: none; }
  .select-wrap { width: 100%; }
  #submitBtn { width: 100%; }
  .btn { width: 100%; }
  .grid-2, .checklist { grid-template-columns: 1fr; }
  .verdict-head { padding: 20px; gap: 14px; }
  .verdict-icon { width: 44px; height: 44px; }
  .reco, .cross-hint { margin: 0 20px 20px; }
  .fact { padding: 14px 20px; }
  .cta-band { padding: 26px 22px; }
  .topbar-cta { display: none; }
  .g-recaptcha { transform: scale(.92); transform-origin: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
