:root {
    --bg: #050805;
    --bg-soft: #0b120c;
    --panel: #09110a;
    --ink: #8bff8a;
    --ink-strong: #c4ffc3;
    --muted: #5eb85e;
    --line: #1e3b1f;
    --accent: #5cff61;
    --accent-soft: #2ea136;
    --warning: #ffd95d;
    --shadow: 0 0 24px rgba(92, 255, 97, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "IBM Plex Mono", "JetBrains Mono", "Fira Code", monospace;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 8%, rgba(45, 124, 49, 0.25), transparent 32%),
        radial-gradient(circle at 90% 18%, rgba(94, 184, 94, 0.16), transparent 38%),
        linear-gradient(180deg, #040704 0%, #0a120a 100%);
    line-height: 1.55;
    position: relative;
}

input,
textarea,
button,
select {
    font: inherit;
}

p,
li,
h1,
h2,
h3 {
    overflow-wrap: anywhere;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0,
            rgba(0, 0, 0, 0) 2px,
            rgba(0, 0, 0, 0.2) 3px,
            rgba(0, 0, 0, 0.2) 4px);
    opacity: 0.23;
    z-index: 80;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.7);
    z-index: 79;
}

h1,
h2,
h3 {
    line-height: 1.25;
    margin: 0 0 0.7rem;
    color: var(--ink-strong);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

p {
    margin: 0 0 1rem;
}

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

a:hover {
    color: var(--ink-strong);
    text-decoration: underline;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    background: rgba(7, 13, 8, 0.88);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 30;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .site-header {
        background: rgba(7, 13, 8, 0.98);
    }
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 0;
}

.brand {
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink-strong);
    position: relative;
}

.brand::after {
    content: "_";
    margin-left: 0.2rem;
    animation: blink 1s steps(1) infinite;
}

.site-nav {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.site-nav a {
    border: 1px solid var(--line);
    background: rgba(13, 24, 14, 0.72);
    padding: 0.35rem 0.55rem;
    border-radius: 0.35rem;
}

.site-nav a:hover,
.site-nav a.active {
    background: #133218;
    border-color: #2a6c33;
    text-decoration: none;
}

.hero {
    padding: 3.7rem 0 2.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.2rem;
    align-items: start;
}

.kicker {
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--warning);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.lead {
    font-size: 1.04rem;
    color: var(--muted);
    max-width: 72ch;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.btn {
    display: inline-block;
    padding: 0.62rem 0.95rem;
    border-radius: 0.35rem;
    border: 1px solid var(--line);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

@media (prefers-reduced-motion: reduce) {
    .brand::after {
        animation: none;
    }

    .btn {
        transition: none;
    }
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary {
    background: #123417;
    color: var(--accent);
    border-color: #2f7d3b;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: #1b4920;
}

.btn-secondary {
    background: transparent;
    color: var(--ink-strong);
}

.hero-card,
.panel,
.card,
.form-wrap,
.kb-entry,
.legal {
    background: linear-gradient(180deg, rgba(11, 23, 11, 0.95), rgba(8, 16, 9, 0.95));
    border: 1px solid var(--line);
    border-radius: 0.45rem;
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
}

.hero-card ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding-bottom: 2.7rem;
}

.page-head {
    padding: 2.2rem 0 1.2rem;
}

.page-grid {
    display: grid;
    gap: 1rem;
    padding-bottom: 2rem;
}

.feed-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag-btn {
    border: 1px solid var(--line);
    background: #0f1c10;
    color: var(--ink);
    border-radius: 0.35rem;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    font: inherit;
}

.tag-btn.is-active {
    background: #204925;
    border-color: #3c9446;
    color: var(--ink-strong);
}

.meta {
    color: var(--muted);
    font-size: 0.94rem;
}

.form-wrap {
    max-width: 760px;
}

label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}

input,
textarea {
    width: 100%;
    margin-top: 0.35rem;
    margin-bottom: 0.9rem;
    border: 1px solid #26512c;
    border-radius: 0.3rem;
    padding: 0.7rem;
    font: inherit;
    color: var(--ink-strong);
    background: #0a130b;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #5bdb6a;
    box-shadow: 0 0 0 2px rgba(92, 255, 97, 0.2);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 1rem;
    background: rgba(5, 10, 6, 0.92);
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
}

.linktree {
    display: grid;
    gap: 0.8rem;
    max-width: 680px;
    padding-bottom: 2.1rem;
}

.link-btn {
    display: block;
    padding: 0.85rem 1rem;
    border: 1px solid #2d6b34;
    background: #102014;
    border-radius: 0.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.link-btn:hover {
    background: #17301d;
    text-decoration: none;
}

.content-image {
    width: 100%;
    border: 1px solid #27572d;
    border-radius: 0.35rem;
    margin-bottom: 0.8rem;
    object-fit: cover;
    max-height: 320px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding-bottom: 2rem;
}

.admin-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.is-hidden {
    display: none;
}

.consent-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: 980px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(10, 21, 11, 0.98), rgba(6, 14, 7, 0.98));
    border: 1px solid #2f7d3b;
    border-radius: 0.5rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 0 30px rgba(92, 255, 97, 0.2);
    z-index: 140;
}

.consent-banner h2 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.consent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
}

.consent-tag {
    border: 1px solid #2f5e34;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
    color: var(--ink-strong);
    background: rgba(16, 32, 18, 0.9);
}

.consent-tag.is-required {
    border-color: #5fb868;
}

.consent-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.consent-manage-button {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 130;
    border: 1px solid #2f7d3b;
    border-radius: 0.35rem;
    background: #0f2712;
    color: var(--ink-strong);
    font: inherit;
    padding: 0.45rem 0.7rem;
    cursor: pointer;
}

.consent-manage-button:hover {
    background: #15351a;
}

.consent-modal {
    position: fixed;
    inset: 0;
    background: rgba(1, 3, 1, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    z-index: 150;
}

.consent-modal-card {
    width: min(760px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
    background: linear-gradient(180deg, rgba(10, 21, 11, 0.98), rgba(6, 14, 7, 0.98));
    border: 1px solid #2f7d3b;
    border-radius: 0.5rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 0 30px rgba(92, 255, 97, 0.2);
}

.consent-option {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border: 1px solid #24532c;
    border-radius: 0.35rem;
    padding: 0.75rem;
    margin-bottom: 0.6rem;
    background: rgba(10, 19, 11, 0.88);
}

.consent-option span {
    display: block;
}

.consent-option small {
    display: block;
    color: var(--muted);
    margin-top: 0.2rem;
}

.consent-option input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: #5cff61;
}

.consent-option.is-locked {
    border-color: #5fb868;
}

.consent-modal-open {
    overflow: hidden;
}

#admin-panel textarea {
    min-height: 220px;
}

#media-output,
#import-json {
    min-height: 130px;
}

@keyframes blink {

    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

@media (max-width: 900px) {

    .hero-grid,
    .quick-links,
    .admin-grid {
        grid-template-columns: 1fr;
    }

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

    .consent-banner {
        left: 0.65rem;
        right: 0.65rem;
        bottom: 0.65rem;
        padding: 0.85rem;
    }

    .consent-actions .btn {
        width: 100%;
        text-align: center;
    }

    .consent-option {
        align-items: flex-start;
    }

    .consent-manage-button {
        right: 0.65rem;
        bottom: 0.65rem;
    }
}

.cookie-bar-lite {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    margin: 0 auto;
    width: min(960px, calc(100vw - 2rem));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border: 1px solid #2f7d3b;
    border-radius: 0.45rem;
    padding: 0.75rem 0.9rem;
    background: rgba(8, 17, 9, 0.98);
    box-shadow: 0 0 20px rgba(92, 255, 97, 0.16);
    z-index: 110;
}

.cookie-bar-lite__text {
    margin: 0;
    color: var(--ink-strong);
}

.cookie-bar-lite__actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-shrink: 0;
}

.cookie-bar-lite__link,
.cookie-bar-lite__button {
    border: 1px solid #2a6c33;
    border-radius: 0.35rem;
    padding: 0.42rem 0.68rem;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.cookie-bar-lite__link {
    background: transparent;
    color: var(--ink-strong);
}

.cookie-bar-lite__button {
    background: #123417;
    color: var(--accent);
}

.cookie-bar-lite__button:hover,
.cookie-bar-lite__link:hover {
    text-decoration: none;
    background: #1a4720;
}

@media (max-width: 700px) {
    .cookie-bar-lite {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-bar-lite__actions {
        width: 100%;
        justify-content: space-between;
    }
}