@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(onest-cyrillic.woff2) format("woff2");
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(onest-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;
}

body.portal-login {
  --portal-paper: #f7f7fa;
  --portal-ink: #19171f;
  --portal-secondary: #65616f;
  --portal-line: #dcd9e4;
  --portal-violet: #6c38de;
  --portal-violet-hover: #5926c8;
  --portal-lilac: #c7afff;
  --sans: Onest, "Segoe UI", sans-serif;
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--portal-ink);
  background: var(--portal-paper);
  font-family: var(--sans);
  line-height: 1.5;
  color-scheme: light;
  accent-color: var(--portal-violet);
  caret-color: var(--portal-violet);
}
.portal-login::before,
.portal-login::after { display: none; }
.portal-login ::selection { color: #fff; background: #6c38de; }
.portal-login .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(420px, .87fr);
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 1920px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px;
}
.portal-story {
  position: relative;
  isolation: isolate;
  align-self: stretch;
  overflow: hidden;
  min-height: 700px;
  padding: 50px 56px 46px;
  color: #f9f7ff;
  background: #18141f;
  border-radius: 16px;
}
.portal-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.portal-brand img { display: block; width: 43px; height: 43px; object-fit: contain; }
.portal-brand strong { font-size: 25px; line-height: 1; font-weight: 760; letter-spacing: -.04em; }
.portal-brand span { margin-left: -4px; font-size: 24px; line-height: 1; font-weight: 400; letter-spacing: -.035em; }
.portal-story h2 {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 690px;
  margin: 94px 0 25px;
  color: #f9f7ff;
  font: 580 clamp(48px, 4.6vw, 76px)/1.08 var(--sans);
  letter-spacing: -.04em;
  text-transform: none;
  text-wrap: balance;
}
.portal-story h2::before, .portal-story h2::after { content: none; display: none; }
.portal-story h2 span { display: inline; color: var(--portal-lilac); }
.portal-story-description {
  position: relative;
  z-index: 2;
  max-width: 360px;
  margin: 0;
  color: #c9c2d3;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -.015em;
}
.portal-art {
  position: absolute;
  z-index: 1;
  right: -12px;
  bottom: -43px;
  width: min(30vw, 450px);
  height: auto;
  pointer-events: none;
  user-select: none;
  transform: rotate(-8deg);
}
.portal-story-bottom {
  position: absolute;
  z-index: 2;
  left: 56px;
  bottom: 48px;
  color: #e0d9e9;
  font-size: 13px;
  line-height: 1.7;
}
.portal-story-bottom p { margin: 0 0 18px; }
.portal-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; color: #aaa1ba; font-size: 12px; }
.portal-topics span + span { position: relative; }
.portal-topics span + span::before { content: ""; position: absolute; left: -10px; top: 8px; width: 2px; height: 2px; border-radius: 50%; background: #aaa1ba; }
.portal-login .sheet {
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: center;
  width: calc(100% - 88px);
  max-width: 400px;
  margin: 0;
  padding: 42px 0;
}
.portal-brand--compact { display: none; }
.portal-login .sheet h1 {
  margin: 0 0 14px;
  color: var(--portal-ink);
  font: 630 36px/1.15 var(--sans);
  text-transform: none;
  letter-spacing: -.035em;
}
.portal-login .sheet .sub {
  max-width: 360px;
  margin: 0 0 36px;
  color: var(--portal-secondary);
  font: 400 15px/1.65 var(--sans);
  letter-spacing: -.01em;
}
.portal-login .field { margin: 0 0 22px; }
.portal-login .field label {
  display: block;
  margin: 0 0 10px;
  color: #35313f;
  font: 500 14px/1.4 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.portal-login input[type=text],
.portal-login input[type=password] {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 16px 18px;
  color: var(--portal-ink);
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  outline: 0;
  box-shadow: none;
  font: 400 16px/1.5 var(--sans);
  letter-spacing: -.01em;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.portal-login input::placeholder { color: #77717f; opacity: 1; }
.portal-login input:hover { border-color: #aea5be; }
.portal-login input:focus {
  border-color: var(--portal-violet);
  box-shadow: 0 0 0 3px #6c38de1f;
}
.portal-login .password-row input { padding-right: 104px; }
.portal-login .password-toggle {
  top: 7px;
  right: 6px;
  bottom: 7px;
  min-width: 88px;
  min-height: 44px;
  padding: 0 10px;
  color: #6c617b;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: 500 12px/1 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  transition: color 160ms ease, background 160ms ease;
}
.portal-login .password-toggle:hover { color: var(--portal-violet); background: #f1ecfb; }
.portal-login .password-toggle:focus-visible,
.portal-login summary:focus-visible,
.portal-login .portal-brand:focus-visible { outline: 2px solid var(--portal-violet); outline-offset: 4px; }
.portal-login button.primary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  margin: 8px 0 0;
  padding: 17px 20px;
  color: #fff;
  background: var(--portal-violet);
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  font: 570 15px/1.5 var(--sans);
  letter-spacing: -.01em;
  text-transform: none;
  transition: background 180ms ease, transform 180ms ease;
}
.portal-login button.primary:hover { filter: none; background: var(--portal-violet-hover); }
.portal-login button.primary:active { transform: translateY(1px); }
.portal-login button.primary:focus-visible { outline: 3px solid #b99be9; outline-offset: 4px; }
.portal-login button.primary:disabled { cursor: wait; background: #8e77bc; }
.portal-help { margin-top: 30px; color: var(--portal-secondary); font-size: 13px; text-align: center; }
.portal-help summary { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 5px; cursor: pointer; list-style: none; border-radius: 6px; }
.portal-help summary::-webkit-details-marker { display: none; }
.portal-help summary::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 160ms ease; }
.portal-help[open] summary::after { transform: rotate(225deg); margin-top: 3px; }
.portal-help summary:hover { color: var(--portal-violet); }
.portal-help p { max-width: 340px; margin: 6px auto 0; font-size: 13px; line-height: 1.7; text-wrap: pretty; }
.portal-login .err { margin: 0 0 24px; padding: 14px 16px; color: #8b2544; background: #faeaf0; border: 1px solid #e4bac9; border-radius: 12px; font: 400 14px/1.5 var(--sans); }
.portal-form-footer { margin: 50px 0 0; color: #756e80; font-size: 12px; text-align: center; }

@media (min-width: 1600px) {
  .portal-story { padding: 58px 64px 52px; }
  .portal-story h2 { margin-top: 102px; }
  .portal-story-bottom { left: 64px; bottom: 52px; }
}
@media (max-width: 1199px) {
  .portal-login .wrap { grid-template-columns: minmax(0, 1fr) minmax(380px, .92fr); padding: 18px; }
  .portal-story { padding: 42px 36px; min-height: 660px; }
  .portal-story h2 { margin-top: 82px; font-size: 51px; }
  .portal-story-description { max-width: 300px; font-size: 15px; }
  .portal-story-bottom { left: 36px; bottom: 40px; }
  .portal-art { width: 340px; right: -36px; bottom: -24px; }
  .portal-login .sheet { width: calc(100% - 64px); }
  .portal-login .sheet h1 { font-size: 32px; }
}
@media (max-width: 899px) {
  .portal-login .wrap { display: flex; justify-content: center; align-items: center; min-height: 100dvh; padding: 36px 28px; }
  .portal-story { display: none; }
  .portal-brand--compact { display: inline-flex; margin: 0 0 54px; }
  .portal-brand--compact img { width: 44px; height: 44px; }
  .portal-brand--compact strong { font-size: 24px; }
  .portal-brand--compact span { font-size: 23px; }
  .portal-login .sheet { width: 100%; max-width: 400px; margin: 0; padding: 0; }
  .portal-login .sheet h1 { font-size: 32px; }
  .portal-login .sheet .sub { margin-bottom: 30px; }
  .portal-form-footer { margin-top: 48px; }
}
@media (max-width: 374px) {
  .portal-login .wrap { padding: 28px 22px; }
  .portal-login .sheet h1 { font-size: 29px; }
  .portal-brand--compact { margin-bottom: 40px; }
}
@media (max-height: 700px) and (min-width: 900px) {
  .portal-story { min-height: 610px; }
  .portal-story h2 { margin-top: 58px; }
  .portal-art { width: 330px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-login *, .portal-login *::before, .portal-login *::after { transition: none; animation: none; }
}
