@font-face {
  font-family: "Montserrat";
  src: url("/check/fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #1f2020;
  --surface: #282929;
  --surface-2: #303131;
  --line: rgba(248, 243, 229, 0.14);
  --text: #f8f3e5;
  --muted: rgba(248, 243, 229, 0.74);
  --faint: rgba(248, 243, 229, 0.36);
  --lit: #4fc08f;
  --blue: #3663a3;
  --red: #e64032;
  --red-soft: #ff7a6b;
  --green: #358567;
  --yellow: #e8b931;
  --radius: 14px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
a { color: var(--text); text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
:focus-visible { outline: 3px solid var(--lit); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1:focus, h2:focus { outline: none; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 12px max(18px, env(safe-area-inset-left));
  background: rgba(31, 32, 32, 0.94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: 0.01em; }
.mark b { font-weight: 800; letter-spacing: 0.02em; }
.stripes { display: inline-grid; gap: 2px; margin-left: 4px; }
.stripes i { display: block; width: 22px; height: 3px; border-radius: 1px; background: var(--blue); }
.stripes i:nth-child(2) { background: var(--red); }
.stripes i:nth-child(3) { background: var(--green); }
.bar__help { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 8px 2px; }
.bar__help:hover { color: var(--text); }

/* Screens */
main { max-width: 520px; margin: 0 auto; padding: 0 max(18px, env(safe-area-inset-left)) calc(40px + env(safe-area-inset-bottom)); }
.screen { padding-top: 26px; display: grid; gap: 18px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
h1 { font-size: clamp(30px, 8.4vw, 40px); font-weight: 800; letter-spacing: -0.01em; }
.screen > h2 { font-size: clamp(26px, 7vw, 32px); font-weight: 800; letter-spacing: -0.01em; }
.lede { font-size: 18px; color: var(--muted); }

/* Buttons */
.actions { display: grid; gap: 10px; margin-top: 4px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 20px;
  border-radius: 12px; border: 2px solid var(--line);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 700; font-size: 17px; text-align: center; text-decoration: none;
  cursor: pointer; transition: transform 0.08s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.985); }
.btn--primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn--primary:hover { background: #fffaf0; }
.btn--ghost { background: transparent; }
.btn--ghost:hover { border-color: var(--faint); }
.btn--ok { background: var(--lit); border-color: var(--lit); color: #102018; }
.btn--ok:hover { background: #63cc9d; }
.btn--off { background: transparent; border-color: var(--red); color: var(--text); }
.btn--off:hover { background: rgba(230, 64, 50, 0.12); }
.btn--off::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.btn--ok::before { content: ""; width: 12px; height: 7px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: translateY(-2px) rotate(-45deg); }
.btn--sm { min-height: 46px; padding: 10px 16px; font-size: 16px; }
.btn--call { background: var(--lit); border-color: var(--lit); color: #102018; }
.linkbtn { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; cursor: pointer; justify-self: start; }
.linkbtn:hover { color: var(--text); }
.back { margin-top: -4px; }

/* Cards and notes */
.note { border-left: 4px solid var(--blue); background: var(--surface); padding: 16px 18px; border-radius: 0 var(--radius) var(--radius) 0; display: grid; gap: 6px; }
.note__title { font-size: 16px; font-weight: 700; }
.note p { color: var(--muted); font-size: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.card__title { font-size: 18px; font-weight: 700; }
.card p { color: var(--muted); font-size: 16px; }
.install__qr { margin: 0; justify-self: start; background: #fff; padding: 8px; border-radius: 10px; line-height: 0; }
.install__qr img { display: block; width: 132px; height: 132px; }

input[type="tel"], input[type="text"] {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border-radius: 10px; border: 2px solid var(--line); background: var(--bg); color: var(--text);
  font: inherit; font-size: 17px;
}
input::placeholder { color: var(--faint); }
input:focus { outline: none; border-color: var(--lit); }
.bank__form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.bank__saved { color: var(--text) !important; font-weight: 600; }
.bank__saved a { color: var(--lit); }
.field__label { font-size: 15px; font-weight: 600; }

/* Progress */
.progress { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.progress i { height: 5px; border-radius: 3px; background: var(--line); }
.progress i.done { background: var(--lit); }
.progress i.off { background: var(--red); }
.progress i.now { background: var(--text); }

/* Drawing */
.art { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 10px; }
.art svg { display: block; width: 100%; height: auto; max-height: 260px; margin: 0 auto; }
.art .m, .art .w, .art .ph, .art .ring, .art .hl { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.art .m { stroke: var(--text); stroke-opacity: 0.42; stroke-width: 2; transition: stroke 0.2s ease, stroke-opacity 0.2s ease; }
.art .m.dim, .art .ph.dim { stroke-opacity: 0.22; }
.art .p-cam { fill: var(--text); fill-opacity: 0.42; stroke: none; }
.art .slotline { stroke-width: 3.5; }
.art .fk--r { stroke: var(--red); stroke-opacity: 0.75; }
.art .fk--y { stroke: var(--yellow); stroke-opacity: 0.75; }
.art .fk--g { stroke: var(--lit); stroke-opacity: 0.75; }
.art .ring { stroke: var(--lit); stroke-width: 2.5; stroke-dasharray: 5 6; opacity: 0; }
.art .g-wall, .art .g-hand, .art .g-phone { display: none; }
.art .w { stroke: var(--text); stroke-opacity: 0.16; stroke-width: 2; }
.art .hl { stroke: var(--lit); stroke-width: 2.4; }
.art .hl .ray { stroke-dasharray: 3 5; }
.art .g-hand rect { fill: #e9dcc6; stroke: var(--bg); stroke-width: 2; }
.art .ph { stroke: var(--text); stroke-width: 2; stroke-opacity: 0.6; }
.art .ph-note { fill: rgba(79, 192, 143, 0.16); stroke: var(--lit); stroke-width: 2; }
.art .ph-bell { fill: none; stroke: var(--lit); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.art[data-focus="all"] .m { stroke-opacity: 0.95; }
.art[data-focus="all"] .p-cam { fill-opacity: 0.95; }
.art[data-focus="all"] .ring--all { opacity: 1; }
.art[data-focus="slot"] .p-slot { stroke: var(--lit); stroke-opacity: 1; }
.art[data-focus="slot"] .ring--slot { opacity: 1; }
.art[data-focus="keypad"] .p-keys, .art[data-focus="keypad"] .p-hood { stroke: var(--lit); stroke-opacity: 1; }
.art[data-focus="keypad"] .ring--keys { opacity: 1; }
.art[data-focus="cam"] .p-cam { fill: var(--lit); fill-opacity: 1; }
.art[data-focus="cam"] .p-top { stroke: var(--lit); stroke-opacity: 0.9; }
.art[data-focus="cam"] .ring--cam { opacity: 1; }
.art[data-focus="place"] .g-wall { display: inline; }
.art[data-focus="place"] .g-machine { opacity: 0.85; }
.art[data-focus="hand"] .g-hand { display: inline; }
.art[data-focus="hand"] .p-tap { stroke: var(--lit); stroke-opacity: 1; }
.art[data-focus="hand"] .ring--tap { opacity: 1; }
.art[data-focus="phone"] .g-machine { display: none; }
.art[data-focus="phone"] .g-phone { display: inline; }

@media (prefers-reduced-motion: no-preference) {
  .art .ring { animation: march 1.6s linear infinite; }
  @keyframes march { to { stroke-dashoffset: -22; } }
}

/* Step text */
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.points li { position: relative; padding-left: 22px; font-size: 18px; }
.points li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--lit); }
.cite { font-size: 14px; color: var(--muted); }
.cite a { color: var(--muted); }

/* Result */
.result-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.result-icon.ok { background: rgba(79, 192, 143, 0.16); border: 2px solid var(--lit); }
.result-icon.ok::before { content: ""; width: 24px; height: 13px; border-left: 4px solid var(--lit); border-bottom: 4px solid var(--lit); transform: translateY(-3px) rotate(-45deg); }
.result-icon.off { background: rgba(230, 64, 50, 0.14); border: 2px solid var(--red); position: relative; }
.result-icon.off::before, .result-icon.off::after { content: ""; position: absolute; width: 28px; height: 4px; border-radius: 2px; background: var(--red-soft); transform: rotate(45deg); }
.result-icon.off::after { transform: rotate(-45deg); }
.result-body { display: grid; gap: 14px; }
.result-body > p { font-size: 18px; color: var(--muted); }
.marked { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.marked li { font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--red); color: var(--text); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; font-size: 17px; color: var(--muted); min-height: 30px; }
.steps li strong { color: var(--text); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-weight: 800; font-size: 15px; }
.steps .call { display: block; margin-top: 10px; }
.report__preview { margin: 0; white-space: pre-wrap; font: 500 14px/1.5 var(--font); color: var(--muted); background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; }
.status { font-size: 14px; color: var(--lit) !important; min-height: 1.2em; }
.call { margin: 0; }

/* Sources */
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.sources li { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.sources strong { font-size: 16px; }
.sources a { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.screen[data-screen="sources"] > p { color: var(--muted); font-size: 16px; }

.foot { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.foot a { color: var(--muted); }

@media (min-width: 700px) {
  .screen { padding-top: 40px; }
}
