:root {
    --brand-navy: #062b52;
    --brand-navy-2: #0c3d69;
    --brand-gold: #c9853b;
    --brand-paper: #fffdf8;
    --brand-cream: #f7f4ee;
    --brand-line: rgba(6, 43, 82, 0.14);
    --ink: #0b1b33;
    --muted: #5f6f86;
    --surface: #fffdf8;
    --surface-strong: #ffffff;
    --line: var(--brand-line);
    --accent: var(--brand-gold);
    --accent-strong: var(--brand-navy);
}

html,
body {
    background: var(--brand-cream) !important;
}

body {
    color: var(--ink);
}

.bg-orb,
.bg-grid {
    display: none !important;
}

.site-header {
    background: rgba(255, 253, 248, 0.94) !important;
    border-bottom: 1px solid var(--brand-line);
    box-shadow: 0 10px 30px rgba(6, 43, 82, 0.06);
}

.brand-logo-shell {
    width: clamp(190px, 18vw, 282px) !important;
    height: clamp(54px, 5vw, 74px) !important;
}

.brand-official .brand-logo,
.footer-studio-logo {
    object-fit: contain;
    filter: none !important;
}

.navbar-nav {
    gap: clamp(0.55rem, 1.3vw, 1.15rem) !important;
}

.nav-link-category-featured {
    padding-inline: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.nav-link-category-featured:hover,
.nav-link-category-featured.active {
    color: var(--brand-gold) !important;
}

.language-switcher,
.theme-toggle-floating,
.search-panel,
.post-card,
.archive-lead-story,
.case-study-shell,
.case-study-card,
.insight-lead-card,
.insight-side-card,
.newsletter-shell,
.contact-shell,
.comment-form-card,
.comment-list-card,
.admin-card,
.stat-card,
.lab-resource-card,
.lab-featured-card,
.author-hero-shell,
.page-hero-panel,
.article-hero-shell {
    background: var(--brand-paper) !important;
    background-image: none !important;
    border: 1px solid var(--brand-line) !important;
    box-shadow: 0 18px 48px rgba(6, 43, 82, 0.08) !important;
}

.landing-cover,
.category-cover-hero,
.lab-hero {
    background-image: var(--landing-cover-image) !important;
    background-color: var(--brand-navy) !important;
}

.category-cover-hero {
    background-image: var(--category-cover) !important;
}

.lab-hero {
    background-image: var(--lab-cover) !important;
}

.landing-cover::after,
.category-cover-hero::after,
.lab-hero::after {
    display: block !important;
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    height: auto !important;
    background: rgba(3, 20, 38, 0.72) !important;
    background-image: none !important;
}

.landing-cover-content,
.category-cover-content,
.lab-hero-content {
    position: relative;
    z-index: 2;
}

.cover-animated-title,
.category-cover-content h1,
.lab-hero-content h1 {
    letter-spacing: -0.045em;
}

.hero-search-panel {
    background: rgba(255, 253, 248, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.hero-search-panel input {
    color: var(--ink);
}

.hero-popular-searches a {
    background: rgba(255, 253, 248, 0.12) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.34) !important;
}

.btn-dark,
.landing-cover-actions .btn-light,
.newsletter-form button,
.contact-form .btn,
.post-link:hover {
    background: var(--brand-navy) !important;
    background-image: none !important;
    border-color: var(--brand-navy) !important;
    color: #fff !important;
}

.btn-dark:hover,
.landing-cover-actions .btn-light:hover,
.newsletter-form button:hover {
    background: var(--brand-navy-2) !important;
    border-color: var(--brand-navy-2) !important;
}

.btn-outline-light,
.landing-cover-actions .btn-outline-light {
    background: rgba(255, 253, 248, 0.1) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.58) !important;
    color: #fff !important;
}

.btn-outline-dark,
.share-chip,
.filter-pill {
    background: transparent !important;
    background-image: none !important;
    border-color: var(--brand-gold) !important;
    color: var(--brand-navy) !important;
}

.meta-chip,
.category-cover-icon,
.cover-stat-badge,
.rating-label,
.lab-resource-media span,
.ad-pill {
    background: var(--brand-cream) !important;
    background-image: none !important;
    color: var(--brand-navy) !important;
}

.post-card-media::after,
.archive-lead-media::after,
.case-study-card-media::after,
.lab-resource-media::after {
    background: rgba(3, 20, 38, 0.12) !important;
    background-image: none !important;
}

.post-card,
.case-study-card,
.insight-side-card,
.lab-resource-card {
    border-radius: 26px !important;
}

.post-card-media img,
.archive-lead-media img,
.case-study-card-media img,
.insight-lead-media img,
.insight-side-media img,
.article-cover img,
.lab-resource-media img,
.lab-featured-media img {
    filter: none !important;
}

.article-reading-section {
    background: var(--brand-cream) !important;
}

.article-shell {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.article-body {
    background: #ffffff !important;
    color: #14243a !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 18px 52px rgba(6, 43, 82, 0.06) !important;
    max-width: min(100%, 1040px);
    margin-inline: auto;
}

.article-body h2,
.article-body h3,
.article-body p,
.article-body li {
    color: #14243a !important;
}

.article-body p,
.article-body li {
    font-size: clamp(1.07rem, 1.35vw, 1.18rem);
}

.article-share-inline {
    justify-content: flex-start !important;
    gap: 0.5rem !important;
}

.article-share-inline .btn,
.article-share-inline .share-chip,
.article-share-inline .share-chip-button {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    display: inline-grid !important;
    place-items: center !important;
    background: #fff !important;
    color: var(--brand-navy) !important;
    border: 1px solid rgba(201, 133, 59, 0.48) !important;
}

.article-share-inline .btn:hover,
.article-share-inline .share-chip:hover {
    background: var(--brand-navy) !important;
    color: #fff !important;
}

html[data-theme-mode="dark"] .article-rating-box {
    background: rgba(255, 253, 248, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
}

html[data-theme-mode="dark"] .article-rating-box strong,
html[data-theme-mode="dark"] .article-rating-box small {
    color: #f7f4ee !important;
}

html[data-theme-mode="dark"] .article-share-inline .btn,
html[data-theme-mode="dark"] .article-share-inline .share-chip,
html[data-theme-mode="dark"] .article-share-inline .share-chip-button {
    background: rgba(255, 253, 248, 0.06) !important;
    border-color: rgba(201, 133, 59, 0.62) !important;
    color: #f1c27a !important;
    box-shadow: none !important;
}

html[data-theme-mode="dark"] .article-share-inline .btn:hover,
html[data-theme-mode="dark"] .article-share-inline .btn:focus-visible,
html[data-theme-mode="dark"] .article-share-inline .share-chip:hover,
html[data-theme-mode="dark"] .article-share-inline .share-chip:focus-visible,
html[data-theme-mode="dark"] .article-share-inline .share-chip-button:hover,
html[data-theme-mode="dark"] .article-share-inline .share-chip-button:focus-visible {
    background: #f7f4ee !important;
    border-color: #f7f4ee !important;
    color: var(--brand-navy) !important;
}

html[data-theme-mode="dark"] .article-share-inline i,
html[data-theme-mode="dark"] .article-rating-box .rating-stars i {
    color: currentColor !important;
}

html[data-theme-mode="dark"] .comment-zone .section-head h2,
html[data-theme-mode="dark"] .comment-zone .section-head span,
html[data-theme-mode="dark"] .comment-summary-pill {
    color: #f7f4ee !important;
}

html[data-theme-mode="dark"] .comment-form-card,
html[data-theme-mode="dark"] .comment-list-card {
    background: #fffdf8 !important;
    background-image: none !important;
    color: #14243a !important;
    border-color: rgba(201, 133, 59, 0.22) !important;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme-mode="dark"] .comment-form-card h3,
html[data-theme-mode="dark"] .comment-form-card p,
html[data-theme-mode="dark"] .comment-form-card label,
html[data-theme-mode="dark"] .comment-form-card small,
html[data-theme-mode="dark"] .comment-list-card h3,
html[data-theme-mode="dark"] .comment-list-card p,
html[data-theme-mode="dark"] .comment-list-card small,
html[data-theme-mode="dark"] .comment-list-card strong {
    color: #14243a !important;
}

html[data-theme-mode="dark"] .comment-form-card .eyebrow,
html[data-theme-mode="dark"] .comment-list-card .eyebrow {
    color: var(--brand-gold) !important;
}

html[data-theme-mode="dark"] .comment-form-card .form-control,
html[data-theme-mode="dark"] .comment-form-card textarea,
html[data-theme-mode="dark"] .comment-form-card input {
    background: #ffffff !important;
    color: #14243a !important;
    border-color: rgba(6, 43, 82, 0.16) !important;
}

html[data-theme-mode="dark"] .comment-form-card .form-control::placeholder,
html[data-theme-mode="dark"] .comment-form-card textarea::placeholder {
    color: rgba(20, 36, 58, 0.55) !important;
}

html[data-theme-mode="dark"] .comment-form-card .rating-label {
    background: #ffffff !important;
    border-color: rgba(201, 133, 59, 0.42) !important;
    color: var(--brand-gold) !important;
}

html[data-theme-mode="dark"] .comment-form-card .rating-label i {
    color: currentColor !important;
}

html[data-theme-mode="dark"] .recaptcha-panel,
html[data-theme-mode="dark"] .comment-list-card .empty-state,
html[data-theme-mode="dark"] .comment-card {
    background: #ffffff !important;
    color: #14243a !important;
    border-color: rgba(6, 43, 82, 0.14) !important;
}

html[data-theme-mode="dark"] .recaptcha-panel-copy > span {
    background: #f7f4ee !important;
    color: var(--brand-gold) !important;
}

html[data-theme-mode="dark"] .comment-form-footer .text-body-secondary {
    color: rgba(20, 36, 58, 0.72) !important;
}

.comment-zone {
    width: min(100%, 1120px);
    margin-inline: auto;
}

.comment-layout {
    grid-template-columns: 1fr !important;
    align-items: start;
    gap: 1.25rem !important;
}

.comment-form-card,
.comment-list-card {
    display: block !important;
    padding: clamp(1.25rem, 3vw, 2rem) !important;
}

.comment-form-card::before,
.comment-form-card::after,
.comment-list-card::before,
.comment-list-card::after {
    display: none !important;
}

.comment-form-card > span,
.comment-form-card > h3,
.comment-form-card > p,
.comment-form-card > form {
    grid-column: auto !important;
    grid-row: auto !important;
}

.comment-form-card > h3 {
    max-width: 760px;
    margin: 0.3rem 0 0.75rem !important;
    font-size: clamp(1.9rem, 3.4vw, 3rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.045em !important;
}

.comment-form-card > p {
    max-width: 720px !important;
    margin: 0 0 1.35rem !important;
}

.comment-form-card > form {
    width: 100% !important;
}

.comment-form-card .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.comment-form-card .form-control,
.comment-form-card textarea,
.comment-form-card input {
    min-height: 54px;
}

.comment-form-card textarea {
    min-height: 150px;
}

.rating-input-group {
    flex-wrap: wrap !important;
    gap: 0.55rem !important;
}

.recaptcha-panel {
    max-width: 680px;
    background: #ffffff !important;
    background-image: none !important;
}

.comment-list-head {
    align-items: center !important;
}

.comment-list-card .empty-state {
    background: #ffffff !important;
    background-image: none !important;
    color: #14243a !important;
    border-color: var(--brand-line) !important;
}

.site-footer.footer-studio {
    background: #ffffff !important;
    border-top: 1px solid var(--brand-line);
    box-shadow: none !important;
}

.site-footer.footer-studio::before {
    display: none !important;
}

.footer-studio-shell {
    width: min(100% - 2rem, 1320px) !important;
}

.footer-studio-ad {
    background: var(--brand-paper) !important;
    border: 1px dashed rgba(6, 43, 82, 0.2) !important;
}

.footer-studio-socials a {
    background: #fff !important;
    border: 1px solid var(--brand-line) !important;
    color: var(--brand-navy) !important;
}

.footer-studio-socials a:hover {
    background: var(--brand-navy) !important;
    color: #fff !important;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.code-area,
.editor-area {
    font-family: Consolas, Monaco, monospace;
}

html[data-theme-mode="dark"] body {
    background: #081624 !important;
}

html[data-theme-mode="dark"] .site-header,
html[data-theme-mode="dark"] .site-footer.footer-studio,
html[data-theme-mode="dark"] .language-switcher,
html[data-theme-mode="dark"] .theme-toggle-floating,
html[data-theme-mode="dark"] .search-panel,
html[data-theme-mode="dark"] .post-card,
html[data-theme-mode="dark"] .archive-lead-story,
html[data-theme-mode="dark"] .case-study-shell,
html[data-theme-mode="dark"] .case-study-card,
html[data-theme-mode="dark"] .insight-lead-card,
html[data-theme-mode="dark"] .insight-side-card,
html[data-theme-mode="dark"] .newsletter-shell,
html[data-theme-mode="dark"] .contact-shell,
html[data-theme-mode="dark"] .comment-form-card,
html[data-theme-mode="dark"] .comment-list-card,
html[data-theme-mode="dark"] .admin-card,
html[data-theme-mode="dark"] .stat-card,
html[data-theme-mode="dark"] .lab-resource-card,
html[data-theme-mode="dark"] .lab-featured-card,
html[data-theme-mode="dark"] .author-hero-shell,
html[data-theme-mode="dark"] .page-hero-panel,
html[data-theme-mode="dark"] .article-hero-shell {
    background: #0d1c2d !important;
    color: #f6f2ea !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme-mode="dark"] .article-body {
    background: #ffffff !important;
    color: #14243a !important;
}

html[data-theme-mode="dark"] .brand-logo,
html[data-theme-mode="dark"] .footer-studio-logo {
    background: #fff;
    border-radius: 10px;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 1rem;
    }

    .navbar-nav {
        align-items: flex-start !important;
        gap: 0.35rem !important;
    }

    .nav-link-category-featured {
        padding: 0.35rem 0 !important;
    }

    .brand-logo-shell {
        width: min(64vw, 230px) !important;
        height: 58px !important;
    }

    .landing-cover {
        min-height: 640px !important;
        padding-block: 6rem 3rem !important;
    }

    .hero-search-panel {
        grid-template-columns: auto 1fr !important;
    }

    .hero-search-panel button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .comment-layout,
    .newsletter-shell,
    .contact-shell {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 575.98px) {
    .article-hero .container,
    .article-reading-section .container {
        padding-inline: 0 !important;
    }

    .article-hero-shell,
    .article-body,
    .comment-form-card,
    .comment-list-card {
        border-radius: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
    }

    .article-meta-strip {
        align-items: flex-start !important;
    }

    .article-share-inline {
        width: auto !important;
        max-width: none !important;
    }
}

/* Final comments correction: keep the reading/community area calm in dark mode. */
.comment-zone {
    width: min(100%, 960px) !important;
}

.comment-zone .section-head {
    align-items: flex-start !important;
}

.comment-layout-clean {
    display: block !important;
}

.comment-form-card-clean,
.comment-list-card-clean {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.comment-form-card-clean {
    margin-bottom: clamp(2rem, 5vw, 3rem);
}

.comment-form-card-clean > h3 {
    max-width: 680px;
    font-size: clamp(2rem, 4vw, 3.35rem) !important;
}

.comment-form-card-clean > p {
    max-width: 620px !important;
}

.comment-form-card-clean .comment-form {
    max-width: 760px;
}

.comment-form-card-clean .row {
    --bs-gutter-x: 1.15rem;
    --bs-gutter-y: 1.15rem;
}

.comment-form-card-clean .form-control,
.comment-form-card-clean textarea,
.comment-form-card-clean input {
    background: #ffffff !important;
    border: 1px solid rgba(6, 43, 82, 0.16) !important;
    border-radius: 18px !important;
    box-shadow: none !important;
}

.comment-form-card-clean .form-control:focus,
.comment-form-card-clean textarea:focus,
.comment-form-card-clean input:focus {
    border-color: var(--brand-gold) !important;
    box-shadow: 0 0 0 4px rgba(201, 133, 59, 0.12) !important;
}

.comment-form-card-clean .rating-input-group {
    display: flex !important;
    flex-direction: row-reverse;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.comment-form-card-clean .rating-label {
    background: #ffffff !important;
    border: 1px solid rgba(201, 133, 59, 0.42) !important;
    box-shadow: none !important;
}

.comment-form-card-clean .recaptcha-panel {
    max-width: 760px;
    border: 1px dashed rgba(6, 43, 82, 0.18) !important;
    border-radius: 18px !important;
    box-shadow: none !important;
}

.comment-list-card-clean {
    border-top: 1px solid rgba(6, 43, 82, 0.12) !important;
    padding-top: clamp(1.25rem, 3vw, 2rem) !important;
}

.comment-list-card-clean .comment-list-head {
    border-bottom: 0 !important;
    padding-bottom: 0.6rem;
}

.comment-list-card-clean .empty-state,
.comment-list-card-clean .comment-card {
    background: #ffffff !important;
    border: 1px solid rgba(6, 43, 82, 0.12) !important;
    border-radius: 22px !important;
    box-shadow: none !important;
}

html[data-theme-mode="dark"] .comment-form-card,
html[data-theme-mode="dark"] .comment-list-card {
    background: transparent !important;
    background-image: none !important;
    color: #14243a !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

html[data-theme-mode="dark"] .comment-form-card *,
html[data-theme-mode="dark"] .comment-list-card * {
    color: inherit;
}

html[data-theme-mode="dark"] .comment-form-card .eyebrow,
html[data-theme-mode="dark"] .comment-list-card .eyebrow,
html[data-theme-mode="dark"] .comment-form-card .rating-label,
html[data-theme-mode="dark"] .comment-card .rating-stars {
    color: var(--brand-gold) !important;
}

html[data-theme-mode="dark"] .comment-form-card .form-control,
html[data-theme-mode="dark"] .comment-form-card textarea,
html[data-theme-mode="dark"] .comment-form-card input,
html[data-theme-mode="dark"] .recaptcha-panel,
html[data-theme-mode="dark"] .comment-list-card .empty-state,
html[data-theme-mode="dark"] .comment-card {
    background: #ffffff !important;
    background-image: none !important;
    color: #14243a !important;
    border-color: rgba(6, 43, 82, 0.14) !important;
}

html[data-theme-mode="dark"] .comment-list-card-clean {
    border-top-color: rgba(255, 253, 248, 0.14) !important;
}

html[data-theme-mode="dark"] .comment-form-card-clean > h3,
html[data-theme-mode="dark"] .comment-form-card-clean > p,
html[data-theme-mode="dark"] .comment-form-card-clean label,
html[data-theme-mode="dark"] .comment-form-card-clean .comment-form-footer small,
html[data-theme-mode="dark"] .comment-list-card-clean .comment-list-head h3 {
    color: #f7f4ee !important;
}

html[data-theme-mode="dark"] .comment-form-card-clean .form-control,
html[data-theme-mode="dark"] .comment-form-card-clean textarea,
html[data-theme-mode="dark"] .comment-form-card-clean input,
html[data-theme-mode="dark"] .comment-form-card-clean .recaptcha-panel,
html[data-theme-mode="dark"] .comment-list-card-clean .empty-state,
html[data-theme-mode="dark"] .comment-list-card-clean .comment-card {
    background: #fffdf8 !important;
    border-color: rgba(201, 133, 59, 0.2) !important;
}

@media (max-width: 767.98px) {
    .comment-zone {
        width: 100% !important;
    }

    .comment-form-card-clean,
    .comment-list-card-clean {
        padding-inline: 1rem !important;
    }
}

html[data-theme-mode="dark"] .comment-form-card .rating-label i,
html[data-theme-mode="dark"] .comment-card .rating-stars i,
html[data-theme-mode="dark"] .comment-list-card .empty-state * {
    color: currentColor !important;
}

html[data-theme-mode="dark"] .comment-form-footer .text-body-secondary,
html[data-theme-mode="dark"] .recaptcha-panel-copy small {
    color: rgba(20, 36, 58, 0.72) !important;
}
