:root {
    --bg: #f5f1e8;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --ink: #182838;
    --muted: #5d6d7c;
    --line: rgba(24, 40, 56, 0.08);
    --brand: #d15d39;
    --brand-deep: #9f3f21;
    --accent: #0f766e;
    --shadow: 0 18px 50px rgba(24, 40, 56, 0.1);
}

body.site-shell {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(209, 93, 57, 0.14), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(15, 118, 110, 0.12), transparent 24%),
        linear-gradient(180deg, #fffdf9 0%, var(--bg) 100%);
    color: var(--ink);
    font-family: "Manrope", sans-serif;
}

h1, h2, h3, h4, .navbar-brand {
    font-family: "Space Grotesk", sans-serif;
}

.page-glow {
    position: fixed;
    inset: auto;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.page-glow-one {
    width: 220px;
    height: 220px;
    top: 7rem;
    left: -2rem;
    background: rgba(209, 93, 57, 0.22);
}

.page-glow-two {
    width: 260px;
    height: 260px;
    top: 14rem;
    right: -4rem;
    background: rgba(15, 118, 110, 0.16);
}

.navbar-modern {
    background: rgba(255, 253, 249, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(24, 40, 56, 0.08);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 1rem;
    background: linear-gradient(145deg, var(--brand), var(--accent));
    box-shadow: 0 14px 32px rgba(24, 40, 56, 0.16);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark-core {
    content: "";
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.96);
    border-radius: 0.5rem;
    transform: rotate(-30deg);
}

.brand-mark::before {
    width: 1.15rem;
    height: 1.15rem;
    top: 0.58rem;
    left: 0.84rem;
}

.brand-mark::after {
    width: 1.15rem;
    height: 1.15rem;
    top: 1.22rem;
    left: 0.84rem;
}

.brand-mark-core {
    width: 1.15rem;
    height: 1.15rem;
    top: 0.9rem;
    left: 1.42rem;
}

.brand-wordmark {
    display: inline-flex;
    flex-direction: column;
    gap: 0.05rem;
    line-height: 1;
}

.brand-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}

.brand-subtitle {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.btn-brand {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #fff;
    border: 0;
}

.btn-brand:hover {
    color: #fff;
    filter: brightness(1.05);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    color: var(--ink);
}

.hero-panel,
.card,
.stat-card,
.feature-strip,
.story-card {
    position: relative;
    z-index: 1;
}

.hero-panel {
    overflow: hidden;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 2rem;
    background:
        linear-gradient(135deg, rgba(24, 40, 56, 0.96), rgba(15, 118, 110, 0.94)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
    color: #fff;
    box-shadow: 0 25px 80px rgba(24, 40, 56, 0.18);
}

.hero-panel::after {
    content: "";
    position: absolute;
    right: -4rem;
    bottom: -5rem;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.hero-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
}

.hero-kicker,
.section-title {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 800;
}

.hero-kicker {
    color: rgba(255, 255, 255, 0.72);
}

.hero-title {
    max-width: 12ch;
    font-size: clamp(2.6rem, 7vw, 5rem);
    line-height: 0.94;
    margin-bottom: 1rem;
}

.hero-subtitle {
    max-width: 44rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
}

.hero-side {
    border-radius: 1.4rem;
    padding: 1.4rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.mini-stat {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
}

.mini-stat strong {
    display: block;
    font-size: 1.7rem;
}

.feature-strip {
    margin-top: -2rem;
    padding: 1.25rem;
    border-radius: 1.6rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow);
}

.feature-pill {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(24, 40, 56, 0.03);
}

.card {
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: var(--surface);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    border-radius: 1.6rem;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 60px rgba(24, 40, 56, 0.14);
}

.card-soft {
    border: 1px solid rgba(24, 40, 56, 0.06);
    border-radius: 1.3rem;
    background: rgba(255, 255, 255, 0.56);
}

.section-title {
    color: var(--accent);
}

.topic-meta,
.muted {
    color: var(--muted);
}

.story-card {
    padding: 1.6rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(24, 40, 56, 0.06);
    height: 100%;
}

.story-card a {
    color: var(--ink);
}

.story-card .story-index {
    color: var(--brand);
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.story-cover,
.article-card-cover,
.article-hero-image {
    overflow: hidden;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(24, 40, 56, 0.1), rgba(209, 93, 57, 0.08));
}

.story-cover img,
.article-card-cover img,
.article-hero-image img {
    display: block;
    width: 100%;
    height: auto;
}

.site-footer a {
    color: var(--ink);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--brand);
}

.hosting-credit {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    background: rgba(24, 40, 56, 0.04);
    border: 1px solid rgba(24, 40, 56, 0.08);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.hosting-credit:hover {
    color: var(--ink);
    transform: translateY(-1px);
    background: rgba(24, 40, 56, 0.06);
    border-color: rgba(209, 93, 57, 0.2);
}

.hosting-credit-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.hosting-credit-logo {
    display: block;
    width: 132px;
    height: auto;
}

.legal-page {
    line-height: 1.8;
}

.legal-page ul {
    padding-left: 1.2rem;
}

@media (max-width: 991.98px) {
    .brand-title {
        font-size: 1rem;
    }

    .brand-subtitle {
        font-size: 0.68rem;
    }

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

.story-cover img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.article-card-cover img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.article-hero-image img {
    aspect-ratio: 16 / 8;
    object-fit: cover;
}

.admin-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
    background: var(--surface-strong);
    padding: 1.2rem;
    border-radius: 1.2rem;
    box-shadow: var(--shadow);
}

.radar-list {
    display: grid;
    gap: 1rem;
}

.radar-item {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.radar-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.page-head {
    margin-bottom: 2rem;
}

.page-head h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 0.96;
}

.page-subtitle {
    max-width: 48rem;
    color: var(--muted);
    font-size: 1.02rem;
}

.content-shell {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.52fr);
}

.editor-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.5fr);
}

.editor-main,
.editor-side,
.stack-panel {
    padding: 1.5rem;
    border-radius: 1.5rem;
    background: var(--surface);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.stack-panel + .stack-panel {
    margin-top: 1rem;
}

.list-rail {
    display: grid;
    gap: 1rem;
}

.list-item {
    padding: 1.2rem 0 0;
    border-top: 1px solid rgba(24, 40, 56, 0.08);
}

.list-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.meta-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.92rem;
}

.prose-content {
    font-size: 1.04rem;
    line-height: 1.85;
}

.prose-content h2,
.prose-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.9rem;
}

.prose-content ul {
    padding-left: 1.2rem;
}

.prose-content li + li {
    margin-top: 0.45rem;
}

.comment-thread {
    display: grid;
    gap: 1rem;
}

.comment-bubble {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(24, 40, 56, 0.04);
}

.app-form label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 700;
    font-size: 0.92rem;
}

.app-form .form-control,
.app-form .form-select {
    border-radius: 0.95rem;
    border: 1px solid rgba(24, 40, 56, 0.1);
    padding: 0.85rem 1rem;
    box-shadow: none;
}

.app-form .form-control:focus,
.app-form .form-select:focus {
    border-color: rgba(209, 93, 57, 0.55);
    box-shadow: 0 0 0 0.25rem rgba(209, 93, 57, 0.12);
}

.helper-note {
    color: var(--muted);
    font-size: 0.9rem;
}

.reply-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: center;
}

.reply-action-link {
    color: var(--muted);
    font-size: 0.92rem;
    text-decoration: none;
}

.reply-action-link:hover {
    color: var(--ink);
    text-decoration: underline;
}

.reply-action-button {
    border: 0;
    background: transparent;
    padding: 0;
}

.admin-hero {
    padding: 1.8rem;
    border-radius: 1.6rem;
    background: linear-gradient(135deg, rgba(24, 40, 56, 0.96), rgba(209, 93, 57, 0.88));
    color: #fff;
    box-shadow: 0 25px 80px rgba(24, 40, 56, 0.18);
}

.toolbar-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.toolbar-cloud .btn {
    border-radius: 999px;
}

.tinymce-modern {
    border-radius: 1rem;
    overflow: hidden;
}

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

    .hero-panel {
        padding: 2rem;
    }

    .feature-strip {
        margin-top: 1rem;
    }

    .content-shell,
    .editor-layout {
        grid-template-columns: 1fr;
    }
}
