:root {
    color-scheme: dark;
    --bg: #07110f;
    --panel: rgba(9, 19, 18, .76);
    --panel-strong: rgba(13, 28, 26, .94);
    --text: #f3fbf8;
    --muted: #9fb6af;
    --line: rgba(201, 255, 232, .18);
    --accent: #48f0a4;
    --accent-strong: #58d8ff;
    --warm: #f6c15f;
    --shadow: rgba(0, 0, 0, .45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 20%, rgba(72, 240, 164, .18), transparent 28rem),
        radial-gradient(circle at 82% 18%, rgba(88, 216, 255, .13), transparent 30rem),
        linear-gradient(140deg, #07110f, #0b1715 44%, #081210);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(30deg, rgba(201, 255, 232, .09) 1px, transparent 1px),
        linear-gradient(150deg, rgba(201, 255, 232, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 255, 232, .055) 1px, transparent 1px);
    background-size: 88px 51px;
    opacity: .62;
    mask-image: linear-gradient(to bottom, black, rgba(0, 0, 0, .72), transparent 92%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 28% 36%, rgba(72, 240, 164, .34) 0 2px, transparent 3px),
        radial-gradient(circle at 44% 24%, rgba(88, 216, 255, .3) 0 2px, transparent 3px),
        radial-gradient(circle at 68% 42%, rgba(246, 193, 95, .28) 0 2px, transparent 3px),
        linear-gradient(rgba(255, 255, 255, .035), transparent);
    background-size: 176px 102px, 176px 102px, 176px 102px, auto;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    background: rgba(7, 17, 15, .8);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(72, 240, 164, .55);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(72, 240, 164, .24), rgba(88, 216, 255, .16)),
        rgba(9, 19, 18, .9);
    color: var(--accent);
    font-weight: 900;
    box-shadow: 0 16px 42px rgba(72, 240, 164, .16);
}

.brand strong {
    letter-spacing: 0;
}

.brand small {
    display: block;
    max-width: 360px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1 1 420px;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

nav a,
.auth-panel a,
.filters a,
.language-switcher a {
    border: 1px solid rgba(201, 255, 232, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
    padding: 9px 12px;
}

nav a:hover,
.auth-panel a:hover,
.filters a:hover,
.language-switcher a:hover {
    border-color: rgba(72, 240, 164, .44);
    color: var(--text);
}

.auth-panel {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.auth-panel a {
    padding: 8px 11px;
}

.auth-panel .editor-link {
    border-color: rgba(246, 193, 95, .42);
    color: var(--warm);
}

.language-switcher {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
}

.language-switcher a {
    min-width: 38px;
    padding: 8px 9px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.language-switcher a.active {
    border-color: rgba(72, 240, 164, .62);
    background: linear-gradient(135deg, rgba(72, 240, 164, .24), rgba(88, 216, 255, .16));
    color: var(--text);
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    min-height: 390px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    align-items: end;
    gap: 32px;
    padding: 72px 0 38px;
}

.eyebrow,
.category {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    line-height: 1.08;
    margin: 0;
}

.hero h1 {
    max-width: 900px;
    margin-top: 12px;
    font-size: clamp(42px, 8vw, 92px);
}

.hero p {
    max-width: 710px;
    color: var(--muted);
    font-size: 18px;
}

.hero-panel,
.stats div,
.lane,
.card,
.author-card,
.setup-banner,
.search input {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-panel,
.stats div {
    padding: 22px;
}

.hero-panel {
    position: relative;
    overflow: hidden;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(72, 240, 164, .18);
    border-radius: 8px;
    background-image:
        linear-gradient(30deg, rgba(88, 216, 255, .1) 1px, transparent 1px),
        linear-gradient(150deg, rgba(72, 240, 164, .11) 1px, transparent 1px);
    background-size: 42px 24px;
    opacity: .7;
}

.hero-panel strong,
.stats strong {
    position: relative;
    display: block;
    color: var(--accent);
    font-size: 40px;
    line-height: 1;
}

.hero-panel span,
.stats span {
    position: relative;
    color: var(--muted);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 22px;
}

.filters a {
    color: var(--muted);
}

.filters a.active {
    background: linear-gradient(135deg, rgba(72, 240, 164, .22), rgba(88, 216, 255, .15));
    border-color: rgba(72, 240, 164, .54);
    color: var(--text);
}

.filters span {
    opacity: .75;
}

.setup-banner {
    padding: 22px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, rgba(246, 193, 95, .13), rgba(9, 19, 18, .76));
    border-color: rgba(246, 193, 95, .32);
}

.setup-banner h2 {
    margin-top: 8px;
    font-size: 26px;
}

.setup-banner p,
.lane p,
.card p,
.author-card p {
    color: var(--muted);
}

.search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 0 0 24px;
}

.search.standalone {
    margin-top: 24px;
}

.search input {
    min-width: 0;
    padding: 12px 14px;
    font: inherit;
    color: var(--text);
}

.search button,
.source {
    border: 1px solid rgba(72, 240, 164, .5);
    border-radius: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(72, 240, 164, .95), rgba(88, 216, 255, .78));
    color: #06110f;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.editorial-lanes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 0 0 28px;
}

.lane {
    display: grid;
    gap: 10px;
    min-height: 210px;
    padding: 22px;
}

.lane h2 {
    font-size: 28px;
}

.lane strong,
.back,
.lead,
.author-card strong {
    color: var(--accent-strong);
}

.grid,
.authors-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 56px;
}

.card {
    min-height: 430px;
    transition: transform .16s ease, border-color .16s ease;
    overflow: hidden;
}

.card:hover,
.lane:hover,
.author-card:hover {
    transform: translateY(-2px);
    border-color: rgba(72, 240, 164, .42);
}

.card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px 14px 18px;
}

.card-visual,
.article-visual {
    position: relative;
    margin-bottom: 16px;
}

.article-visual {
    margin: 24px 0;
}

.card-media,
.article-media {
    display: block;
    width: 100%;
    border: 1px solid rgba(201, 255, 232, .13);
    border-radius: 8px;
    background: rgba(7, 17, 15, .82);
    object-fit: cover;
}

.card-media {
    aspect-ratio: 16 / 9;
}

.article-visual .card-media,
.article-media {
    max-height: 420px;
}

.card-media-fallback {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 22% 26%, hsla(var(--tile-hue), 78%, 64%, .42) 0 2px, transparent 3px),
        radial-gradient(circle at 72% 34%, rgba(88, 216, 255, .42) 0 2px, transparent 3px),
        radial-gradient(circle at 48% 72%, rgba(246, 193, 95, .38) 0 2px, transparent 3px),
        linear-gradient(30deg, hsla(var(--tile-hue), 76%, 56%, .22) 1px, transparent 1px),
        linear-gradient(150deg, rgba(88, 216, 255, .16) 1px, transparent 1px),
        linear-gradient(135deg, hsla(var(--tile-hue), 62%, 28%, .34), rgba(9, 19, 18, .98) 58%, rgba(88, 216, 255, .17));
    background-size: 76px 44px, 88px 52px, 96px 54px, 38px 22px, 38px 22px, auto;
}

.card-media-fallback::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(72, 240, 164, .2);
    border-radius: 8px;
}

.tile-grid {
    position: absolute;
    inset: 0;
    opacity: .48;
    background:
        linear-gradient(90deg, rgba(201, 255, 232, .08) 1px, transparent 1px),
        linear-gradient(rgba(201, 255, 232, .07) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(circle at center, black, transparent 74%);
}

.tile-orbit {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(201, 255, 232, .15);
    border-radius: 50%;
    box-shadow:
        inset 0 0 34px rgba(72, 240, 164, .08),
        0 0 42px rgba(88, 216, 255, .08);
}

.tile-mark {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(72, 240, 164, .48);
    border-radius: 8px;
    background:
        linear-gradient(135deg, hsla(var(--tile-hue), 78%, 56%, .3), rgba(7, 17, 15, .82)),
        rgba(7, 17, 15, .72);
    color: var(--accent);
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
}

.tile-source {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 1;
    max-width: calc(100% - 28px);
    overflow: hidden;
    color: rgba(243, 251, 248, .78);
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.visual-badges {
    position: absolute;
    inset: 10px 10px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}

.visual-badges span {
    max-width: 100%;
    overflow: hidden;
    border: 1px solid rgba(201, 255, 232, .18);
    border-radius: 8px;
    background: rgba(7, 17, 15, .66);
    color: rgba(243, 251, 248, .86);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
    padding: 6px 8px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.card h2 {
    margin-top: 12px;
    font-size: 22px;
}

.card footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.article,
.status,
.empty {
    max-width: 820px;
    padding: 54px 0 72px;
}

.section-heading {
    padding-bottom: 18px;
}

.article h1 {
    margin-top: 12px;
    font-size: clamp(34px, 6vw, 64px);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted);
    margin: 18px 0 26px;
}

.lead {
    font-size: 22px;
}

.content {
    font-size: 18px;
}

.source {
    display: inline-block;
    margin-top: 22px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    padding: 54px 0 72px;
}

.auth-copy,
.auth-card,
.workflow-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px var(--shadow);
    backdrop-filter: blur(14px);
}

.auth-copy,
.auth-card,
.workflow-card {
    padding: 24px;
}

.auth-copy h1 {
    margin: 10px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
}

.auth-copy p,
.auth-card p,
.workflow-card p,
.workflow-card li {
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.auth-form input,
.auth-form textarea,
.auth-form select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(7, 17, 15, .8);
    color: var(--text);
    font: inherit;
    padding: 11px 12px;
}

.auth-form textarea {
    min-height: 126px;
    resize: vertical;
}

.auth-form button {
    border: 1px solid rgba(72, 240, 164, .5);
    border-radius: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(72, 240, 164, .95), rgba(88, 216, 255, .78));
    color: #06110f;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.preview-notice {
    border: 1px solid rgba(246, 193, 95, .34);
    border-radius: 8px;
    background: rgba(246, 193, 95, .1);
    color: var(--warm);
    font-weight: 800;
    padding: 12px 14px;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 72px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.author-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    padding: 22px;
    min-height: 250px;
}

.author-card h2 {
    margin-top: 8px;
    font-size: 24px;
}

.author-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(72, 240, 164, .46);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(72, 240, 164, .26), rgba(88, 216, 255, .18)),
        var(--panel-strong);
    color: var(--accent);
    font-size: 24px;
    font-weight: 900;
}

.author-avatar.large {
    width: 86px;
    height: 86px;
    font-size: 34px;
}

.author-profile {
    max-width: 920px;
    padding: 54px 0 44px;
}

.author-profile-head {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-top: 24px;
}

.notice {
    color: var(--warm);
    font-weight: 800;
}

.footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 24px clamp(18px, 4vw, 56px);
    font-size: 14px;
    background: rgba(7, 17, 15, .58);
}

code {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(201, 255, 232, .12);
    border-radius: 6px;
    padding: 2px 6px;
    color: var(--warm);
}

@media (max-width: 860px) {
    .topbar,
    .hero {
        display: block;
    }

    nav {
        justify-content: flex-start;
        margin-top: 14px;
    }

    .auth-panel {
        justify-content: flex-start;
        margin-top: 12px;
    }

    .language-switcher {
        justify-content: flex-start;
        margin: 12px 0 0;
    }

    .brand small {
        white-space: normal;
    }

    .hero {
        min-height: auto;
        padding-top: 38px;
    }

    .hero-panel {
        margin-top: 22px;
    }

    .grid,
    .editorial-lanes,
    .authors-grid,
    .stats,
    .auth-shell,
    .workflow-grid {
        grid-template-columns: 1fr;
    }

    .author-card {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .author-avatar {
        width: 48px;
        height: 48px;
    }

    .author-profile-head {
        grid-template-columns: 1fr;
    }
}
