/* ============================================================
   Website Security Check — more than ads
   Light / cream, trustworthy. Manrope only (400 / 700).
   ============================================================ */

@font-face {
  font-family: "Manrope";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Manrope-Light.ttf") format("truetype");
}
@font-face {
  font-family: "Manrope";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Manrope-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "IvyPresto Display";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("fonts/IvyPrestoDisplay-Light.otf") format("opentype");
}

:root {
  --primary: #59BCAD;     /* accent, CTAs, highlights */
  --primary-deep: #3c9a8c;
  --bg: #FFFFFF;
  --text: #111111;
  --grey: #F2F0ED;        /* info boxes, surfaces */
  --grey-line: #e4e1db;
  --muted: #6b6760;

  /* traffic-light — dezent, nicht grell */
  --ok:   #3FA68C;
  --warn: #D99A2B;
  --crit: #D2584A;
  --info: #8C8780;

  --ff: "Manrope", system-ui, sans-serif;
  --ff-serif: "IvyPresto Display", Georgia, serif;

  --maxw: 760px;
  --r-card: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
  line-height: 1.55;
}

.app-root { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--grey-line);
}
.topbar .logo { display: block; }
.topbar .logo img { display: block; height: 30px; width: auto; }
.topbar .top-tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.topbar .top-tag .ast { width: 13px; height: 13px; color: var(--primary); }

/* ---------- generic layout ---------- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(36px, 7vw, 92px) clamp(20px, 5vw, 56px) 80px;
}
.wrap { width: 100%; max-width: var(--maxw); }
.wrap--narrow { max-width: 560px; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 23px;
  letter-spacing: 0.01em;
  color: var(--primary-deep);
  margin: 0 0 14px;
}
h1.display {
  font-family: var(--ff);
  font-weight: 700;
  font-size: clamp(38px, 6.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.065em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.lead {
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 8px;
  max-width: 52ch;
  text-wrap: pretty;
}
.fineprint {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- form ---------- */
.form-card {
  margin-top: 38px;
  background: var(--bg);
}
.field { margin-bottom: 22px; }
.field > label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  margin-bottom: 9px;
}
.input-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--text);
  border-radius: 14px;
  padding: 0 18px;
  background: var(--bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input-shell:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(89,188,173,0.18);
}
.input-shell .pre {
  font-size: 15px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
.input-shell input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--ff);
  font-size: 17px;
  color: var(--text);
  padding: 16px 0;
  min-width: 0;
}
.input-shell input::placeholder { color: #b4afa7; }
.input-shell.is-error { border-color: var(--crit); }
.input-shell.is-error:focus-within { box-shadow: 0 0 0 4px rgba(210,88,74,0.16); }
.field .err {
  display: none;
  color: var(--crit);
  font-size: 13.5px;
  font-weight: 700;
  margin-top: 8px;
}
.field.show-err .err { display: block; }

.prefill-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-deep);
  margin-top: 9px;
}

/* consent */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: var(--grey);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 26px;
}
.consent.show-err { box-shadow: 0 0 0 2px var(--crit) inset; }
.consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 2px solid var(--text);
  border-radius: 6px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  margin-top: 1px;
  transition: background .12s ease, border-color .12s ease;
}
.consent input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 7px; top: 3px;
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(43deg);
}
.consent label { font-size: 14px; color: var(--text); line-height: 1.5; cursor: pointer; }
.consent a { color: var(--primary-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--ff);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 100px;
  border: 2px solid var(--text);
  background: var(--bg);
  color: var(--text);
  padding: 17px 30px;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.btn:hover { background: var(--text); color: var(--bg); }
.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn--primary:hover { background: var(--primary-deep); border-color: var(--primary-deep); color: #fff; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .ar { font-size: 17px; line-height: 0; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* reassurance strip under form */
.assure {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--grey-line);
}
.assure .item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
}
.assure .item svg { width: 17px; height: 17px; color: var(--primary); flex: 0 0 auto; }

/* ============================================================
   LOADING
   ============================================================ */
.loading-wrap { text-align: center; max-width: 520px; }
.scan-ast {
  width: 76px; height: 76px;
  color: var(--primary);
  margin: 0 auto 30px;
  animation: spin 2.6s cubic-bezier(.45,.05,.3,1) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.scan-target {
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  word-break: break-all;
}
.scan-title { font-weight: 700; font-size: clamp(22px,4vw,28px); letter-spacing: -0.04em; margin: 6px 0 28px; }
.scan-bar {
  height: 8px; border-radius: 100px;
  background: var(--grey);
  overflow: hidden;
  margin-bottom: 30px;
}
.scan-bar > i { display: block; height: 100%; background: var(--primary); border-radius: 100px; transition: width .3s ease; }
.scan-steps { text-align: left; display: flex; flex-direction: column; gap: 11px; }
.scan-step {
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 700;
  color: #bdb8b0;
  transition: color .2s ease;
}
.scan-step.active { color: var(--text); }
.scan-step.done { color: var(--muted); }
.scan-step .tick {
  width: 22px; height: 22px; flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: grid; place-items: center;
}
.scan-step.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.scan-step.done .tick svg { width: 12px; height: 12px; }
.scan-step.active .tick { border-color: var(--primary); }

/* ============================================================
   RESULTS
   ============================================================ */
.result-head { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 8px; }
.result-target {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; color: var(--muted);
  background: var(--grey); padding: 7px 14px; border-radius: 100px;
  word-break: break-all;
}
.result-target .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; }

/* score panel */
.score-panel {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 40px);
  margin: 26px 0 14px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--grey);
  border-radius: var(--r-card);
  flex-wrap: wrap;
}
.score-viz { flex: 0 0 auto; }
.score-copy { flex: 1; min-width: 240px; }
.score-rating {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 100px; margin-bottom: 12px;
}
.score-rating .lamp { width: 11px; height: 11px; border-radius: 50%; }
.score-headline { font-weight: 700; font-size: clamp(22px, 3.4vw, 30px); letter-spacing: -0.05em; line-height: 1.08; margin: 0 0 8px; }
.score-sub { font-size: 15.5px; color: var(--muted); margin: 0; max-width: 44ch; }

/* gauge */
.gauge { position: relative; width: 168px; height: 168px; }
.gauge svg { transform: rotate(-90deg); display: block; }
.gauge .gv-num {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gauge .gv-num b { font-size: 50px; font-weight: 700; letter-spacing: -0.05em; line-height: 1; }
.gauge .gv-num span { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* big number variant */
.score-big { display: flex; align-items: baseline; gap: 6px; }
.score-big b { font-size: 92px; font-weight: 700; letter-spacing: -0.07em; line-height: 0.8; }
.score-big span { font-size: 22px; font-weight: 700; color: var(--muted); }

/* bar variant */
.score-barwrap { width: 200px; }
.score-barwrap .num { font-size: 46px; font-weight: 700; letter-spacing: -0.05em; line-height: 1; margin-bottom: 12px; }
.score-barwrap .track { height: 14px; border-radius: 100px; background: #e2ded7; overflow: hidden; }
.score-barwrap .track > i { display: block; height: 100%; border-radius: 100px; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.score-barwrap .ticks { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 7px; }

/* ampel variant */
.ampel { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--bg); border-radius: 14px; border: 2px solid var(--text); }
.ampel .lamp-row { display: flex; align-items: center; gap: 12px; }
.ampel .l { width: 26px; height: 26px; border-radius: 50%; background: #d9d5ce; transition: background .3s; }
.ampel .l.on-g { background: var(--ok); }
.ampel .l.on-y { background: var(--warn); }
.ampel .l.on-r { background: var(--crit); }
.ampel .lab { font-size: 13px; font-weight: 700; color: var(--muted); }
.ampel .score-line { font-size: 28px; font-weight: 700; letter-spacing: -0.05em; margin-top: 4px; }

/* findings */
.section-label {
  font-family: var(--ff-serif); font-style: italic; font-weight: 300;
  font-size: 20px; color: var(--primary-deep); margin: 40px 0 4px;
}
.section-title { font-weight: 700; font-size: clamp(22px,3.2vw,28px); letter-spacing: -0.05em; margin: 0 0 18px; }

.findings { display: flex; flex-direction: column; gap: 12px; }
.finding {
  display: flex; gap: 15px;
  padding: 18px 20px;
  border: 1px solid var(--grey-line);
  border-radius: 14px;
  background: var(--bg);
}
.finding .ficon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.finding .ficon svg { width: 17px; height: 17px; }
.finding.s-ok   .ficon { background: var(--ok); }
.finding.s-warn .ficon { background: var(--warn); }
.finding.s-crit .ficon { background: var(--crit); }
.finding.s-info .ficon { background: var(--info); }
.finding .fbody { flex: 1; min-width: 0; }
.finding .ftop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.finding .flabel { font-weight: 700; font-size: 16.5px; }
.finding .fbadge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 100px;
}
.finding.s-ok   .fbadge { background: rgba(63,166,140,0.14); color: var(--ok); }
.finding.s-warn .fbadge { background: rgba(217,154,43,0.16); color: #a9741a; }
.finding.s-crit .fbadge { background: rgba(210,88,74,0.14); color: var(--crit); }
.finding.s-info .fbadge { background: rgba(140,135,128,0.16); color: var(--info); }
.finding .fdetail { font-size: 15px; color: var(--muted); line-height: 1.5; margin: 0; }
.finding .fmeta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.finding .chip { font-size: 12.5px; font-weight: 700; background: var(--grey); color: var(--text); padding: 5px 11px; border-radius: 100px; }

/* group header (list-grouped variant) */
.fgroup-head {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  margin: 26px 0 12px;
  color: var(--muted);
}
.fgroup-head .cnt { background: var(--text); color: var(--bg); font-size: 12px; border-radius: 100px; padding: 2px 9px; }

/* accordion variant */
.acc-item { border: 1px solid var(--grey-line); border-radius: 14px; overflow: hidden; }
.acc-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; background: var(--bg); width: 100%; border: 0; text-align: left; font-family: var(--ff); }
.acc-head .flabel { font-weight: 700; font-size: 16px; flex: 1; }
.acc-head .caret { transition: transform .2s; color: var(--muted); }
.acc-item.open .acc-head .caret { transform: rotate(180deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.acc-item.open .acc-body { max-height: 320px; }
.acc-body .inner { padding: 0 18px 18px 66px; }
.acc-body .fdetail { font-size: 15px; color: var(--muted); margin: 0; }

/* columns variant */
.fcolumns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.fcol { background: var(--grey); border-radius: 16px; padding: 16px; }
.fcol-head { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 14px; }
.fcol-head .lamp { width: 11px; height: 11px; border-radius: 50%; }
.fcol .mini { background: var(--bg); border-radius: 11px; padding: 12px 13px; margin-bottom: 9px; }
.fcol .mini .flabel { font-weight: 700; font-size: 14.5px; margin-bottom: 3px; }
.fcol .mini .fdetail { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.45; }
.fcol .empty { font-size: 13px; color: var(--muted); font-weight: 700; }

/* not-checkable block */
.notcheck {
  margin-top: 34px;
  background: var(--grey);
  border-radius: var(--r-card);
  padding: 24px clamp(20px,3vw,28px);
}
.notcheck h3 { font-family: var(--ff-serif); font-style: italic; font-weight: 300; font-size: 22px; color: var(--text); margin: 0 0 6px; }
.notcheck p { font-size: 15px; color: var(--muted); margin: 0 0 16px; max-width: 56ch; }
.notcheck .tags { display: flex; flex-wrap: wrap; gap: 9px; }
.notcheck .tags .t { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; background: var(--bg); padding: 8px 14px; border-radius: 100px; }
.notcheck .tags .t svg { width: 15px; height: 15px; color: var(--muted); }

/* package recommendation */
.pkg {
  margin-top: 34px;
  border: 2px solid var(--text);
  border-radius: var(--r-card);
  overflow: hidden;
}
.pkg-top { background: var(--text); color: var(--bg); padding: clamp(22px,3vw,30px); }
.pkg-top .pre { font-family: var(--ff-serif); font-style: italic; font-weight: 300; font-size: 19px; color: var(--primary); margin: 0 0 10px; }
.pkg-top .name { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pkg-top .name b { font-size: clamp(34px,5.4vw,50px); font-weight: 700; letter-spacing: -0.06em; line-height: 1; }
.pkg-top .name .badge { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); background: var(--primary); padding: 5px 12px; border-radius: 100px; }
.pkg-top p { font-size: 15.5px; color: rgba(255,255,255,0.75); margin: 14px 0 0; max-width: 54ch; }
.pkg-body { padding: clamp(22px,3vw,30px); background: var(--bg); }
.pkg-feats { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 12px 22px; }
.pkg-feats li { display: flex; align-items: center; gap: 11px; font-size: 15.5px; font-weight: 700; }
.pkg-feats li svg { width: 19px; height: 19px; color: var(--primary); flex: 0 0 auto; }
.pkg-feats li.dim { color: var(--muted); font-weight: 400; }
.pkg-feats li.dim svg { color: var(--grey-line); }

/* restart / footer */
.result-foot { margin-top: 30px; text-align: center; }
.restart {
  background: none; border: 0; cursor: pointer; font-family: var(--ff);
  font-weight: 700; font-size: 14px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: 0.03em;
}
.restart:hover { color: var(--text); }
.restart svg { width: 15px; height: 15px; }

/* error state */
.error-wrap { text-align: center; max-width: 480px; }
.error-ic { width: 64px; height: 64px; border-radius: 50%; background: rgba(210,88,74,0.12); color: var(--crit); display: grid; place-items: center; margin: 0 auto 24px; }
.error-ic svg { width: 30px; height: 30px; }

/* entrance — DISABLED on opacity to stay robust; content is always visible.
   Only the scan asterisk spins (decorative, safe). */
.scan-ast { /* spin defined above */ }
@media (prefers-reduced-motion: reduce) {
  .scan-ast { animation: none !important; }
}

@media (max-width: 560px) {
  .topbar .top-tag { display: none; }
  .score-panel { flex-direction: column; align-items: flex-start; }
  .btn-row .btn { width: 100%; }
}
