/*
Theme Name: Steponee Custom
Theme URI: https://steponeetv.local
Author: Elias
Description: Custom theme based on old DLE template
Version: 1.0
Text Domain: steponee-custom
*/

/* =========================================================
   01. Base
   02. Layout shell
   03. Header + navigation
   03.1 Live search
   04. Profile / auth / contacts
   04.1 Social auth
   05. Content helpers
   05.1 Scroll-to-top
   ========================================================= */

/* ===== 01. Base ===== */

:root {
    --so-bg: #e9edf2;
    --so-surface: #ffffff;
    --so-border: #d7dce3;
    --so-border-strong: #c9d3de;
    --so-text: #333333;
    --so-text-soft: #5d6d7d;
    --so-heading: #2d4359;
    --so-link: #2f89d9;
    --so-link-hover: #245a92;
    --so-accent: #27c3ab;
    --so-accent-dark: #1fa793;
    --so-blue: #2f89d9;
    --so-blue-dark: #256fb1;
    --so-header: rgba(92, 114, 136, 0.90);
    --so-header-solid: rgba(92, 114, 136, 0.97);
    --so-shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.08);
    --so-shadow-md: 0 10px 24px rgba(0, 0, 0, 0.12);
    --so-radius-sm: 6px;
    --so-radius-md: 10px;
    --so-radius-pill: 999px;
    --hero-shell-width: min(2600px, 100%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--so-text);
    background: var(--so-bg);
}

a {
    color: var(--so-link);
    text-decoration: none;
}

a:hover {
    color: var(--so-link-hover);
    text-decoration: underline;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.site-page {
    min-height: 100vh;
    overflow-x: visible;
}

.clear_fix::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== 02. Layout shell ===== */

.page_wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 12px 0;
}

.page_content {
    width: 100%;
}

.page-entry,
.base.fullstory {
    padding: 20px;
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    border-radius: 18px;
}

.fullstory_in {
    color: var(--so-text);
}

.torrent_pretitle {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
    color: var(--so-heading);
}

/* ===== 03. Header + navigation ===== */

.so-header {
    position: relative;
    z-index: 1000;
}

.so-header__hero {
    position: relative;
    height: 300px;
    background-color: #dfe5eb;
    background-image: url("./assets/images/header_base.webp");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: auto 300px;
    overflow: hidden;
}

.so-header__hero-logo {
    position: absolute;
    z-index: 3;
    top: 30px;
    right: max(24px, calc((100vw - 1200px) / 2 + 24px));
    width: 92px;
    transform: none;
}

.so-header__hero-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.so-header__hero-text {
    position: absolute;
    z-index: 2;
    left: max(4px, calc((100vw - 1200px) / 2 + 8px));
    bottom: 0;
    width: min(46vw, 520px);
    max-width: none;
    height: auto;
    transform: none;
    pointer-events: none;
}

.so-header__hero-text--dark {
    display: none;
}

@media (max-width: 800px) {
    .so-header__hero {
        height: 190px;
        background-position: center top;
        background-size: auto 190px;
    }

    .so-header__hero-logo {
        top: 20px;
        right: 18px;
        width: 72px;
    }

    .so-header__hero-text {
        left: 6px;
        bottom: 2px;
        width: min(64vw, 370px);
    }
}

@media (max-width: 480px) {
    .so-header__hero-logo {
        top: 16px;
        right: 14px;
        width: 64px;
    }

    .so-header__hero-text {
        left: 4px;
        bottom: 2px;
        width: 68vw;
    }
}

.so-header__bar {
    position: relative;
    z-index: 1001;
    width: var(--hero-shell-width);
    margin: -10px auto 0;
    height: 62px;
    background: linear-gradient(180deg, #667B94 0%, #586D86 100%);
}

.so-header__bar-inner {
    position: relative;
    max-width: 1200px;
    height: 62px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
}

.so-header__menu {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.so-header__menu-list {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.so-header__menu-list > li {
    position: relative;
    margin: 0;
    padding: 0;
}

.so-header__menu-list > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 10px;
    border-radius: 16px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.so-header__menu-list > li > a:hover,
.so-header__menu-list > li > a:focus-visible {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    outline: none;
}

.so-header__menu-list > .current-menu-item > a {
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}

.so-header__menu-list .sub-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: max-content;
    min-width: 0;
    max-width: min(320px, calc(100vw - 24px));
    margin: 0;
    padding: 8px 28px 8px 8px;
    list-style: none;
    background: var(--so-header-solid);
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(18, 38, 63, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 1100;
    box-sizing: border-box;
}

.so-header__menu-list .sub-menu .current-menu-item > a {
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}

.so-header__menu-list > li:hover > .sub-menu,
.so-header__menu-list > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.so-header__menu-list .sub-menu li {
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.so-header__menu-list .sub-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.25;
    white-space: nowrap;
    text-decoration: none;
    transition: background .18s ease, box-shadow .18s ease;
}

.so-header__menu-list .sub-menu a:hover,
.so-header__menu-list .sub-menu a:focus-visible {
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    text-decoration: none;
    outline: none;
}

.so-header__menu-list > .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 7px;
    margin-top: -3px;
    vertical-align: middle;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}

.so-header__search {
    width: 220px;
    min-width: 220px;
    flex: 0 0 220px;
    box-sizing: border-box;
}

.so-header__search-form {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.so-header__search-icon {
    position: absolute;
    left: 10px;
    top: 42%;
    transform: translateY(-50%);
    color: #7f8b98;
    font-size: 32px;
    line-height: 1;
    pointer-events: none;
}

.so-header__search-input {
    display: block;
    width: 100%;
    height: 30px;
    padding: 0 38px 0 34px;
    border: 1px solid #8d99a8;
    border-radius: 14px;
    background: #ffffff;
    color: var(--so-text);
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
}

.so-header__search-input::placeholder {
    color: #7d7d7d;
}

.so-header__search-clear {
    position: absolute;
    top: 49%;
    right: 10px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    color: #7f8a99;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.so-header__search-clear:hover {
    color: #2f3a4a;
}

.so-header__search-clear:focus {
    outline: none;
}

.so-header__search-clear[hidden] {
    display: none;
}

.header-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #d8e0ea;
    text-decoration: none;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    flex: 0 0 auto;
}

.header-profile:hover {
    color: #ffffff;
}

.header-profile svg {
    display: block;
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    opacity: 0.95;
    transition: opacity .15s ease, color .15s ease;
}

.header-profile:hover svg {
    opacity: 1;
}

.header-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-profile__initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    text-transform: uppercase;
}

.header-profile--logged {
    width: 42px;
    height: 42px;
}

/* ===== Header burger + mobile menu ===== */

.so-header__burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    cursor: pointer;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.so-header__burger:hover,
.so-header__burger:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
    outline: none;
}

.so-header__burger-line {
    position: relative;
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: background .18s ease, transform .22s ease;
}

.so-header__burger-line::before,
.so-header__burger-line::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .22s ease, top .22s ease, opacity .18s ease;
}

.so-header__burger-line::before {
    top: -6px;
}

.so-header__burger-line::after {
    top: 6px;
}

.so-header__burger.is-active .so-header__burger-line {
    background: transparent;
}

.so-header__burger.is-active .so-header__burger-line::before {
    top: 0;
    transform: rotate(45deg);
}

.so-header__burger.is-active .so-header__burger-line::after {
    top: 0;
    transform: rotate(-45deg);
}

.so-header__mobile {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 10px);
    padding: 14px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(112, 134, 158, 0.46) 0%, rgba(82, 104, 130, 0.58) 100%),
        rgba(88, 109, 134, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 18px 42px rgba(18, 38, 63, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
    z-index: 1200;
    box-sizing: border-box;
}

.so-header__mobile.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.so-header__mobile-menu .current-menu-item > a,
.so-header__mobile-menu .sub-menu .current-menu-item > a {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.so-header__mobile-menu,
.so-header__mobile-menu .sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.so-header__mobile-menu > li + li {
    margin-top: 6px;
}

.so-header__mobile-menu .sub-menu {
    display: none;
    margin-top: 6px;
    padding-left: 28px;
}

.so-header__mobile-menu > li > a,
.so-header__mobile-menu .sub-menu a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.2;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.055);
    box-shadow: none;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.so-header__mobile-menu > li > a:hover,
.so-header__mobile-menu > li > a:focus-visible,
.so-header__mobile-menu .sub-menu a:hover,
.so-header__mobile-menu .sub-menu a:focus-visible {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    outline: none;
}

.so-header__mobile-menu .sub-menu li + li {
    margin-top: 6px;
}

.so-header__mobile-menu .menu-item-has-children.is-open > .sub-menu {
    display: block;
}

.so-header__mobile-menu .menu-item-has-children.is-open > a::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.so-header__mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 21, 31, 0.34);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
    z-index: 1100;
}

.so-header__mobile-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.so-header__mobile-parent {
    position: relative;
}

.so-header__mobile-parent > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 50px 0 14px;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.2;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.055);
    box-shadow: none;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.so-header__mobile-parent > a:hover,
.so-header__mobile-parent > a:focus-visible {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    outline: none;
}

.so-header__mobile-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 32px;
    height: 31px;
    padding: 0;
    border: 0;
    border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.so-header__mobile-toggle:hover,
.so-header__mobile-toggle:focus-visible {
	background: rgba(255, 255, 255, 0.13);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
    outline: none;
}

.so-header__mobile-toggle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 9px;
    margin-left: -5px;
    margin-top: -5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.95;
    transition: transform .18s ease, margin-top .18s ease;
}

.so-header__mobile-menu .menu-item-has-children.is-open > .so-header__mobile-parent .so-header__mobile-toggle::before {
    transform: rotate(-135deg);
    margin-top: -2px;
}

.so-header__tools .theme-toggle {
    margin-left: 10px;
    margin-right: 7px;
}

.theme-toggle {
    position: relative;
    width: 64px;
    height: 35px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #3b4158 0%, #2b3043 100%);
    box-shadow: 0 6px 14px rgba(16, 20, 33, 0.12);
    cursor: pointer;
    overflow: hidden;
    flex: 0 0 auto;
}

.theme-toggle::before,
.theme-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%) scale(1);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    transition: opacity .18s ease, filter .18s ease, transform .18s ease;
}

.theme-toggle::before {
    left: 10px;
    background-image: url("./assets/icons/sun.svg");
}

.theme-toggle::after {
    right: 8px;
    background-image: url("./assets/icons/moon.svg");
}

html[data-theme="light"] .theme-toggle {
    background: linear-gradient(180deg, #8FA2B6 0%, #7E92A7 100%);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 4px 10px rgba(35, 50, 70, 0.14);
}

html[data-theme="dark"] .theme-toggle {
    background: linear-gradient(180deg, #3b4158 0%, #2b3043 100%);
    border-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="light"] .theme-toggle::before {
    opacity: 1;
    filter: none;
    transform: translateY(-50%) scale(1.22);
}

html[data-theme="dark"] .theme-toggle::after {
    opacity: 1;
    filter: none;
    transform: translateY(-50%) scale(1.08);
}

html[data-theme="light"] .theme-toggle::after,
html[data-theme="dark"] .theme-toggle::before {
    opacity: .30;
    filter: grayscale(1);
    transform: translateY(-50%) scale(0.74);
}

@media (min-width: 1000px) {
    .so-header__burger,
    .so-header__mobile,
    .so-header__mobile-overlay {
        display: none !important;
    }

    .so-header__menu,
    .so-header__nav {
        display: block !important;
    }

    .so-header__tools {
        display: flex !important;
        position: absolute;
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
        align-items: center;
        gap: 8px;
        z-index: 20;
    }

    .so-header__tools .so-header__search {
        width: 220px;
        min-width: 220px;
        max-width: 220px;
        flex: 0 0 220px;
    }

    .so-header__tools .so-header__search-form {
        width: 100%;
    }

    .so-header__tools .header-profile,
    .so-header__tools .header-profile.header-profile--logged {
        display: inline-flex !important;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 1000px) {
    .so-header__bar-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .so-header__menu,
    .so-header__nav {
        display: none;
    }

    .so-header__burger {
        display: inline-flex;
        position: relative;
        z-index: 1202;
        flex: 0 0 auto;
    }

    .so-header__tools {
        display: flex;
        align-items: center;
        position: static;
        transform: none;
        margin-left: auto;
        gap: 8px;
        flex: 0 1 auto;
        min-width: 0;
    }

    .so-header__tools .so-header__search {
        width: 220px;
        min-width: 220px;
        max-width: 220px;
        flex: 0 0 220px;
    }

    .so-header__tools .so-header__search-form {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .so-header__tools {
        gap: 8px;
    }

    .so-header__tools .theme-toggle {
        margin-left: 10px;
        margin-right: 7px;
    }

    .so-header__tools .so-header__search {
        width: 220px;
        min-width: 220px;
        max-width: 220px;
        flex: 0 0 220px;
    }

    .so-header__tools .so-header__search-form {
        width: 100%;
    }

    .so-header__mobile {
        left: 8px;
        right: 8px;
        padding: 12px;
    }
}

@media (max-width: 560px) {
    .so-header__bar {
        height: auto;
        min-height: 62px;
    }

    .so-header__bar-inner {
        min-height: 62px;
        gap: 8px;
    }

    .so-header__tools {
        gap: 6px;
    }

    .so-header__tools .so-header__search {
        width: 220px;
        min-width: 220px;
        max-width: 220px;
        flex: 0 0 220px;
    }

    .so-header__tools .so-header__search-form {
        width: 100%;
    }

    .so-header__search-input {
        padding-left: 30px;
        padding-right: 30px;
        font-size: 14px;
    }

    .so-header__search-icon {
        left: 8px;
        font-size: 28px;
    }

    .so-header__search-clear {
        right: 8px;
    }
}

@media (max-width: 430px) {
    .so-header__bar-inner {
        padding-left: 8px;
        padding-right: 8px;
        gap: 6px;
    }

    .so-header__tools {
        gap: 5px;
        min-width: 0;
        flex: 1 1 auto;
        justify-content: flex-end;
    }

    .so-header__tools .so-header__search {
        width: auto;
        min-width: 0;
        max-width: none;
        flex: 1 1 auto;
    }

    .so-header__tools .theme-toggle {
        width: 58px;
        height: 32px;
        margin-left: 4px;
        margin-right: 2px;
        flex: 0 0 58px;
    }

    .header-profile,
    .header-profile--logged {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
    }

    .so-header__burger {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
    }
}

html.so-mobile-menu-open,
body.so-mobile-menu-open {
    overflow: hidden;
}

/* Real mobile: denser glass */
@media (hover: none) and (pointer: coarse) {
    .so-header__mobile {
        background:
            linear-gradient(180deg, rgba(102, 123, 148, 0.58) 0%, rgba(82, 103, 128, 0.70) 100%),
            rgba(88, 109, 134, 0.52);
        border-color: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(16px) saturate(135%);
        -webkit-backdrop-filter: blur(16px) saturate(135%);
    }

    .so-header__mobile-overlay {
        background: rgba(13, 21, 31, 0.26);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }
}

/* ===== 03.1 Live search ===== */

.live-search-form {
	position: relative;
}

.live-search-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 50;
	background: #fff;
	border: 1px solid #d9e0e7;
    border-radius: 16px;
	box-shadow: 0 14px 34px rgba(18, 38, 63, 0.12);
	overflow: hidden;
}

.live-search-results__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	text-decoration: none;
	border-top: 1px solid #eef2f6;
    border-radius: 12px;
	transition: background .16s ease, box-shadow .16s ease;
}

.live-search-results__item:first-child {
	border-top: 0;
}

.live-search-results__item,
.live-search-results__item:hover,
.live-search-results__item:focus-visible,
.live-search-results__item .live-search-results__title,
.live-search-results__item:hover .live-search-results__title,
.live-search-results__item:focus-visible .live-search-results__title,
.live-search-results__item .live-search-results__subtitle,
.live-search-results__item:hover .live-search-results__subtitle,
.live-search-results__item:focus-visible .live-search-results__subtitle {
	text-decoration: none;
}

.live-search-results__item:hover,
.live-search-results__item:focus-visible {
	background: #f8fbfe;
	box-shadow:
		inset 0 0 0 1px #e3ebf3,
		0 4px 12px rgba(18, 38, 63, 0.06);
	outline: none;
}

.live-search-results__thumb {
	flex: 0 0 42px;
	width: 42px;
	height: 56px;
    border-radius: 10px;
	overflow: hidden;
	background: #eef2f6;
}

.live-search-results__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.live-search-results__thumb--empty {
	background: linear-gradient(180deg, #f3f6f9 0%, #e8eef4 100%);
}

.live-search-results__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.live-search-results__title {
	color: var(--so-heading);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
}

.live-search-results__subtitle {
	margin-top: 3px;
	color: #66788a;
	font-size: 12px;
	line-height: 1.35;
}

.live-search-results__empty {
	padding: 14px 16px;
	color: #66788a;
	font-size: 14px;
}

.search-quick-section + .search-quick-section {
	margin-top: 14px;
}

.search-quick-section__title {
	margin: 0 0 10px;
	color: var(--so-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}

.search-quick-section .live-search-results {
	position: static;
	top: auto;
	left: auto;
	right: auto;
	z-index: auto;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	overflow: visible;
}

.search-quick-section .live-search-results__item {
	min-width: 0;
	align-items: flex-start;
	padding: 10px 12px;
	border: 1px solid #d9e0e7;
    border-radius: 16px;
	background: #fff;
	box-shadow: 0 10px 24px rgba(18, 38, 63, 0.08);
}

.search-quick-section .live-search-results__item:first-child {
	border-top: 1px solid #d9e0e7;
}

.search-quick-section .live-search-results__item:hover,
.search-quick-section .live-search-results__item:focus-visible {
	background: #f8fbfe;
	box-shadow:
		inset 0 0 0 1px #e3ebf3,
		0 4px 12px rgba(18, 38, 63, 0.06);
}

.search-quick-section .live-search-results__thumb {
	flex: 0 0 52px;
	width: 52px;
	height: 70px;
}

.search-quick-section .live-search-results__text {
	min-width: 0;
}

.search-quick-section .live-search-results__title {
	font-size: 15px;
	line-height: 1.3;
}

.search-quick-section .live-search-results__subtitle {
	font-size: 13px;
}

@media (max-width: 700px) {
	.search-quick-section .live-search-results {
		grid-template-columns: 1fr;
	}

	.search-quick-section .live-search-results__thumb {
		flex: 0 0 46px;
		width: 46px;
		height: 62px;
	}
}


/* ===== 04. Profile / auth / contacts ===== */

.auth-page,
.profile-page {
    max-width: 1200px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 0 24px;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dfe7ef;
    color: var(--so-heading);
    font-size: 28px;
    font-weight: 700;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar--editable {
    position: relative;
    overflow: visible;
}

.profile-avatar__upload {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.profile-avatar__media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #dfe7ef;
}

.profile-avatar__preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.profile-avatar__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(17, 24, 39, 0.58);
    color: #fff;
    text-align: center;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.profile-avatar__upload:hover .profile-avatar__overlay,
.profile-avatar__upload:focus-visible .profile-avatar__overlay {
    opacity: 1;
}

.profile-avatar__overlay-text {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
}

.profile-avatar__hint {
    margin-top: 8px;
    color: #8b8f97;
    font-size: 13px;
    line-height: 1.4;
}

.profile-avatar-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.profile-avatar__error {
    margin-top: 8px;
    color: #c62828;
    font-size: 13px;
    line-height: 1.4;
}

.profile-summary > div,
.profile-box > div {
    margin-bottom: 8px;
}

.profile-subtitle {
    margin: 24px 0 12px;
    font-size: 20px;
    color: var(--so-heading);
}

.auth-message {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--so-radius-sm);
}

.auth-message--error {
    background: #fbe3e4;
    color: #7a1f26;
    border: 1px solid #e7b9bd;
}

.auth-message--success {
    background: #e8f8ef;
    color: #1f6b43;
    border: 1px solid #b7e0c7;
}

.auth-form__row,
.contact-form__row {
    margin-bottom: 18px;
}

.auth-form__label,
.contact-form__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-form__input,
.contact-form__input,
.contact-form__textarea {
    display: block;
    width: 100%;
    max-width: none;
    padding: 10px 12px;
    border: 1px solid #cfd6de;
    border-radius: 10px;
    background: #ffffff;
    color: var(--so-text);
    font: inherit;
}

.auth-form__input {
    height: 40px;
    max-width: 420px;
    padding: 0 12px;
}

.contact-form__input {
    min-height: 44px;
}

.contact-form__textarea {
    min-height: 220px;
    resize: vertical;
}

.auth-form__row--checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-form__actions,
.contact-form__actions {
    margin-top: 24px;
}

.contact-form__actions {
    text-align: left;
}

.auth-form__submit {
    min-width: 180px;
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--so-accent);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.auth-form__submit:hover {
    opacity: .92;
}

.profile-logout-form {
    margin-top: 16px;
}

.profile-logout-btn {
    min-width: 140px;
    border: 1px solid #b9c9da;
    background: #f7fafc;
    color: #3f6184;
    box-shadow: none;
}

.profile-logout-btn:hover,
.profile-logout-btn:focus-visible {
    background: #ffffff;
    border-color: #7aa7d6;
    color: var(--so-link);
    opacity: 1;
    outline: none;
}

.auth-form__links {
    margin-top: 14px;
}

.auth-form__links--login {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.auth-form__hint {
    margin-top: 6px;
    font-size: 12px;
    color: #66788a;
}

.profile-box {
    margin: 0 0 24px;
}

.contact-form {
    max-width: 760px;
    margin: 0;
}

.contact-form__turnstile {
    margin: 18px 0 22px;
}

.contact-form__honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.so-header__avatar img,
.profile-avatar img,
.profile-avatar .avatar,
.profile-userpic img {
    object-fit: cover;
    object-position: center;
}

.profile-page__head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.profile-page__head-spacer {
    min-width: 1px;
}

.profile-page__title {
    margin: 0;
    text-align: center;
}

.profile-page__head-actions {
    display: flex;
    justify-content: flex-end;
}

.profile-admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #b9c9da;
    background: #f7fafc;
    color: var(--so-heading);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: .18s ease;
}

.profile-admin-link:hover {
    border-color: #7aa7d6;
    color: var(--so-link);
    background: #fff;
}

.profile-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.profile-actions-row form {
    margin: 0;
}

.profile-delete-btn {
    min-width: 180px;
    border: 1px solid #d98d96;
    background: linear-gradient(180deg, #fff1f2 0%, #ffe6e8 100%);
    color: #b3434f;
    box-shadow: 0 4px 12px rgba(179, 67, 79, 0.10);
}

.profile-delete-btn:hover,
.profile-delete-btn:focus-visible {
    background: linear-gradient(180deg, #ffe8eb 0%, #ffdce1 100%);
    border-color: #c86a75;
    color: #982f3c;
    opacity: 1;
    outline: none;
}

@media (max-width: 640px) {
    .profile-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-actions-row > button,
    .profile-actions-row > form {
        width: 100%;
    }

    .profile-actions-row .auth-form__submit {
        width: 100%;
        min-width: 0;
    }
}


/* ===== 04.1 Social auth ===== */

.auth-form__actions--social {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-form__inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-form__inline .auth-form__input {
    flex: 1 1 320px;
    min-width: 220px;
}

.password-field {
    position: relative;
    max-width: 420px;
}

.password-field .auth-form__input {
    max-width: none;
    padding-right: 44px;
}

.password-field__toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #60758b;
    cursor: pointer;
    opacity: 0.78;
}

.password-field__toggle:hover {
    opacity: 1;
}

.password-field__toggle:focus-visible {
    outline: none;
    opacity: 1;
}

.password-field__icon {
    display: block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask: url("./assets/icons/eye-closed.svg") center / contain no-repeat;
    mask: url("./assets/icons/eye-closed.svg") center / contain no-repeat;
}

.password-field__toggle.is-visible .password-field__icon {
    -webkit-mask: url("./assets/icons/eye.svg") center / contain no-repeat;
    mask: url("./assets/icons/eye.svg") center / contain no-repeat;
}
.password-field__toggle.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-form__inline-note {
    font-size: 14px;
    color: #5f6b7a;
}

.auth-form__actions--social .steponee-social-button,
.auth-form__inline .steponee-social-button {
    margin-top: 0;
    white-space: nowrap;
}

.steponee-social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.steponee-social-button:hover {
    background: #f7f9fb;
    text-decoration: none;
}

.steponee-social-button--google {
    margin-top: 12px;
}

.steponee-social-notice,
.steponee-social-box {
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.steponee-social-note {
    margin-top: 10px;
}


/* ===== 05. Content helpers ===== */

.page-entry .release_title {
    text-align: center;
    color: var(--so-link);
}

/* Title status badge */
.title-status-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 5px 11px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .02em;
	text-transform: uppercase;
	border: 1px solid transparent;
}

.title-status-badge--completed {
	background: rgba(80, 130, 210, .13);
	border-color: rgba(80, 130, 210, .24);
	color: #315f9e;
}

.title-status-badge--ongoing {
	background: rgba(39, 195, 171, .14);
	border-color: rgba(39, 195, 171, .28);
	color: #168875;
}

.title-status-badge--announced {
	background: rgba(132, 101, 196, .12);
	border-color: rgba(132, 101, 196, .23);
	color: #6b4aa5;
}

.so-content-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
}

.so-content-image--left {
    float: left;
    max-width: 320px;
    margin: 0 20px 12px 0;
}

.so-content-image--right {
    float: right;
    max-width: 320px;
    margin: 0 0 12px 20px;
}

.so-content-image--center {
    margin-left: auto;
    margin-right: auto;
}

.so-content-list {
    margin: 12px 0 12px 20px;
    padding: 0;
}

.so-content-list li {
    margin-bottom: 8px;
}

/* ===== 05.1 Scroll-to-top ===== */
.scroll-top {
    position: fixed;
    right: max(18px, calc((100vw - 1400px) / 2 + 18px));
    bottom: 70px;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: rgba(47, 200, 181, 0.96);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(18, 38, 63, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.92);
    transition:
        opacity .22s ease,
        visibility .22s ease,
        transform .22s ease,
        box-shadow .22s ease,
        background .22s ease;
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-top:hover {
    background: var(--so-accent-dark);
    box-shadow: 0 14px 30px rgba(18, 38, 63, 0.24);
}

.scroll-top:active {
    transform: scale(0.96);
}

.scroll-top__icon {
    position: relative;
    z-index: 2;
    width: 28px;
    height: 28px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.0;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scroll-top__progress {
    position: absolute;
    inset: 0;
    width: 56px;
    height: 56px;
    transform: rotate(-90deg);
}

.scroll-top__track,
.scroll-top__bar {
    fill: none;
    stroke-width: 4;
}

.scroll-top__track {
    stroke: rgba(255, 255, 255, 0.22);
}

.scroll-top__bar {
    stroke: #ffffff;
    stroke-linecap: round;
    stroke-dasharray: 163.36;
    stroke-dashoffset: 163.36;
    transition: stroke-dashoffset .12s linear;
}

.scroll-top[hidden] {
    display: none;
}

@media (max-width: 700px) {
    .scroll-top {
        right: 14px;
        bottom: 86px;
        width: 52px;
        height: 52px;
    }

    .scroll-top__progress {
        width: 52px;
        height: 52px;
    }
}