@font-face{font-family:"PT Serif";src:url("/fonts/pt-serif-400-lat.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap;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:"PT Serif";src:url("/fonts/pt-serif-400-cyr.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:"PT Serif";src:url("/fonts/pt-serif-700-lat.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap;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:"PT Serif";src:url("/fonts/pt-serif-700-cyr.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:"PT Serif";src:url("/fonts/pt-serif-700-lat.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap;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:"PT Serif";src:url("/fonts/pt-serif-700-cyr.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
:root {
  color-scheme: light;
  --bg: #f4f3f0;
  --text: #1c1b19;
  --muted: #8a8680;
  --line: #d9d6d0;
  --error: #9d3b3b;
}
html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #121211;
  --text: #eceae6;
  --muted: #9c9892;
  --line: #343432;
  --error: #e0a0a0;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #121211;
    --text: #eceae6;
    --muted: #9c9892;
    --line: #343432;
    --error: #e0a0a0;
  }
}
* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "PT Serif", sans-serif;
}
main { width: min(28rem, calc(100% - 2.5rem)); margin: 18vh auto 3rem; }
h1 { margin: 0 0 1.4rem; font-size: 1.35rem; font-weight: 550; letter-spacing: 0; }
p { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.9rem; }
form { display: grid; gap: 1rem; margin-top: 0.4rem; }
label { display: grid; gap: 0.3rem; color: var(--muted); font-size: 0.75rem; }
input {
  width: 100%;
  min-height: 0;
  padding: 0.45rem 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font: inherit;
  font-size: 1rem;
}
input:focus { outline: none; border-bottom-color: var(--text); }
button {
  width: auto;
  min-height: 0;
  margin-top: 0.4rem;
  padding: 0;
  justify-self: start;
  color: var(--text);
  background: none;
  border: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.logout { margin-top: 1.6rem; }
.back { margin: 0 0 1.4rem; }
.back a { color: var(--muted); font-size: 0.82rem; text-decoration: none; }
.back a:hover { color: var(--text); }
.error { color: var(--error); }
.success { color: var(--text); }

.mark { width: 2rem; height: 2rem; display: block; margin: 0 0 1.15rem; }
.mark .plate { fill: var(--text); }
.mark .bar {
  fill: var(--bg);
  transform-box: fill-box;
  transform-origin: left center;
  animation: bar-in 0.65s cubic-bezier(.2,.7,.2,1) 0.12s both;
}
h1, form label, form > button, .logout { animation: rise 0.5s ease both; }
form label:nth-child(1) { animation-delay: 0.06s; }
form label:nth-child(2) { animation-delay: 0.12s; }
form label:nth-child(3) { animation-delay: 0.18s; }
form > button { animation-delay: 0.24s; }
.logout { animation-delay: 0.3s; }
input {
  background: linear-gradient(var(--text), var(--text)) bottom left / 0 1px no-repeat;
  transition: background-size 0.35s ease, border-color 0.2s ease;
}
input:focus { background-size: 100% 1px; border-bottom-color: transparent; }
@keyframes bar-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
