:root {
  --bg: #05060a;
  --surface: rgba(255,255,255,.03);
  --surface-2: rgba(255,255,255,.055);
  --border: rgba(255,255,255,.09);
  --text: #f4f6fb;
  --muted: #8b93a7;
  --g1: #7c6cff;
  --g2: #4dd6c1;
  --g3: #f0739b;
  --cyan: #00dcff;
  --brand: #7c6cff;
  --brand-2: #4dd6c1;
  --ok: #16a34a;
  --warn: #f59e0b;
  --high: #f97316;
  --crit: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 36px rgba(0,0,0,.45);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
/* The HTML `hidden` attribute must always win, even over elements that set an
   explicit display (.modal-backdrop uses grid, #key-box uses flex). */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ambient background: glow orbs + faint grid, fixed behind everything */
.bgfx { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bgfx .orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .5; animation: drift 22s ease-in-out infinite alternate; }
.bgfx .o1 { width: 560px; height: 560px; background: radial-gradient(circle, #7c6cff40, transparent 65%); top: -240px; left: -120px; }
.bgfx .o2 { width: 480px; height: 480px; background: radial-gradient(circle, #4dd6c138, transparent 65%); top: 10%; right: -200px; animation-delay: -8s; }
.bgfx .o3 { width: 600px; height: 600px; background: radial-gradient(circle, #f0739b22, transparent 65%); bottom: -280px; left: 30%; animation-delay: -15s; }
@keyframes drift { to { transform: translate(60px, 45px) scale(1.07); } }
.gridfx { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(255,255,255,.024) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.024) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 55%, transparent 100%); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(8,10,16,.6); z-index: 5;
}
.brand { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand span { color: var(--text); }
.quota { font-size: 13px; color: var(--muted); }
.quota .pro { color: #fbbf24; font-weight: 600; }
.quota a { color: var(--g2); cursor: pointer; }

.container { max-width: 760px; margin: 0 auto; padding: 40px 18px 60px; }
.tagline {
  font-size: clamp(30px, 6vw, 42px); margin: 8px 0 6px; text-align: center;
  font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
  background: linear-gradient(92deg, var(--cyan) 0%, var(--g2) 55%, var(--g1) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(0,220,255,.28));
}
.sub { text-align: center; color: var(--muted); margin: 0 0 30px; font-size: 15.5px; }

.tabs { display: flex; gap: 6px; background: rgba(10,13,20,.6); padding: 6px; border-radius: 99px; border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tab {
  flex: 1; padding: 11px 8px; border: 0; border-radius: 99px; background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; transition: .2s; font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; box-shadow: 0 4px 20px rgba(124,108,255,.4); }

.panel { display: none; margin-top: 24px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--surface); padding: 22px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.panel.active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.panel-help { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

textarea, input[type=text], input[type=email], input[type=number], select {
  width: 100%; background: rgba(0,0,0,.3); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px;
  font-size: 15px; font-family: inherit; resize: vertical; transition: border-color .2s, box-shadow .2s;
}
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--g2); box-shadow: 0 0 0 3px rgba(77,214,193,.14); }
.row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.row label { flex: 1; min-width: 130px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
textarea { margin-bottom: 12px; }

button.primary {
  width: 100%; padding: 14px; border: 0; border-radius: 99px; cursor: pointer;
  background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; font-size: 15px; font-weight: 700;
  font-family: inherit; transition: .25s; box-shadow: 0 4px 24px rgba(124,108,255,.35);
}
button.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(124,108,255,.5); }
button.primary:disabled { opacity: .6; cursor: progress; transform: none; }
button.secondary {
  padding: 11px 16px; border: 1px solid var(--border); border-radius: 99px; cursor: pointer;
  background: var(--surface-2); color: var(--text); font-weight: 600; font-family: inherit;
}

/* Results */
.result { margin-top: 20px; background: rgba(0,0,0,.25); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  animation: fade .35s ease; }
.score-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.gauge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff; flex-shrink: 0;
  box-shadow: 0 0 24px rgba(0,0,0,.4); }
.risk-LOW { background: var(--ok); box-shadow: 0 0 22px rgba(22,163,74,.45); }
.risk-MEDIUM { background: var(--warn); box-shadow: 0 0 22px rgba(245,158,11,.4); }
.risk-HIGH { background: var(--high); box-shadow: 0 0 22px rgba(249,115,22,.45); }
.risk-CRITICAL { background: var(--crit); box-shadow: 0 0 22px rgba(239,68,68,.5); }
.score-head h3 { margin: 0 0 2px; }
.score-head .lvl-LOW { color: #4ade80; } .score-head .lvl-MEDIUM { color: #fbbf24; }
.score-head .lvl-HIGH { color: #fb923c; } .score-head .lvl-CRITICAL { color: #f87171; }

.flag { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.flag:first-of-type { border-top: 0; }
.sev { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; height: fit-content; text-transform: uppercase; }
.sev.critical { background: var(--crit); color:#fff; } .sev.high { background: var(--high); color:#fff; }
.sev.medium { background: var(--warn); color:#222; } .sev.low { background: var(--surface-2); color: var(--muted); }

.block { margin-top: 14px; }
.block h4 { margin: 0 0 6px; font-size: 12px; color: var(--g2); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.copybox { position: relative; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.copybtn { position: absolute; top: 8px; right: 8px; font-size: 12px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); background: rgba(8,10,16,.8); color: var(--muted); cursor: pointer; font-family: inherit; transition: .2s; }
.copybtn:hover { color: var(--text); border-color: var(--g2); }
.pricetag { display: flex; gap: 10px; margin-top: 6px; }
.pricetag div { flex: 1; text-align: center; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.pricetag .v { font-size: 20px; font-weight: 800;
  background: linear-gradient(92deg, var(--cyan), var(--g2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pricetag .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.acct { font-size: 13px; border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; border: 1px solid var(--border); line-height: 1.45; }
.acct-trusted, .acct-established { color: #4ade80; border-color: rgba(74,222,128,.4); background: rgba(22,163,74,.08); }
.acct-new { color: #fb923c; border-color: rgba(251,146,60,.4); background: rgba(249,115,22,.10); }
.acct-neutral { color: var(--muted); }
.share-btn { display: block; width: 100%; margin-top: 16px; padding: 12px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; transition: .2s; font-family: inherit; }
.share-btn:hover { border-color: var(--g2); }
.share-btn.done { color: #4ade80; border-color: #4ade80; }
.shared-banner { background: rgba(124,108,255,.12); border: 1px solid rgba(124,108,255,.5); color: #b6acff; border-radius: 10px; padding: 10px 13px; margin-bottom: 14px; font-size: 13px; font-weight: 600; }
.disclaimer { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.degraded { font-size: 12px; color: var(--warn); margin-top: 8px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #0c0f18; border: 1px solid var(--border); border-radius: 20px; padding: 26px; max-width: 420px; width: 100%; position: relative; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 8px; letter-spacing: -.02em; }
.modal p { color: var(--muted); font-size: 14px; }
.modal-close { position: absolute; top: 12px; right: 14px; background: 0; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; }
.perks { list-style: none; padding: 0; margin: 14px 0; }
.perks li { padding: 5px 0; font-size: 14px; }
.modal input { margin: 10px 0; }
.have-key { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; font-size: 13px; }
.have-key a { color: var(--g2); }
#key-box { display: flex; gap: 8px; margin-top: 10px; }
.modal-note { font-size: 13px; min-height: 18px; }
.modal-note.err { color: #f87171; } .modal-note.ok { color: #4ade80; }

.footer { max-width: 760px; margin: 0 auto; padding: 24px 18px 44px; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.6; }
.footer a { color: var(--g2); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .credit { margin-top: 6px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #0c0f18; border: 1px solid var(--border); color: var(--text); padding: 10px 18px; border-radius: 99px; box-shadow: var(--shadow); z-index: 80; font-size: 14px; }

@media (max-width: 560px) {
  .tagline { font-size: 26px; }
  .tab { font-size: 12px; padding: 10px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .bgfx .orb { animation: none; }
}

/* ── Guide sections (examples / signal chart / how-to / checklist / CTA) ── */
.gsec { margin-top: 56px; }
.gsec h2 { font-size: clamp(22px, 4vw, 28px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; text-align: center; }
.gsub { color: var(--muted); font-size: 14.5px; text-align: center; margin: 0 auto 22px; max-width: 540px; }
.gnote { color: var(--muted); font-size: 12px; text-align: center; margin-top: 14px; }

/* example chips */
.exrow { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.exchip { border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 99px; padding: 10px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: .2s; }
.exchip:hover { border-color: var(--g2); background: rgba(77,214,193,.08); transform: translateY(-1px); }
.exchip.used { border-color: var(--g2); color: var(--g2); }

/* signal explorer chart */
.sigchart { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); padding: 10px 18px; }
.sigrow { padding: 13px 4px; border-top: 1px solid var(--border); cursor: pointer; transition: background .2s; }
.sigrow:first-child { border-top: 0; }
.sigrow:hover { background: rgba(255,255,255,.025); }
.sigline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.signame { font-size: 14.5px; font-weight: 600; }
.sigtrack { height: 10px; border-radius: 5px; background: rgba(255,255,255,.05); overflow: hidden; }
.sigbar { height: 100%; width: 0; border-radius: 5px 4px 4px 5px;
  background: linear-gradient(90deg, var(--g2), var(--cyan)); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.sigbar.grow { width: var(--w); }
.sigdetail { display: none; padding: 12px 2px 4px; }
.sigrow.open .sigdetail { display: block; animation: fade .3s ease; }
.sigrow.open { background: rgba(255,255,255,.03); }
.sigquote { margin: 0 0 8px; font-size: 13.5px; color: var(--text); background: rgba(240,115,155,.07);
  border-left: 3px solid var(--g3); border-radius: 0 10px 10px 0; padding: 9px 12px; font-style: italic; }
.sigtip { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* how-to accordion */
.howgrid { display: grid; gap: 12px; }
.howcard { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.howhead { width: 100%; display: flex; align-items: center; gap: 10px; padding: 15px 18px; border: 0;
  background: transparent; color: var(--text); font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.howico { font-size: 18px; }
.howhead .caret { margin-left: auto; color: var(--muted); transition: transform .25s; }
.howcard.open .caret { transform: rotate(180deg); }
.howsteps { display: none; margin: 0; padding: 0 20px 16px 40px; }
.howcard.open .howsteps { display: block; animation: fade .3s ease; }
.howsteps li { font-size: 13.5px; color: var(--muted); padding: 5px 0 5px 6px; line-height: 1.55; }
.howsteps li::marker { color: var(--g2); font-weight: 700; }

/* checklist */
.checklist { display: grid; gap: 8px; }
.checkitem { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); border-radius: 12px; padding: 12px 14px; font-size: 13.5px;
  cursor: pointer; font-family: inherit; transition: .2s; }
.checkitem:hover { border-color: rgba(77,214,193,.4); }
.checkitem .box { width: 22px; height: 22px; flex-shrink: 0; border-radius: 7px; border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; transition: .2s; background: rgba(0,0,0,.3); }
.checkitem.done { color: var(--muted); }
.checkitem.done .box { background: linear-gradient(135deg, var(--g1), var(--g2)); border-color: transparent; }

/* studio CTA */
.gcta { text-align: center; border: 1px solid var(--border); border-radius: 20px; padding: 34px 20px;
  background: linear-gradient(180deg, rgba(124,108,255,.10), rgba(77,214,193,.05) 60%, transparent); }
.ctabtn { display: inline-block; margin-top: 6px; padding: 12px 26px; border-radius: 99px; font-weight: 700;
  font-size: 14px; color: #fff; text-decoration: none; background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 4px 24px rgba(124,108,255,.35); transition: .25s; }
.ctabtn:hover { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(124,108,255,.5); }

/* ── looping scam-catch demo ── */
.demo { position: relative; border: 1px solid var(--border); border-radius: 20px; background: var(--surface);
  padding: 20px; overflow: hidden; min-height: 210px; }
.demo-msg { max-width: 90%; background: rgba(240,115,155,.08); border: 1px solid rgba(240,115,155,.3);
  border-radius: 14px 14px 14px 4px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; font-style: italic;
  opacity: 0; transform: translateY(14px); transition: .5s ease; }
.demo.p1 .demo-msg { opacity: 1; transform: none; }
.demo-scanline { position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: 0; }
.demo.p2:not(.p3) .demo-scanline { opacity: 1; animation: scansweep 1.6s linear infinite; }
@keyframes scansweep { from { top: 0; } to { top: 100%; } }
.demo-scan { margin-top: 14px; font-size: 13px; color: var(--g2); opacity: 0; transition: .3s; }
.demo.p2:not(.p3) .demo-scan { opacity: 1; }
.demo-scan span { animation: scanpulse 1s ease-in-out infinite; display: inline-block; }
@keyframes scanpulse { 50% { opacity: .4; } }
.demo-verdict { display: flex; align-items: center; gap: 16px; margin-top: 14px; opacity: 0; transform: translateY(10px); transition: .5s ease; }
.demo.p3 .demo-verdict { opacity: 1; transform: none; }
.demo-gauge { width: 62px; height: 62px; border-radius: 50%; background: var(--crit); flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff;
  box-shadow: 0 0 26px rgba(239,68,68,.55); }
.demo.p3 .demo-gauge { animation: gaugepop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes gaugepop { from { transform: scale(.4); } }
.demo-flags { display: flex; flex-wrap: wrap; gap: 7px; }
.demo-flag { font-size: 12px; font-weight: 600; border: 1px solid rgba(239,68,68,.45); color: #f87171;
  background: rgba(239,68,68,.08); border-radius: 99px; padding: 5px 11px; opacity: 0; transform: scale(.6); }
.demo.p3 .demo-flag { animation: flagpop .4s cubic-bezier(.2,1.6,.4,1) forwards; }
.demo.p3 .demo-flag:nth-child(1) { animation-delay: .15s; }
.demo.p3 .demo-flag:nth-child(2) { animation-delay: .35s; }
.demo.p3 .demo-flag:nth-child(3) { animation-delay: .55s; }
@keyframes flagpop { to { opacity: 1; transform: none; } }
.sigact { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--g2); }
