:root {
    --color-primary: #1abc9c;
    --color-secondary: #16a085;
    --color-accent: #e67e22;
    --color-bg: #ecfdf9;
    --color-text: #1b2e2b;
    --color-text-light: #4a6560;
    --color-border: #b7e4d8;
    --color-panel: rgba(255, 255, 255, 0.62);
    --font-head: "Syne", sans-serif;
    --font-body: "Commissioner", sans-serif;
    --space-lg: 28px;
    --oeb-page-w: 1120px;
    --oeb-header-h: 72px;
}

@media (max-width: 768px) {
    :root { --oeb-header-h: 64px; }
}

[hidden] { display: none !important; }

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

html, body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
}

html { scroll-padding-top: var(--oeb-header-h); }

body {
    padding-top: var(--oeb-header-h);
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(1200px 400px at 10% 0%, rgba(26, 188, 156, 0.18), transparent 60%),
        repeating-linear-gradient(180deg, transparent 0 22px, rgba(22, 160, 133, 0.04) 22px 23px);
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

h1, h2, h3 {
    font-family: var(--font-head);
    line-height: 1.15;
    margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

a { color: var(--color-secondary); }
a:not(.oeb-btn):hover { color: var(--color-accent); }

.oeb-container {
    max-width: var(--oeb-page-w);
    margin: 0 auto;
    padding: 0 20px;
}

.oeb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .oeb-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.oeb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: var(--oeb-header-h);
    background: #ecfdf9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.oeb-header a,
.oeb-header a:visited { color: #16a085; }

.oeb-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--oeb-header-h);
    gap: 16px;
}

.oeb-header__logo img {
    width: 180px;
    height: auto;
    display: block;
}

.oeb-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
}

.oeb-nav a {
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.oeb-nav a.is-active { color: var(--color-accent); }

.oeb-burger,
.oeb-overlay,
.oeb-drawer { display: none; }

.oeb-burger {
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 0;
    background: transparent;
    padding: 10px 8px;
}

.oeb-burger span {
    display: block;
    height: 2px;
    margin: 6px 0;
    background: var(--color-secondary);
}

.oeb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 50px;
    border: 2px solid var(--color-secondary);
    background: transparent;
    color: var(--color-secondary);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
}

.oeb-btn:not([hidden]) { display: inline-flex; }

.oeb-btn--primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #07332c;
}

.oeb-btn:hover { transform: scale(1.03); }

.oeb-hero {
    position: relative;
    width: 100%;
    background:
        linear-gradient(180deg, #0e6b5c 0%, #1abc9c 46%, #7ee0ce 100%);
    color: #ecfdf9;
    text-align: center;
    padding: 72px 0 48px;
    overflow: hidden;
}

.oeb-hero::after {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -18px;
    height: 90px;
    background:
        radial-gradient(60px 20px at 10% 40%, rgba(255,255,255,0.35), transparent 70%),
        radial-gradient(80px 24px at 40% 50%, rgba(255,255,255,0.28), transparent 70%),
        radial-gradient(70px 22px at 70% 40%, rgba(255,255,255,0.3), transparent 70%),
        radial-gradient(90px 26px at 92% 55%, rgba(255,255,255,0.25), transparent 70%);
    animation: oeb-wave 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes oeb-wave {
    50% { transform: translateX(18px); }
}

.oeb-hero__inner { position: relative; z-index: 1; }

.oeb-hero__title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: #fff;
}

.oeb-hero__text {
    max-width: 46rem;
    margin: 0 auto 1.4rem;
    font-size: 1.1rem;
}

.oeb-hero__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.oeb-hero .oeb-btn { color: #07332c; background: #fff; border-color: #fff; }
.oeb-hero .oeb-btn--primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

.oeb-hero__still {
    margin: 0 auto;
    max-width: 220px;
}

.oeb-hero__still img {
    width: auto;
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.oeb-block { padding: 64px 0; }

.oeb-flow .oeb-prose,
.oeb-page .oeb-prose:not(.oeb-prose--wide) {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.oeb-lead, .oeb-fine { color: var(--color-text-light); }

.oeb-fine { font-size: 0.92rem; }

[data-oeb="card"] {
    background: var(--color-panel);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 22px;
}

.oeb-rank__item {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    grid-template-areas:
        "pos pos preview"
        "icon name preview"
        "icon dev preview"
        "desc desc preview"
        "facts facts preview"
        "note note preview"
        "actions actions preview";
    gap: 8px 20px;
    margin: 24px 0;
    padding: 24px;
    border-radius: 0;
    border: 1px solid var(--color-border);
    background: var(--color-panel);
    backdrop-filter: blur(12px);
    animation: oeb-scale 0.45s ease both;
}

@keyframes oeb-scale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.oeb-rank__pos { margin: 0; font-family: var(--font-head); letter-spacing: 0.08em; color: var(--color-accent); }
.oeb-app__icon { width: 96px; height: 96px; border-radius: 22%; object-fit: contain; flex-shrink: 0; }
.oeb-rank__item .oeb-rank__pos { grid-area: pos; }
.oeb-rank__item .oeb-app__icon { grid-area: icon; }
.oeb-rank__name { grid-area: name; margin: 0; }
.oeb-rank__dev { grid-area: dev; margin: 0; color: var(--color-text-light); }
.oeb-rank__desc { grid-area: desc; }
.oeb-rank__facts { grid-area: facts; margin: 0; white-space: normal; overflow-wrap: anywhere; }
.oeb-rank__note { grid-area: note; margin: 0; font-size: 0.95rem; }
.oeb-rank__actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 10px; }
.oeb-rank__item .oeb-app__preview {
    grid-area: preview;
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 240px;
    object-fit: contain;
    justify-self: end;
}

.oeb-scroll { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
}

.oeb-pick {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    justify-content: space-between;
}

.oeb-cta {
    background: var(--color-secondary);
    color: #ecfdf9;
    padding: 64px 0;
    text-align: center;
}

.oeb-cta h2 { color: #fff; }
.oeb-cta .oeb-btn--primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

.oeb-page { padding: 48px 0 72px; }

.oeb-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
}

.oeb-form { display: grid; gap: 12px; }
.oeb-form label { display: grid; gap: 6px; font-weight: 600; }
.oeb-form input,
.oeb-form textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 10px 12px;
    font: inherit;
}

.oeb-form__err { color: #9b2c2c; }
.oeb-form__ok { color: var(--color-secondary); }

.oeb-note {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--color-border);
    background: #fff;
}

.oeb-note__band {
    display: block;
    height: 72px;
}

.oeb-note__band[data-oeb-tone="1"] { background: linear-gradient(120deg, #1abc9c, #16a085); }
.oeb-note__band[data-oeb-tone="2"] { background: linear-gradient(120deg, #16a085, #e67e22); }
.oeb-note__band[data-oeb-tone="3"] { background: linear-gradient(120deg, #0e6b5c, #1abc9c); }
.oeb-note__band[data-oeb-tone="4"] { background: linear-gradient(120deg, #e67e22, #1abc9c); }
.oeb-note__band[data-oeb-tone="5"] { background: linear-gradient(120deg, #4a6560, #1abc9c); }

.oeb-note h2, .oeb-note p { padding: 0 16px; }
.oeb-note h2 { font-size: 1.15rem; margin-top: 14px; }

.oeb-hub { list-style: none; padding: 0; margin: 0; }
.oeb-hub li {
    display: grid;
    grid-template-columns: 4.5rem 72px minmax(0, 1fr);
    gap: 12px 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}
.oeb-hub .oeb-app__icon { width: 72px; height: 72px; }
.oeb-hub h2 { margin: 0 0 4px; }
.oeb-hub__copy p { margin: 0; }

.oeb-crumbs { font-size: 0.92rem; margin-bottom: 16px; }

.oeb-passport {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 16px 20px;
    align-items: start;
    margin-bottom: 28px;
}

.oeb-passport .oeb-app__preview {
    max-width: 280px;
    max-height: 280px;
    object-fit: contain;
}

.oeb-footer {
    background: #0e3d36;
    color: #d7f5ee;
    padding: 40px 0 24px;
}

.oeb-footer a,
.oeb-footer a:visited { color: #7ee0ce; }

.oeb-footer__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.oeb-footer__label {
    font-family: var(--font-head);
    margin: 0 0 10px;
}

.oeb-footer ul { list-style: none; padding: 0; margin: 0; }
.oeb-footer li { margin: 0 0 8px; }

.oeb-footer__link {
    background: none;
    border: 0;
    padding: 0;
    color: #7ee0ce;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.oeb-cookie { display: none; }

.oeb-cookie:not([hidden]) {
    display: flex;
    position: fixed;
    z-index: 110;
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
}

.oeb-cookie--card {
    bottom: 16px;
    right: 16px;
    max-width: 360px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.oeb-cookie__actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1100px) {
    .oeb-nav { display: none; }
    .oeb-burger { display: block; }

    .oeb-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s, visibility .25s;
    }

    .oeb-drawer {
        display: block;
        position: fixed;
        z-index: 210;
        background: #ecfdf9;
        overflow-y: auto;
        visibility: hidden;
        transition: transform .3s ease, opacity .3s ease, visibility .3s;
    }

    .oeb-drawer a { display: block; padding: 14px 20px; font-size: 1.4rem; text-decoration: none; }

    .oeb-drawer__close {
        position: absolute;
        top: 12px;
        right: 16px;
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        font-size: 32px;
        line-height: 1;
    }

    .oeb-drawer--sheet {
        inset: 0;
        height: 100vh;
        height: 100dvh;
        padding: 72px 24px 32px;
        opacity: 0;
    }

    body.nav-open { overflow: hidden; }
    body.nav-open .oeb-drawer--sheet { opacity: 1; visibility: visible; }
    body.nav-open .oeb-overlay { display: none; }
}

@media (max-width: 768px) {
    .oeb-header__logo img { width: 120px; }

    .oeb-rank__item {
        grid-template-columns: 1fr;
        grid-template-areas:
            "pos"
            "icon"
            "name"
            "dev"
            "desc"
            "facts"
            "note"
            "preview"
            "actions";
    }

    .oeb-rank__item .oeb-app__preview {
        display: block;
        margin: 16px auto 0;
        justify-self: center;
    }

    .oeb-pick,
    .oeb-split,
    .oeb-passport,
    .oeb-footer__grid,
    .oeb-hub li { grid-template-columns: 1fr; display: grid; }

    .oeb-cookie--card {
        left: 12px;
        right: 12px;
        max-width: none;
        bottom: 12px;
    }

    .oeb-cookie__actions .oeb-btn { min-height: 44px; }
}

@media (max-width: 480px) {
    .oeb-hero { padding: 48px 0 32px; }
    .oeb-block, .oeb-cta { padding: 40px 0; }
}
