:root {
  color-scheme: light;
  --blue: #0067a6;
  --blue-dark: #0e4c80;
  --yellow: #eab010;
  --yellow-dark: #c99500;
  --ink: #1b2733;
  --muted: #54636f;
  --line: #d3dce3;
  --tint: #eaf3f9;
  --page: #f3f6f8;
  --error: #b3261e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 17px/1.45 Helvetica, Arial, sans-serif; }
img { display: block; max-width: 100%; }
a { color: var(--blue); }
[hidden] { display: none !important; }
a[href^="tel:"] { white-space: nowrap; }
h1, h2, .done-when { text-wrap: balance; }
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { left: -9999px; }

.top { background: var(--blue-dark); color: #fff; padding-bottom: 56px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.logo { width: 150px; height: auto; }
.top-phone { color: #fff; font-weight: 700; text-decoration: none; padding: 10px 0 10px 8px; white-space: nowrap; }
.hero h1 { margin: 16px 0 6px; font-size: 31px; line-height: 1.1; letter-spacing: -0.3px; }
.hero p { margin: 0; color: #dcebf5; }

.card { background: #fff; border-radius: 14px; padding: 18px 16px 18px; margin-top: -40px; box-shadow: 0 2px 14px rgba(14, 76, 128, .14); position: relative; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.progress span { height: 6px; border-radius: 3px; background: var(--line); transition: background .2s; }
.progress span.on { background: var(--yellow); }
.step-count { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
h2 { margin: 6px 0 12px; font-size: 25px; line-height: 1.15; color: var(--blue-dark); outline: 0; }
h3 { margin: 22px 0 2px; font-size: 19px; color: var(--blue-dark); }
.hint { margin: -4px 0 14px; color: var(--muted); font-size: 16px; }

fieldset { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
fieldset.bad legend { color: var(--error); }
legend { padding: 0; margin-bottom: 7px; font-weight: 700; font-size: 16px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 0; }
.tile, .wide-chip, .chips label { position: relative; display: block; cursor: pointer; }
.tile input, .wide-chip input, .chips input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tile { border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.tile b { display: block; text-align: center; padding: 10px 4px; }
.tile:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.tile:has(input:checked) b { background: var(--blue); color: #fff; }
.tile:has(input:focus-visible), .wide-chip:has(input:focus-visible), .chips label:has(input:focus-visible) { outline: 3px solid var(--yellow-dark); outline-offset: 2px; }
.wide-chip { grid-column: 1 / -1; }

.chips { display: grid; gap: 8px; }
.chips.one { grid-template-columns: 1fr; }
.chips.two { grid-template-columns: 1fr 1fr; }
.chips.three { grid-template-columns: 1fr 1fr 1fr; }
.chips.days { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.chips span, .wide-chip span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 6px; border: 2px solid var(--line); border-radius: 10px; text-align: center; font-size: 16px; line-height: 1.2; background: #fff; }
.chips input:checked + span, .wide-chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.chips input:disabled + span { color: #a3afb9; background: #f2f4f6; border-color: #e6ebef; text-decoration: line-through; }
.chips input:disabled { cursor: not-allowed; }
.days span { flex-direction: column; min-height: 58px; }
.days small { font-size: 13px; opacity: .85; font-weight: 400; }

.span-two { grid-column: 1 / -1; }
.field-note { margin: 4px 0 0; font-size: 14px; line-height: 1.3; color: var(--muted); }
.hint-sub { margin: 2px 0 0; }
.reading { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 16px 14px; border-radius: 10px; background: var(--tint); font-weight: 700; color: var(--blue-dark); }
.spinner { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.urgent { margin: 14px 0 0; padding: 12px; border-radius: 10px; background: #fff4d6; border: 1px solid var(--yellow); font-size: 16px; }

.photos { display: grid; gap: 12px; }
.photo { display: grid; grid-template-columns: 76px 1fr; gap: 6px 12px; align-items: start; padding: 12px; border: 2px solid var(--line); border-radius: 12px; }
.photo.bad { border-color: var(--error); }
.photo.ok { border-color: var(--blue); background: var(--tint); }
.eg { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; grid-row: span 2; }
.photo-text b { display: block; line-height: 1.2; }
.photo-text small { display: block; color: var(--muted); font-size: 14px; line-height: 1.3; margin-top: 2px; }
.photo-btn { position: relative; display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 700; cursor: pointer; }
.photo-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
.photo-btn:has(input:focus-visible) { outline: 3px solid var(--yellow-dark); outline-offset: 2px; }
.photo.ok .photo-btn { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.photo-msg { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--muted); }
.photo-msg:empty { display: none; }
.photo.bad .photo-msg { color: var(--error); }
.photo.ok .photo-msg { color: var(--blue-dark); font-weight: 700; }

.field { display: block; margin-top: 12px; font-weight: 700; font-size: 16px; }
.field input { display: block; width: 100%; margin-top: 5px; min-height: 48px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400; font-size: 17px; color: var(--ink); background: #fff; }
.field input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0, 103, 166, .22); }
.field input.bad { border-color: var(--error); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent { margin: 14px 0 0; font-size: 13px; color: var(--muted); line-height: 1.35; }

.error { margin: 14px 0 0; color: var(--error); font-weight: 700; font-size: 16px; }
.nav { display: flex; gap: 10px; margin-top: 18px; }
.nav button { min-height: 54px; border: 0; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; }
.next { flex: 1; background: var(--yellow); color: #1b2733; font-size: 18px; }
.next:hover { background: #f2bb22; }
.next:disabled { opacity: .65; cursor: wait; }
.back { padding: 0 18px; background: #fff; color: var(--blue-dark); box-shadow: inset 0 0 0 2px var(--line); }
.next:focus-visible, .back:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.done { text-align: center; padding: 26px 18px; }
.check { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: grid; place-items: center; font-size: 30px; font-weight: 700; }
.done-when { font-size: 20px; font-weight: 700; color: var(--blue-dark); margin: 0 0 10px; }

.trust { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.trust li { padding-left: 24px; position: relative; }
.trust li::before { content: "✓"; position: absolute; left: 2px; font-weight: 700; color: var(--blue); }
.trust b { color: var(--ink); }
.fine { margin: 16px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.foot { padding-top: 16px; padding-bottom: 28px; font-size: 13px; color: var(--muted); }
.foot p { margin: 0 0 8px; }

.doc { background: #fff; border-radius: 14px; padding: 18px 16px; margin: 16px auto; }
.doc h1 { color: var(--blue-dark); font-size: 26px; margin: 0 0 12px; }
.doc h2 { font-size: 19px; margin: 18px 0 4px; }
.doc p { margin: 0 0 10px; }

@media (min-width: 560px) {
  .card { padding: 24px; }
  .hero h1 { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .spinner { animation-duration: 3s; } }
