:root {
  --blue: #1889b3; --blue-dark: #0f6a8c; --green: #74c044; --pink: #a8107e;
  --red: #d42020; --yellow: #f0b010;
  --bg: #f4fbfd; --card: #ffffff; --text: #1d2228; --muted: #5b6670; --line: #d6e6ec;
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; overflow-y: scroll; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.55 Arial, Helvetica, sans-serif;
  display: flex; flex-direction: column;
}
.stripe { height: 6px; background: linear-gradient(90deg, var(--red), var(--yellow), var(--green), var(--blue), var(--pink)); }
main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 48px 16px 32px; }
.logo { display: block; width: 260px; max-width: 80%; height: auto; margin: 0 0 40px; }
.since { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--blue-dark); background: #dff1f7; padding: 4px 10px; border-radius: 999px; }
h1 { font-size: clamp(32px, 7vw, 46px); line-height: 1.1; margin: 16px 0; letter-spacing: -.02em; }
h1 span { color: var(--blue); }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 32px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; min-height: 330px; display: flex; flex-direction: column; }
.card > div:not([hidden]) { width: 100%; }
.card.no-email { min-height: 230px; justify-content: center; }
.card.no-email #step-start p { margin-bottom: 24px; }
.card[data-step="step-done"], .card[data-step="step-code"] { justify-content: center; }
.card > div:not([hidden]) { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .card > div:not([hidden]) { animation: none; } }
.card h2 { font-size: 18px; margin: 0 0 4px; }
.card p { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.card p.big { font-size: 24px; color: var(--text); font-weight: 700; margin-bottom: 8px; }
.card p.small { margin: 16px 0 0; font-size: 14px; }
.google-btn { height: 44px; display: flex; justify-content: center; align-items: center; }
.google-btn:not(.ready)::before { content: ""; width: 300px; max-width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
input { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); margin: 0 0 14px; }
input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.handle { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin: 0 0 6px; }
.handle span { padding: 0 0 0 12px; color: var(--muted); white-space: nowrap; }
.handle input { border: 0; padding-left: 2px; margin: 0; }
.handle:focus-within { outline: 2px solid var(--blue); outline-offset: 1px; }
.handle input:focus { outline: none; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.hint.ok { color: #2f7d16; } .hint.err { color: var(--red); }
button { width: 100%; font: inherit; font-weight: 600; color: #fff; background: var(--blue); border: 0;
  border-radius: 10px; padding: 13px; cursor: pointer; }
button:hover { background: var(--blue-dark); }
button:disabled { opacity: .6; cursor: default; }
button.link { width: auto; background: none; color: var(--blue-dark); padding: 0; font-weight: 600; text-decoration: underline; }
#turnstile { margin-top: 12px; }
#turnstile:empty { margin: 0; }
#msg { margin: 14px 0 0; font-size: 15px; min-height: 1.5em; }
#msg.ok { color: #2f7d16; } #msg.err { color: var(--red); }
.story { margin: 40px 0 0; }
.story h2 { font-size: 20px; margin: 0 0 8px; }
.story p { margin: 0 0 12px; color: var(--muted); }
footer { text-align: center; font-size: 13px; color: var(--muted); padding: 24px 16px 32px; }
.doc h2 { font-size: 20px; margin: 28px 0 8px; }
.doc p { color: var(--muted); margin: 0 0 12px; }
footer a, .doc a { color: var(--blue-dark); }
.loading { padding-top: 4px; }
.sk { background: linear-gradient(90deg, #eef4f6 25%, #f6fafb 50%, #eef4f6 75%); background-size: 200% 100%; border-radius: 8px; animation: shimmer 1.2s linear infinite; }
.sk-title { width: 55%; height: 20px; margin-bottom: 12px; }
.sk-line { width: 80%; height: 14px; margin-bottom: 28px; }
.sk-btn { width: 100%; height: 46px; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.done { text-align: center; }
.done .tick { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: #e3f4da; color: #2f7d16;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; }
.done h2 { font-size: 20px; margin-bottom: 10px; }
.card p.handle-big { font-size: clamp(28px, 6vw, 36px); font-weight: 700; color: var(--blue); margin: 0 0 6px; word-break: break-all; }
.done p { margin-bottom: 0; }
