/* TriFi public web pages: verify email, reset password, deep link, share.
   Served by nginx at /web.css and used by the API pages on the same origin.
   Fonts: Unbounded 600 and Golos Text 400–600 (OFL), self-hosted in /fonts
   (ops/fetch-web-fonts.py). Colors follow the app: navy splash #0D1B2A,
   primary blue darkened to 4.5:1 on white. */
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 600;font-display:swap;src:url(/fonts/golos-text-400-600-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 600;font-display:swap;src:url(/fonts/golos-text-400-600-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/unbounded-600-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/unbounded-600-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root{
  color-scheme:light dark;
  --bg:#F3F6F9;--surface:#FFFFFF;--border:#DCE3EA;--border-strong:#CBD5E0;
  --text:#0D1B2A;--muted:#51627A;
  --accent:#1565C0;--accent-hover:#0D47A1;--accent-text:#FFFFFF;--accent-soft:#E8F0FA;--ring:rgba(21,101,192,.14);--focus:#90CAF9;
  --ok:#1B7F3B;--ok-soft:#E6F4EA;--err:#B3261E;--err-soft:#FCEEED;--hover:#EEF3F8;--wave-opacity:.16
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#0D1B2A;--surface:#13243A;--border:#24405C;--border-strong:#2F4D6D;
    --text:#E8EEF4;--muted:#9FB0C2;
    --accent:#5B9BE6;--accent-hover:#7FB2EE;--accent-text:#0D1B2A;--accent-soft:#1A3350;--ring:rgba(91,155,230,.25);--focus:#BBDEFB;
    --ok:#6CCB8A;--ok-soft:#163A26;--err:#F08A84;--err-soft:#4A1E1B;--hover:#1A2F47;--wave-opacity:.12
  }
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{background:var(--bg);color:var(--text);font:16px/1.5 'Golos Text',system-ui,-apple-system,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased;text-wrap:pretty}
a{color:var(--accent)}a:hover{color:var(--accent-hover)}
h1{margin:0;font-family:'Unbounded','Golos Text',system-ui,sans-serif;font-weight:600;font-size:22px;line-height:1.25;letter-spacing:-.01em;color:var(--text)}
p{margin:0}
[hidden]{display:none !important}

.page{position:relative;overflow:hidden;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
.waves{position:absolute;left:0;top:-16px;width:100%;height:220px;opacity:var(--wave-opacity);pointer-events:none;color:var(--accent)}
.header{position:relative;display:flex;align-items:center;padding:20px 24px 8px}
.logo{display:block;height:44px;width:auto}
.main{position:relative;flex:1 1 auto;display:flex;align-items:flex-start;justify-content:center;padding:24px 20px 32px}
.footer{position:relative;padding:16px 24px 24px;text-align:center;font-size:13px;line-height:1.5;color:var(--muted)}

.card{width:100%;max-width:440px;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:28px 24px}
.state,.stack{display:flex;flex-direction:column;gap:20px}
.stack-8{display:flex;flex-direction:column;gap:8px}
.stack-10{display:flex;flex-direction:column;gap:10px}
.muted{color:var(--muted)}
.small{font-size:13px;line-height:1.5;color:var(--muted)}
.error-text{color:var(--err);font-weight:600}

.status{width:56px;height:56px;border-radius:16px;display:flex;align-items:center;justify-content:center;flex:none}
.status--ok{background:var(--ok-soft);color:var(--ok)}
.status--err{background:var(--err-soft);color:var(--err)}
.status--wait{background:var(--accent-soft)}
.ring{width:26px;height:26px;border-radius:50%;border:3px solid var(--border-strong);border-top-color:var(--accent);animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.ring{animation-duration:2.5s}}

.btn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:52px;padding:0 20px;border-radius:14px;border:1.5px solid transparent;font:inherit;font-weight:600;text-decoration:none;cursor:pointer;text-align:center}
.btn svg{flex:none}
.btn--primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}
.btn--primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:var(--accent-text)}
.btn--secondary{background:transparent;border-color:var(--border-strong);color:var(--text)}
.btn--secondary:hover{background:var(--hover);color:var(--text)}
.btn--danger{background:transparent;border-color:var(--err);color:var(--err)}
.btn--danger:hover{background:var(--err-soft);color:var(--err)}
.btn--text{background:transparent;color:var(--accent);min-height:44px}
.btn--text:hover{background:var(--hover);color:var(--accent-hover)}
.btn:disabled{opacity:.6;cursor:not-allowed}
.btn:focus-visible,.icon-btn:focus-visible,.field:focus-visible{outline:3px solid var(--focus);outline-offset:2px}

form{display:flex;flex-direction:column;gap:16px}
.field-group{display:flex;flex-direction:column;gap:8px}
label{font-size:14px;font-weight:500}
.field-wrap{position:relative}
.field{width:100%;height:52px;padding:0 52px 0 16px;border:1.5px solid var(--border-strong);border-radius:14px;background:var(--surface);color:var(--text);font:inherit;outline:none}
.field::placeholder{color:var(--muted);opacity:.8}
.field:focus{border-color:var(--accent);box-shadow:0 0 0 4px var(--ring)}
.icon-btn{position:absolute;right:6px;top:6px;width:40px;height:40px;border-radius:10px;border:none;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:center;cursor:pointer}
.icon-btn:hover{background:var(--hover)}
.hint{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.hint::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--border-strong);flex:none}
.hint--ok{color:var(--ok)}.hint--ok::before{background:var(--ok)}

/* Share pages (/reports/<id>, /stories/<id>) */
.share{width:100%;max-width:960px;display:flex;flex-wrap:wrap;align-items:flex-start;gap:24px}
.share-card{flex:999 1 360px;min-width:0;max-width:560px;background:var(--surface);border:1px solid var(--border);border-radius:20px;overflow:hidden;display:flex;flex-direction:column}
.share-aside{flex:1 1 280px;min-width:0;display:flex;flex-direction:column;gap:10px}
.author{display:flex;align-items:center;gap:12px;padding:16px 20px}
.avatar{display:block;width:44px;height:44px;border-radius:12px;object-fit:cover;background:var(--border);flex:none}
.name{font-weight:600;overflow-wrap:anywhere}
.date{font-size:13px;color:var(--muted)}
.photo{display:block;width:100%;max-height:70vh;object-fit:cover;background:var(--border)}
.body{padding:18px 20px 20px;display:flex;flex-direction:column;gap:8px}
.body--notice{padding:28px 24px;gap:16px}
.text{white-space:pre-line;overflow-wrap:anywhere}

/* SOS page /s/<code>: «Перестать быть доверенным контактом» under the signal */
.leave{display:flex;flex-direction:column;gap:12px;margin-top:20px;padding-top:16px;border-top:1px solid var(--border)}

@media (max-width:420px){.card{padding:24px 20px;border-radius:16px}}
