@font-face {
  font-family: "Golos TTS";
  src: url("/fonts/golos-text-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6-02DA, U+0304, U+0308, U+0329, U+2000-206F;
}
@font-face {
  font-family: "Golos TTS";
  src: url("/fonts/golos-text-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0400-052F, U+2DE0-2DFF, U+A640-A69F, U+1C80-1C8F, U+2116;
}
:root {
  color-scheme: dark;
  --bg: #15141c;
  --sidebar: #111017;
  --panel: #1b1923;
  --raised: #262330;
  --hover: #302c3c;
  --field: #17151f;
  --text: #f0edf7;
  --muted: #b6b0c6;
  --faint: #9590a7;
  --border: #393343;
  --subtle: #2b2635;
  --accent: #b7a0ff;
  --accent-hover: #ccbaff;
  --accent-bg: #302640;
  --danger: #f295a9;
  font-family: "Golos TTS", "Segoe UI", sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(ellipse 54% 52% at 18% 38%, #3324427a, transparent 74%),
    radial-gradient(ellipse 35% 44% at 93% 4%, #2920384d, transparent 78%),
    var(--sidebar);
  line-height: 1.5;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 20px; height: 20px; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { color: var(--text); background: var(--accent-bg); }
.site-shell { display: flex; flex-direction: column; min-height: 100dvh; }
.site-header, .site-footer, .auth-layout, .downloads-layout { width: min(100% - 88px, 1220px); margin-inline: auto; }
.site-header {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  border-bottom: 1px solid var(--subtle);
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-icon { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--raised); }
.brand-icon img { width: 38px; height: 38px; object-fit: contain; border-radius: 12px; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.025em; }
.header-rule { width: 1px; height: 21px; background: var(--border); }
.header-server { min-width: 0; overflow: hidden; color: var(--faint); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.header-end { display: flex; align-items: center; gap: 14px; min-width: 0; margin-left: auto; }
.access-label, .form-index, .section-index, .visual-label, .eyebrow, .release-badge { font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.access-label { color: var(--faint); white-space: nowrap; }
.account-chip { display: inline-flex; align-items: center; gap: 9px; max-width: 230px; min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #b7a0ff20; }
.logout { margin: 0; }
.logout button { min-height: 38px; padding: 7px 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--raised); color: var(--muted); font-size: 13px; }
.logout button:hover { border-color: var(--accent); background: var(--hover); color: var(--text); }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 58px; border-top: 1px solid var(--subtle); color: var(--faint); font-size: 12px; }
.site-footer span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); }
.eyebrow-line { width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(370px, 444px); align-items: center; gap: clamp(48px, 7vw, 110px); flex: 1; padding-block: 62px 74px; }
.auth-intro { display: flex; flex-direction: column; justify-content: center; min-width: 0; align-self: stretch; }
.auth-intro h1 { margin: 24px 0 18px; font-size: clamp(58px, 6.4vw, 86px); font-weight: 600; letter-spacing: -.065em; line-height: 1.01; }
.auth-intro h1 span { color: var(--accent); }
.auth-intro > p { max-width: 460px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.intro-features { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.intro-features span { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 100px; background: #1b1923a6; color: var(--muted); font-size: 12px; }
.intro-features i { display: block; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.intro-visual {
  position: relative;
  isolation: isolate;
  width: min(100%, 525px);
  height: clamp(242px, 23vw, 300px);
  overflow: hidden;
  margin-top: 34px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at 71% 51%, #7046815a, transparent 44%),
    linear-gradient(130deg, #272131, #1a1723 68%);
  box-shadow: 0 18px 48px #0003;
}
.intro-visual::after { content: ""; position: absolute; z-index: 0; width: 300px; height: 300px; right: 0; top: 50%; transform: translateY(-50%); border: 1px solid #b7a0ff2b; border-radius: 50%; }
.visual-grid { position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(#b7a0ff17 1px, transparent 1px), linear-gradient(90deg, #b7a0ff17 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(90deg, #000, transparent 80%); }
.visual-label { position: absolute; z-index: 2; top: 21px; left: 22px; color: var(--accent); }
.portal-mascot { position: absolute; z-index: 1; isolation: isolate; aspect-ratio: 1; pointer-events: none; }
.portal-mascot-intro { right: 14px; bottom: 12px; height: calc(100% - 24px); max-width: calc(100% - 28px); }
.portal-mascot-connect { top: 13px; left: 50%; height: calc(100% - 26px); max-width: calc(100% - 26px); transform: translateX(-50%); }
.portal-mascot-aura { position: absolute; z-index: -1; inset: -6%; border-radius: 38%; background: radial-gradient(circle at 42% 38%, #f2a1c433, transparent 55%), radial-gradient(circle at 65% 65%, #b7a0ffb0, transparent 65%); filter: blur(17px); animation: portal-aura 8s ease-in-out infinite; }
.portal-mascot img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 19px; box-shadow: 0 16px 36px #0005; transform-origin: 50% 70%; animation: portal-float 8s ease-in-out infinite; }
.portal-mascot-spark { position: absolute; z-index: 2; width: 4px; height: 4px; border-radius: 50%; background: #f8d9ff; box-shadow: 0 0 9px 3px #d8a9fa66; animation: portal-spark 6.5s ease-in-out infinite; }
.portal-mascot-spark.spark-one { top: 10%; left: 8%; }
.portal-mascot-spark.spark-two { top: 24%; right: 6%; animation-delay: -2.1s; }
.portal-mascot-spark.spark-three { bottom: 17%; right: 7%; animation-delay: -4.2s; }
@keyframes portal-float { 0%, 100% { transform: translateY(0) rotate(-.35deg) scale(1); } 50% { transform: translateY(-5px) rotate(.35deg) scale(1.012); } }
@keyframes portal-aura { 0%, 100% { transform: scale(.97); opacity: .58; } 50% { transform: scale(1.04); opacity: .8; } }
@keyframes portal-spark { 0%, 100% { transform: translateY(4px) scale(.75); opacity: .15; } 50% { transform: translateY(-8px) scale(1); opacity: .8; } }

.auth-card { width: 100%; padding: 31px; border: 1px solid var(--border); border-radius: 22px; background: var(--panel); box-shadow: 0 24px 66px #0005, 0 2px 12px #0003; }
.auth-card-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.form-index, .section-index { color: var(--accent); }
.form-lock { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); color: var(--accent); }
.form-lock svg { width: 18px; height: 18px; }
.auth-card h2 { margin: 17px 0 6px; font-size: 29px; font-weight: 600; letter-spacing: -.035em; line-height: 1.2; }
.form-intro { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.form-error { display: flex; align-items: flex-start; gap: 9px; padding: 12px; margin-bottom: 20px; border: 1px solid #704052; border-radius: 11px; background: #33202d; color: #ffc9d3; font-size: 13px; line-height: 1.45; }
.form-error span { display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #33202d; font-size: 12px; font-weight: 800; }
.field { margin-bottom: 19px; }
.field label { display: block; margin-bottom: 8px; color: var(--text); font-size: 13px; font-weight: 600; }
.field input, .copy-field input { width: 100%; min-width: 0; height: 48px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--field); color: var(--text); outline: none; font-size: 15px; }
.field input:hover, .copy-field input:hover { border-color: #645a71; }
.field input:focus, .copy-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #b7a0ff21; }
.field small { display: block; margin-top: 7px; color: var(--faint); font-size: 12px; line-height: 1.4; }
.password-field { position: relative; }
.password-field input { padding-right: 95px; }
.password-field button { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); min-height: 34px; padding: 4px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.password-field button:hover { background: var(--raised); color: var(--text); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 48px; padding: 11px 17px; border: 1px solid transparent; border-radius: 12px; font-size: 14px; font-weight: 600; line-height: 1.2; transition: background .16s, border-color .16s, transform .16s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--accent); color: #17121f; }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { border-color: var(--border); background: var(--raised); color: var(--text); }
.button-secondary:hover { border-color: var(--accent); background: var(--hover); }
.submit-button { width: 100%; justify-content: space-between; margin-top: 5px; }
.submit-button svg { width: 19px; height: 19px; }
.form-bottom { margin-top: 26px; padding-top: 21px; border-top: 1px solid var(--subtle); color: var(--muted); font-size: 13px; }
.form-bottom a { margin-left: 4px; color: var(--accent); font-weight: 600; }
.form-bottom a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

.downloads-layout { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(310px, .82fr); align-items: start; gap: clamp(30px, 4.5vw, 68px); flex: 1; padding-block: 76px 88px; }
.downloads-main { min-width: 0; }
.downloads-main h1 { margin: 20px 0 15px; font-size: clamp(44px, 5.1vw, 66px); font-weight: 600; letter-spacing: -.055em; line-height: 1.08; }
.title-period { color: var(--accent); }
.page-lead { max-width: 610px; margin: 0 0 34px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.featured-release { position: relative; overflow: hidden; padding: 28px; border: 1px solid #55466d; border-radius: 21px; background: radial-gradient(circle at 100% 0%, #563c7440, transparent 47%), var(--panel); box-shadow: 0 16px 46px #0003; }
.featured-release::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent 75%); }
.platform-release { margin-top: 16px; }
.featured-topline { display: flex; align-items: center; gap: 12px; }
.release-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #655579; border-radius: 13px; background: var(--accent-bg); color: var(--accent); }
.release-mark svg { width: 22px; height: 22px; }
.release-badge { color: var(--accent); }
.release-version { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 600; }
.featured-release h2 { margin: 23px 0 7px; font-size: 24px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.featured-release p { max-width: 520px; margin: 0; color: var(--muted); font-size: 14px; }
.release-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.release-actions .button { min-height: 46px; }
.release-actions .button svg { width: 18px; height: 18px; }
.button-meta { padding-left: 4px; font-size: 12px; opacity: .75; }
.release-empty { padding: 24px; border: 1px dashed #665978; border-radius: 17px; background: var(--panel); }
.release-empty strong { font-size: 16px; }
.release-empty p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.archive { margin-top: 28px; border-top: 1px solid var(--subtle); }
.archive summary { display: flex; align-items: center; gap: 8px; min-height: 60px; list-style: none; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.archive summary::-webkit-details-marker { display: none; }
.archive summary > span { display: grid; place-items: center; min-width: 23px; height: 23px; padding: 0 6px; border-radius: 7px; background: var(--raised); color: var(--muted); font-size: 11px; }
.archive summary svg { width: 16px; height: 16px; margin-left: auto; color: var(--muted); transition: transform .16s; }
.archive[open] summary svg { transform: rotate(180deg); }
.archive-list { padding-bottom: 6px; border-top: 1px solid var(--subtle); }
.archive-row { display: flex; align-items: center; gap: 16px; min-height: 49px; padding: 8px 6px; border-bottom: 1px solid var(--subtle); color: var(--muted); font-size: 13px; }
.archive-row:hover { background: #ffffff08; color: var(--text); }
.archive-name { min-width: 0; overflow-wrap: anywhere; }
.archive-size { flex: none; margin-left: auto; color: var(--faint); }
.archive-row svg { flex: none; width: 16px; height: 16px; color: var(--accent); }
.connect-card { overflow: hidden; margin-top: 20px; border: 1px solid var(--border); border-radius: 21px; background: var(--panel); box-shadow: 0 16px 46px #0003; }
.connect-visual { position: relative; display: grid; place-items: center; height: 245px; overflow: hidden; border-bottom: 1px solid var(--border); background: radial-gradient(circle at 50% 60%, #70468165, transparent 54%), linear-gradient(145deg, #282132, #1a1723); }
.connect-visual::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#b7a0ff18 1px, transparent 1px), linear-gradient(90deg, #b7a0ff18 1px, transparent 1px); background-size: 30px 30px; }
.connect-visual .portal-mascot img { border-radius: 18px; box-shadow: 0 15px 35px #0006; }
.connect-content { padding: 26px; }
.connect-content h2 { margin: 10px 0 18px; font-size: 23px; font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }
.connect-steps { margin: 0 0 25px; padding: 0; list-style: none; counter-reset: setup; }
.connect-steps li { display: flex; align-items: baseline; gap: 11px; margin: 10px 0; color: var(--muted); font-size: 13px; }
.connect-steps li::before { content: counter(setup, decimal-leading-zero); counter-increment: setup; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.copy-label { display: block; margin-bottom: 8px; color: var(--text); font-size: 13px; font-weight: 600; }
.copy-field { display: flex; min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--field); }
.copy-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #b7a0ff21; }
.copy-field input { height: 44px; border: 0; background: transparent; box-shadow: none !important; font-size: 13px; }
.copy-field button { display: grid; place-items: center; flex: none; width: 44px; border: 0; border-left: 1px solid var(--border); border-radius: 0 11px 11px 0; background: transparent; color: var(--muted); }
.copy-field button:hover { background: var(--raised); color: var(--accent); }
.copy-field button svg { width: 17px; height: 17px; }
.copy-feedback { min-height: 17px; margin: 5px 0 0; color: var(--accent); font-size: 11px; }

@media (max-width: 960px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 36px; }
  .auth-intro h1 { font-size: clamp(48px, 6.2vw, 68px); }
  .intro-visual { height: 238px; }
  .downloads-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
}
@media (max-width: 760px) {
  .site-header, .site-footer, .auth-layout, .downloads-layout { width: min(100% - 36px, 560px); }
  .site-header { min-height: 72px; gap: 12px; }
  .header-rule, .header-server, .access-label { display: none; }
  .auth-layout, .downloads-layout { grid-template-columns: minmax(0, 1fr); }
  .auth-layout { gap: 24px; align-items: start; padding-block: 36px 56px; }
  .auth-intro h1 { margin: 16px 0 10px; font-size: clamp(40px, 8vw, 58px); line-height: 1.02; }
  .auth-intro > p { font-size: 14px; }
  .intro-features { display: none; }
  .intro-visual { height: 166px; margin-top: 20px; }
  .intro-visual .visual-label { top: 16px; left: 16px; }
  .portal-mascot-intro { right: 12px; bottom: 12px; height: calc(100% - 24px); }
  .auth-card { padding: 26px; }
  .downloads-layout { gap: 27px; padding-block: 42px 62px; }
  .downloads-main h1 { font-size: clamp(40px, 8vw, 57px); }
  .page-lead { margin-bottom: 26px; font-size: 14px; }
  .connect-card { margin-top: 0; }
  .connect-visual { height: 195px; }
}
@media (max-width: 420px) {
  .site-header, .site-footer, .auth-layout, .downloads-layout { width: calc(100% - 28px); }
  .brand-name { font-size: 17px; }
  .account-chip { max-width: 120px; font-size: 12px; }
  .auth-card { padding: 21px; }
  .auth-card h2 { font-size: 27px; }
  .auth-intro h1 { font-size: 38px; }
  .featured-release { padding: 21px; }
  .release-actions { display: grid; }
  .release-actions .button { width: 100%; }
  .site-footer span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .archive summary svg { transition: none; }
  .portal-mascot-aura, .portal-mascot img, .portal-mascot-spark { animation: none; }
}
/* The browser-to-desktop handoff shares the portal's type and palette. */
.desktop-auth-page { min-height: 100svh; display: grid; place-items: center; padding: 32px 20px; }
.desktop-auth-card { width: min(100%, 460px); padding: 32px; border: 1px solid #393042; border-radius: 24px; background: #1c1823; box-shadow: 0 24px 80px #05020855; text-align: center; }
.desktop-auth-card .mascot-scene { width: 140px; height: 140px; margin: 0 auto 28px; position: relative; }
.desktop-auth-card .mascot-scene img { width: 140px; height: 140px; border-radius: 30px; object-fit: contain; position: relative; }
.desktop-auth-card .eyebrow { font-size: 11px; letter-spacing: .12em; color: #bca2ef; }
.desktop-auth-card h1 { margin: 14px 0; font-size: 28px; line-height: 1.25; letter-spacing: -.035em; }
.desktop-auth-card p { color: #bfb1cc; font-size: 15px; line-height: 1.65; }
.desktop-auth-card p strong { color: #eee4f8; font-weight: 600; }
.desktop-auth-card form { margin-top: 28px; }
.desktop-auth-card button { display: flex; justify-content: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; border-radius: 13px; color: #1b122b; background: #b69bea; font: inherit; font-weight: 500; cursor: pointer; }
.desktop-auth-card button:hover { background: #c8aff6; }
.desktop-auth-card .desktop-auth-hint { margin-top: 18px; color: #a294af; font-size: 13px; }
.desktop-auth-cancel { display: inline-block; margin-top: 8px; font-size: 13px; color: #b9a8ce; }
@media(max-width: 540px) { .desktop-auth-card { padding: 26px 22px; } .desktop-auth-card h1 { font-size: 25px; } }
