/* /hack-check: "Is my website hacked?" (scripts/hack-check/build.js, js/hack-check.js).
   The check itself: the address, the wait and the result. The hero, the ruled
   rows, the dark band, the questions and the close are service.css; the name
   and email fields are home.css's .lead.

   Colour says how bad, and only on the small things: a red mark for a sign of
   a hack, amber for a risk. "No signs" stays ink, never green: green would
   say clean, and the check can't. */
.hc{
  --bad:#C8323A;--warn:#96590A;
  padding-top:clamp(36px,5vw,72px);
  scroll-margin-top:calc(var(--nav-h) + 24px);
}
:root[data-theme="dark"] .hc{--bad:#FF7A7A;--warn:#F2B552}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .hc{--bad:#FF7A7A;--warn:#F2B552}}
.hc [hidden]{display:none!important}

/* ---------- the address ---------- */
.hc__ask{max-width:1040px}
.hc__ask > .label{display:block;opacity:.72}
.hc__row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:20px 32px;margin-top:6px}
.hc__in{
  flex:1 1 300px;min-width:0;padding:10px 0 14px;
  border:0;border-bottom:1.5px solid rgba(var(--ink-rgb),.28);border-radius:0;
  background:transparent;color:inherit;font:inherit;
  font-size:clamp(26px,3.6vw,52px);font-weight:400;letter-spacing:-.035em;line-height:1.15;
  outline:none;transition:border-color var(--t-fast) var(--ease);
}
.hc__in:focus{border-bottom-color:var(--ink)}
.hc__in::placeholder{color:inherit;opacity:.3}
.hc__in[aria-invalid="true"]{border-bottom-color:var(--bad)}
.hc .consult__btn{margin-top:0;border:0;cursor:pointer;font-family:inherit}
.hc .consult__btn--ghost{border:0}
.hc .consult__btn > span:not(.dot){margin-left:.45em}
.hc__go{flex:none;margin-bottom:6px}
.hc__err{margin:12px 0 0;font-size:15px;line-height:1.45;color:var(--bad)}
.hc__err:empty{display:none}
.hc__fine{margin-top:18px;font-size:14px;line-height:1.5;opacity:.6}

/* Cloudflare's check: nothing to see unless it asks for a tap */
.hc__bot{max-width:340px;height:0;overflow:hidden;opacity:0}
.hc__bot--on{height:auto;margin-top:22px;overflow:visible;opacity:1}

/* ---------- the wait ---------- */
.hc__now{
  display:flex;align-items:center;gap:16px;
  font-size:clamp(26px,3.6vw,52px);letter-spacing:-.035em;line-height:1.15;
}
.hc__now b{font-weight:700;overflow-wrap:anywhere}
.hc__pulse{flex:none;width:.34em;height:.34em;border-radius:50%;background:var(--green);animation:hc-pulse 1.2s var(--ease) infinite alternate}
@keyframes hc-pulse{from{opacity:.35;transform:scale(.7)}to{opacity:1;transform:scale(1)}}
.hc__looks{margin:clamp(22px,2.6vw,34px) 0 0;padding:0;list-style:none;max-width:560px;border-top:var(--hair)}
.hc__looks li{
  display:flex;align-items:center;gap:14px;padding:13px 0;border-bottom:var(--hair);
  font-size:var(--fs-body);opacity:.42;transition:opacity var(--t-fast) var(--ease);
}
.hc__looks li::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;box-shadow:inset 0 0 0 1px currentColor;transition:background var(--t-fast) var(--ease)}
.hc__looks li.is-on{opacity:1}
.hc__looks li.is-on::before{background:var(--green);box-shadow:none}
.hc__looks li.is-done{opacity:.72}
.hc__looks li.is-done::before{background:currentColor;box-shadow:none}
/* the still version (?lite, reduced motion, data saving): the list as it is, nothing moving */
.hc--still .hc__pulse{animation:none}
.hc--still .hc__looks li{opacity:.72;transition:none}
@media (prefers-reduced-motion:reduce){.hc__pulse{animation:none}.hc__looks li{transition:none}}

/* ---------- the result ---------- */
.hc__result{outline:none}
.hc__for{display:inline-flex;align-items:center;gap:12px;text-transform:none;letter-spacing:0;font-size:15px;font-weight:400;opacity:.72}
.hc__for .mark{width:12px;height:12px}
.hc__result[data-verdict="hacked"] .hc__for .mark{color:var(--bad)}
.hc__result[data-verdict="risk"] .hc__for .mark{color:var(--warn)}
.hc__result[data-verdict="hacked"] .hc__for,.hc__result[data-verdict="risk"] .hc__for{opacity:1}
.hc__verdict{
  margin-top:18px;
  font-size:clamp(44px,7vw,108px);font-weight:700;letter-spacing:-.045em;line-height:.96;text-wrap:balance;
}
.hc__sum{margin-top:clamp(18px,2vw,28px);max-width:40ch;font-size:clamp(21px,2vw,30px);font-weight:300;letter-spacing:-.025em;line-height:1.3;text-wrap:pretty}

/* the count: how many signs, risks and things worth fixing, in figures you can't miss. Anything
   we could put right is counted here, then named in the rows below (Aston, 2026-11-17: flag
   them more prominently). */
.hc__tally{display:flex;flex-wrap:wrap;gap:22px clamp(36px,6vw,104px);margin-top:clamp(30px,3.6vw,52px)}
.hc__count{display:flex;flex-direction:column;gap:12px}
.hc__n{font-size:clamp(64px,8vw,128px);font-weight:300;letter-spacing:-.05em;line-height:.86;font-variant-numeric:tabular-nums}
.hc__count[data-level="hack"] .hc__n{color:var(--bad)}
.hc__count[data-level="risk"] .hc__n,.hc__count[data-level="note"] .hc__n{color:var(--warn)}
.hc__count > .label{display:inline-flex;align-items:center;gap:10px;line-height:1.3}
.hc__count > .label::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:currentColor}
.hc__count[data-level="hack"] > .label{color:var(--bad)}
.hc__count[data-level="risk"] > .label,.hc__count[data-level="note"] > .label{color:var(--warn)}
.hc__count[data-level="note"] > .label::before{background:none;box-shadow:inset 0 0 0 1.5px currentColor}

/* what was seen: ruled rows, the kind on the left, the evidence beside it */
.hc__finds{margin:clamp(32px,4vw,56px) 0 0;padding:0;list-style:none;border-top:var(--hair)}
.hc__find{display:grid;gap:10px;padding:22px 0 24px;border-bottom:var(--hair)}
.hc__find > .label{display:inline-flex;align-items:center;gap:10px;line-height:1.3}
.hc__find > .label::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:currentColor;opacity:.4}
.hc__find[data-level="hack"] > .label{color:var(--bad)}
.hc__find[data-level="risk"] > .label{color:var(--warn)}
.hc__find[data-level="hack"] > .label::before,.hc__find[data-level="risk"] > .label::before{opacity:1}
/* a smaller thing worth fixing: the same amber, as a ring, so it is flagged but never mistaken for a risk */
.hc__find[data-level="note"] > .label{color:var(--warn)}
.hc__find[data-level="note"] > .label::before{background:none;box-shadow:inset 0 0 0 1.5px currentColor;opacity:1}
.hc__find h3{font-size:var(--fs-h3);font-weight:400;letter-spacing:-.02em;line-height:1.2;text-wrap:balance}
.hc__find p{margin-top:8px;max-width:64ch;font-size:var(--fs-body);line-height:1.6;opacity:.74;overflow-wrap:anywhere}
.hc__find .hc__credit{font-size:14px;opacity:1}
@media (min-width:800px){
  .hc__find{grid-template-columns:minmax(0,3fr) minmax(0,9fr);column-gap:clamp(24px,4vw,64px);align-items:baseline}
}

.hc__also{margin-top:clamp(28px,3.4vw,44px)}
.hc__also > .label{opacity:.72}
.hc__also ul{margin:14px 0 0;padding:0;list-style:none;display:grid;gap:8px;max-width:64ch}
.hc__also li{position:relative;padding-left:1.35em;font-size:16px;line-height:1.5;opacity:.74}
.hc__also li::before{content:"";position:absolute;left:0;top:.5em;width:.5em;height:.5em;border-radius:50%;background:currentColor;opacity:.55}
.hc__also li.is-skipped{opacity:.52}
.hc__also li.is-skipped::before{background:none;box-shadow:inset 0 0 0 1px currentColor}

.hc__limit{margin-top:clamp(28px,3.4vw,44px);max-width:60ch;font-size:var(--fs-body);line-height:1.6}
.hc__next{display:flex;flex-wrap:wrap;align-items:center;gap:16px 28px;margin-top:clamp(28px,3.4vw,44px)}
.hc__next .link{font-size:var(--fs-body)}

/* ---------- "Want a person to look too?" ---------- */
.hc__hold{margin-top:clamp(40px,5vw,64px);padding-top:clamp(24px,3vw,36px);border-top:var(--hair);max-width:720px}
.hc__holdq{font-size:clamp(22px,2.2vw,28px);font-weight:700;letter-spacing:-.03em;line-height:1.12}
.hc__hint{margin-top:10px;max-width:52ch;font-size:var(--fs-body);line-height:1.5;opacity:.66}
.hc__hold .lead{margin-top:22px}
.hc__holdnav{display:flex;flex-wrap:wrap;align-items:center;gap:12px 22px;margin-top:26px}
.hc__holdsay{margin-top:14px;font-size:var(--fs-body);line-height:1.5}
.hc__holdsay:empty{display:none}
.hc__quiet{
  appearance:none;border:0;background:none;padding:8px 0;color:inherit;font:inherit;font-size:16px;
  text-decoration:underline;text-underline-offset:.2em;cursor:pointer;opacity:.62;transition:opacity var(--t-fast) var(--ease);
}
.hc__quiet:hover,.hc__quiet:focus-visible{opacity:1}
.hc__again{margin-top:clamp(24px,3vw,36px)}

@media (max-width:560px){
  .hc__go{width:100%;justify-content:center}
  .hc__find{padding:18px 0 20px}
}

/* ---------- two photographs, in "The scan" ----------
   The two visitors the scan arrives as. A big one and a smaller one set lower beside it; on a
   phone the smaller one sits under the first, to the right. No borders, nothing drawn over them. */
.hc-pics{display:grid;gap:clamp(28px,4vw,56px);margin-top:clamp(56px,7vw,120px)}
.hc-pic{margin:0}
.hc-pic img{display:block;width:100%;height:auto;border-radius:clamp(12px,1.4vw,20px);background:rgba(var(--ink-rgb),.06)}
.hc-pic figcaption{display:block;margin-top:14px;line-height:1.5;opacity:.62}
.hc-pic--small{width:78%;justify-self:end}
@media (min-width:800px){
  .hc-pics{grid-template-columns:minmax(0,7fr) minmax(0,5fr);column-gap:clamp(24px,3vw,56px);align-items:start}
  .hc-pic--small{width:auto;justify-self:stretch;margin-top:clamp(64px,11vw,190px)}
}
