:root {
    --bg: #f7f4fb;
    --bg_soft: #fcfaff;
    --panel: rgba(255, 255, 255, 0.88);
    --panel_solid: #ffffff;
    --ink: #243047;
    --muted: #6f7485;
    --line: rgba(64, 54, 92, 0.14);
    --brand: #9b8bd7;
    --brand_dark: #5d518d;
    --accent: #4d8b88;
    --warning: #b7791f;
    --shadow: 0 24px 60px rgba(57, 48, 85, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Verdana, "Segoe UI", sans-serif;
    background:
        linear-gradient(rgba(155, 139, 215, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(155, 139, 215, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, var(--bg_soft) 0%, var(--bg) 100%);
    background-size: 30px 30px, 30px 30px, auto;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.app_shell {
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    gap: 24px;
    width: min(1360px, calc(100% - 28px));
    min-height: calc(100vh - 28px);
    margin: 14px auto;
}

.sidebar,
.topbar,
.project_card,
.cookie_banner,
.cookie_panel,
.policy_shell {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.sidebar {
    position: sticky;
    top: 14px;
    align-self: start;
    min-height: calc(100vh - 28px);
    padding: 18px;
    border-radius: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px 22px;
    text-decoration: none;
}

.brand_mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand_dark));
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.08rem;
}

.brand small {
    margin-top: 3px;
    color: var(--muted);
}

.menu {
    display: grid;
    gap: 9px;
}

.menu_secondary {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.menu_link {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--ink);
    background: transparent;
    text-align: left;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.menu_link:hover,
.menu_link:focus-visible,
.menu_link.is_active {
    border-color: rgba(93, 81, 141, 0.18);
    color: var(--brand_dark);
    background: rgba(155, 139, 215, 0.12);
    outline: none;
}

.menu_button {
    appearance: none;
}

.main_content {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    border-radius: 22px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    font-weight: 800;
}

h1,
h2,
p {
    margin-top: 0;
}

h1,
h2 {
    font-family: Georgia, "Times New Roman", serif;
}

h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.topbar_text {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.55;
}

.status_pill {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--brand_dark);
    background: rgba(155, 139, 215, 0.14);
    font-size: 0.92rem;
    font-weight: 800;
}

.project_grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.project_card {
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
    border-radius: 18px;
}

.project_image,
.project_placeholder {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #eee9f8;
}

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

.project_placeholder {
    display: grid;
    place-items: center;
    color: var(--brand_dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 7vw, 4rem);
    font-weight: 700;
    background:
        linear-gradient(135deg, rgba(155, 139, 215, 0.18), rgba(77, 139, 136, 0.14)),
        var(--panel_solid);
}

.project_body {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 10px;
    padding: 18px;
}

.project_body h2 {
    margin-bottom: 0;
    font-size: 1.35rem;
}

.project_body p {
    margin-bottom: 4px;
    color: var(--muted);
    line-height: 1.55;
}

.project_status {
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.project_status.is_ok {
    color: #256157;
    background: rgba(77, 139, 136, 0.14);
}

.project_status.is_test {
    color: var(--brand_dark);
    background: rgba(155, 139, 215, 0.14);
}

.project_status.is_private,
.project_status.is_future {
    color: var(--brand_dark);
    background: rgba(155, 139, 215, 0.14);
}

.project_button,
.solid_button,
.ghost_button,
.policy_back {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
}

.project_button {
    width: 100%;
    padding: 0 16px;
    color: #ffffff;
    background: var(--brand_dark);
}

.project_button:hover,
.project_button:focus-visible,
.solid_button:hover,
.solid_button:focus-visible {
    background: #4f4578;
    outline: none;
}

.project_button.is_disabled {
    pointer-events: none;
    color: var(--muted);
    background: rgba(111, 116, 133, 0.14);
}

.cookie_banner {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;
    width: min(560px, calc(100% - 36px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
}

.cookie_banner[hidden],
.cookie_modal[hidden] {
    display: none;
}

.cookie_banner p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.cookie_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.solid_button,
.ghost_button {
    min-width: 112px;
    padding: 0 14px;
    border: 1px solid transparent;
    cursor: pointer;
}

.solid_button {
    color: #ffffff;
    background: var(--brand_dark);
}

.ghost_button {
    color: var(--brand_dark);
    background: rgba(155, 139, 215, 0.12);
    border-color: rgba(93, 81, 141, 0.16);
}

.cookie_modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(36, 48, 71, 0.26);
}

.cookie_panel {
    position: relative;
    width: min(620px, 100%);
    padding: 28px;
    border-radius: 20px;
}

.cookie_panel h2 {
    margin-bottom: 12px;
    font-size: 1.8rem;
}

.cookie_panel p {
    color: var(--muted);
    line-height: 1.6;
}

.modal_close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    color: var(--brand_dark);
    background: rgba(155, 139, 215, 0.14);
    cursor: pointer;
    font-size: 1.5rem;
}

.cookie_option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.policy_page {
    width: min(920px, calc(100% - 28px));
    margin: 28px auto;
}

.policy_shell {
    padding: clamp(24px, 4vw, 42px);
    border-radius: 22px;
}

.policy_shell h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.policy_shell h2 {
    margin-top: 26px;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.policy_shell p,
.policy_shell li {
    color: var(--muted);
    line-height: 1.68;
}

.policy_back {
    width: fit-content;
    margin-bottom: 24px;
    padding: 0 14px;
    color: var(--brand_dark);
    background: rgba(155, 139, 215, 0.12);
}

@media (max-width: 1080px) {
    .project_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .app_shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        min-height: auto;
    }

    .menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .app_shell,
    .policy_page {
        width: min(100% - 18px, 1360px);
        margin: 9px auto;
    }

    .menu,
    .project_grid {
        grid-template-columns: 1fr;
    }

    .sidebar,
    .topbar,
    .project_card,
    .policy_shell {
        border-radius: 16px;
    }

    .topbar,
    .policy_shell {
        padding: 22px;
    }

    .cookie_banner {
        align-items: stretch;
        flex-direction: column;
    }

    .cookie_actions {
        width: 100%;
    }

    .solid_button,
    .ghost_button {
        flex: 1 1 140px;
    }
}
