/*
 * Studio Legale BCS public shell.
 * Canonical palette and shared chrome derived from the homepage.
 */
:root {
    /* Belle Époque newspaper palette — antique brass on warm ink + cream paper. */
    --ink: #1b1712;
    --ink-deep: #120e0a;
    --ink-soft: #241f1a;
    --ink-elev: #2a241c;
    --paper: #f3ecd8;
    --paper-soft: #e4d4b8;
    --paper-warm: #e4d4b8;
    --accent: #d48736;
    --accent-strong: #e8a817;
    --accent-deep: #8b5e24;
    --accent-readable: #8b5e24;
    --accent-readable-soft: rgba(139, 94, 36, 0.64);
    --accent-tint: rgba(212, 135, 54, 0.08);
    --signal: #7a1f1f;
    --mid: #a89880;
    --mid-soft: #8a8478;
    --rule: #3a3228;
    --rule-soft: rgba(243, 236, 216, 0.10);
    --accent-tech: #4db8b8;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body.bcs-public-page {
    font-family: 'Inter', system-ui, sans-serif;
    background:
        radial-gradient(circle at top, rgba(212, 135, 54, 0.06), transparent 28%),
        linear-gradient(180deg, #241f1a 0%, var(--ink) 28%, #120e0a 100%);
    color: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.bcs-public-page::selection {
    background: var(--accent);
    color: var(--ink);
}

.font-serif,
.bcs-public-page .font-serif {
    font-family: 'Fraunces', Georgia, serif;
}

.font-mono,
.bcs-public-page .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Minimal custom utilities required by the canonical header/footer on pages
   whose local Tailwind config does not define the homepage colors. */
.bg-ink { background-color: var(--ink) !important; }
.bg-ink-soft { background-color: var(--ink-soft) !important; }
.bg-paper { background-color: var(--paper) !important; }
.bg-paper\/5 { background-color: rgba(243, 236, 216, 0.05) !important; }
.text-ink { color: var(--ink) !important; }
.text-paper { color: var(--paper) !important; }
.text-paper\/40 { color: rgba(243, 236, 216, 0.4) !important; }
.text-paper\/60 { color: rgba(243, 236, 216, 0.6) !important; }
.text-accent { color: var(--accent) !important; }
.text-accent-readable { color: var(--accent-readable) !important; }
.text-mid { color: var(--mid) !important; }
.border-rule { border-color: var(--rule) !important; }
.border-accent { border-color: var(--accent) !important; }
.border-paper\/10 { border-color: rgba(243, 236, 216, 0.1) !important; }
.hover\:text-paper:hover { color: var(--paper) !important; }
.hover\:text-accent:hover { color: var(--accent) !important; }
.hover\:text-ink:hover { color: var(--ink) !important; }
.hover\:bg-accent:hover { background-color: var(--accent) !important; }
.hover\:bg-paper:hover { background-color: var(--paper) !important; }
.focus-within\:border-accent:focus-within { border-color: var(--accent) !important; }
.placeholder\:text-paper\/40::placeholder { color: rgba(243, 236, 216, 0.4) !important; }

.bcs-public-page .nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--paper);
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.bcs-public-page .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1);
}

.bcs-public-page .nav-link:hover::after,
.bcs-public-page .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left center;
}

.bcs-public-page .nav-link.active {
    color: var(--accent);
}

.bcs-public-page .theme-toggle {
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(243, 236, 216, 0.16);
    border-radius: 50%;
    background: rgba(243, 236, 216, 0.06);
    color: var(--paper);
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.bcs-public-page .theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(212, 135, 54, 0.08);
}

.bcs-public-page .header-search {
    border-color: rgba(243, 236, 216, 0.16) !important;
    background: rgba(243, 236, 216, 0.08) !important;
}

.bcs-public-page .header-search input {
    width: 0;
    opacity: 0;
    color: var(--paper);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bcs-public-page .header-search input::placeholder {
    color: rgba(243, 236, 216, 0.44);
}

.bcs-public-page .header-search:hover input,
.bcs-public-page .header-search input:focus {
    width: 180px;
    opacity: 1;
}

.bcs-public-page .header-search button {
    color: rgba(243, 236, 216, 0.74);
    transition: color 0.3s ease, transform 0.3s ease;
}

.bcs-public-page .header-search:hover button,
.bcs-public-page .header-search:focus-within button {
    color: var(--accent);
    transform: scale(1.04);
}

.bcs-public-page .masthead-title {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1;
    letter-spacing: -0.02em;
}

.bcs-public-page a:focus-visible,
.bcs-public-page button:focus-visible,
.bcs-public-page input:focus-visible,
.bcs-public-page textarea:focus-visible,
.bcs-public-page select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.bcs-public-page main {
    background:
        radial-gradient(circle at 16% 12%, rgba(212, 135, 54, 0.08), transparent 30rem),
        linear-gradient(180deg, rgba(22, 19, 16, 0.98), rgba(13, 16, 13, 1));
}

.bcs-public-page .bcs-paper-section,
.bcs-public-page section.bcs-paper-section,
.bcs-public-page div.bcs-paper-section {
    background: var(--paper) !important;
    color: var(--ink) !important;
}

.bcs-public-page .bcs-paper-section .text-white,
.bcs-public-page .bcs-paper-section .text-paper,
.bcs-public-page .bcs-paper-section h1,
.bcs-public-page .bcs-paper-section h2,
.bcs-public-page .bcs-paper-section h3 {
    color: var(--ink) !important;
}

.bcs-public-page .bcs-paper-section p,
.bcs-public-page .bcs-paper-section li {
    color: rgba(22, 19, 16, 0.74) !important;
}

/* Practice-area pages: airy editorial layout aligned with the homepage palette. */
body.bcs-practice-page main {
    padding: clamp(7rem, 9vw, 10rem) clamp(1.25rem, 4vw, 4rem) clamp(5rem, 8vw, 8rem) !important;
    background:
        radial-gradient(circle at 12% 8%, rgba(212, 135, 54, 0.1), transparent 32rem),
        linear-gradient(90deg, rgba(29, 47, 37, 0.54) 0%, rgba(13, 16, 13, 0.96) 14%, rgba(13, 16, 13, 1) 86%, rgba(29, 47, 37, 0.54) 100%) !important;
}

body.bcs-practice-page main > .max-w-7xl {
    max-width: 1500px !important;
}

.bcs-practice-page h1 {
    font-family: 'Fraunces', Georgia, serif !important;
    font-weight: 400 !important;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.bcs-practice-page .grid.grid-cols-1.lg\:grid-cols-3 {
    gap: clamp(1.5rem, 3vw, 3rem) !important;
    margin-bottom: clamp(5rem, 8vw, 8rem);
}

.bcs-practice-page .bg-surface-dark,
.bcs-practice-page .service-card,
.bcs-practice-page .feature-card,
.bcs-practice-page .signal-card {
    background: linear-gradient(180deg, rgba(26, 34, 28, 0.9), rgba(16, 20, 17, 0.94)) !important;
    border-color: rgba(243, 236, 216, 0.12) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.16);
}

.bcs-practice-page .rounded-3xl,
.bcs-practice-page .rounded-2xl {
    border-radius: 1.8rem !important;
}

.bcs-practice-page .mt-16 {
    margin: clamp(4rem, 7vw, 7rem) auto !important;
    padding: clamp(3rem, 6vw, 5.5rem);
    border-radius: clamp(2rem, 4vw, 3.2rem);
    background:
        radial-gradient(circle at 88% 0%, rgba(212, 135, 54, 0.16), transparent 28rem),
        var(--paper);
    color: var(--ink);
    border: 1px solid rgba(22, 19, 16, 0.12);
}

.bcs-practice-page .mt-16 h2,
.bcs-practice-page .mt-16 summary {
    color: var(--ink) !important;
}

.bcs-practice-page .mt-16 details {
    background: rgba(255, 252, 246, 0.64) !important;
    border-color: rgba(22, 19, 16, 0.13) !important;
    box-shadow: none;
}

.bcs-practice-page .mt-16 details + details {
    margin-top: 1rem;
}

.bcs-practice-page .mt-16 details > div,
.bcs-practice-page .mt-16 p {
    color: rgba(22, 19, 16, 0.72) !important;
}

.bcs-practice-page .section {
    max-width: 1500px;
    margin: 0 auto;
    padding: clamp(4.5rem, 7vw, 7rem) 0;
}

.bcs-practice-page .section-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
}

.bcs-practice-page .section-grid > .section-kicker {
    grid-column: span 4;
    position: sticky;
    top: 7rem;
}

.bcs-practice-page .section-grid > .card-grid {
    grid-column: span 8;
}

.bcs-practice-page .section-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(3.25rem, 6vw, 6.8rem);
    font-weight: 400;
    line-height: 0.92;
    letter-spacing: -0.055em;
    color: var(--paper);
}

.bcs-practice-page .card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.bcs-practice-page #category-news > *,
.bcs-practice-page .bcs-reading-card {
    min-height: 15rem;
    padding: clamp(1.5rem, 3vw, 2.25rem) !important;
    border-radius: 1.6rem !important;
    margin: 0 !important;
    background: rgba(12, 15, 13, 0.72) !important;
    border: 1px solid rgba(243, 236, 216, 0.14) !important;
    color: var(--paper);
    transition: border-color .25s ease, transform .25s ease, background .25s ease;
}

.bcs-practice-page #category-news > *:hover,
.bcs-practice-page .bcs-reading-card:hover {
    border-color: rgba(212, 135, 54, 0.45) !important;
    background: rgba(22, 32, 25, 0.88) !important;
    transform: translateY(-3px);
}

.bcs-practice-page .bcs-reading-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
    font-family: 'JetBrains Mono', monospace;
    font-size: .64rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.bcs-practice-page .bcs-reading-card__tag {
    color: var(--accent);
    border: 1px solid rgba(212, 135, 54, 0.26);
    border-radius: 999px;
    padding: .25rem .55rem;
}

.bcs-practice-page .bcs-reading-card__date {
    color: var(--mid);
}

.bcs-practice-page .bcs-reading-card__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.45rem, 2.1vw, 2.15rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--paper);
}

.bcs-practice-page .bcs-reading-card__copy {
    margin-top: 1rem;
    color: var(--mid);
    line-height: 1.65;
}

.bcs-practice-page .bcs-reading-card__link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
}

.bcs-practice-page .band {
    max-width: 1500px;
    margin: clamp(2rem, 5vw, 5rem) auto 0;
    padding: clamp(2.5rem, 5vw, 4rem);
    border-radius: clamp(2rem, 4vw, 3rem);
    background:
        radial-gradient(circle at 86% 20%, rgba(212, 135, 54, .18), transparent 26rem),
        linear-gradient(135deg, rgba(31, 54, 41, .96), rgba(14, 18, 15, .98));
    border: 1px solid rgba(243, 236, 216, .12);
}

.bcs-practice-page .band__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: end;
}

.bcs-practice-page .band__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(2.6rem, 5vw, 5.2rem);
    line-height: .95;
    letter-spacing: -.05em;
    color: var(--paper);
}

.bcs-practice-page .band__copy {
    margin-top: 1.4rem;
    max-width: 58rem;
    color: var(--mid);
    line-height: 1.7;
}

.bcs-practice-page .cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 3.45rem;
    padding: 0 1.75rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink) !important;
    font-family: 'JetBrains Mono', monospace;
    font-size: .7rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
}

/* Team profile pages: introduce a paper editorial slab to loosen the composition. */
.bcs-team-page .team-layout {
    gap: clamp(2.5rem, 5vw, 5rem) !important;
}

.bcs-team-page .team-layout > * {
    min-width: 0;
}

.bcs-team-page .team-paper-shell {
    background:
        radial-gradient(circle at 94% 4%, rgba(212, 135, 54, 0.12), transparent 18rem),
        linear-gradient(180deg, rgba(243, 236, 216, 0.96), rgba(235, 228, 217, 0.92)) !important;
    color: var(--ink) !important;
    padding: clamp(2rem, 4vw, 4rem) !important;
    border: 1px solid rgba(22, 19, 16, 0.12) !important;
    border-radius: clamp(2rem, 4vw, 3rem) !important;
    box-shadow: 0 28px 80px rgba(27, 23, 18, 0.12);
    overflow: hidden;
    overflow-wrap: anywhere;
}

.bcs-team-page .team-paper-shell > section + section {
    margin-top: clamp(3rem, 5vw, 4.5rem);
}

.bcs-team-page .team-paper-shell h2,
.bcs-team-page .team-paper-shell h3,
.bcs-team-page .team-paper-shell h4,
.bcs-team-page .team-paper-shell p,
.bcs-team-page .team-paper-shell li,
.bcs-team-page .team-paper-shell a {
    color: var(--ink);
}

.bcs-team-page .team-paper-shell .text-gray-900,
.bcs-team-page .team-paper-shell .text-white,
.bcs-team-page .team-paper-shell .text-slate-900 {
    color: var(--ink) !important;
}

.bcs-team-page .team-paper-shell .text-gray-600,
.bcs-team-page .team-paper-shell .text-gray-500,
.bcs-team-page .team-paper-shell .text-gray-400,
.bcs-team-page .team-paper-shell .text-gray-300 {
    color: rgba(22, 19, 16, 0.74) !important;
}

.bcs-team-page .team-paper-shell .bg-surface-dark,
.bcs-team-page .team-paper-shell .bg-gradient-to-br {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(241, 236, 226, 0.92)) !important;
    border-color: rgba(22, 19, 16, 0.12) !important;
    box-shadow: none !important;
}

.bcs-team-page .team-paper-shell .border-border-dark {
    border-color: rgba(22, 19, 16, 0.12) !important;
}

.bcs-team-page .team-paper-shell .grid.gap-8 {
    gap: clamp(1.25rem, 2.6vw, 2rem) !important;
}

.bcs-team-page .team-paper-shell .bg-primary,
.bcs-team-page .team-paper-shell .hover\:bg-primary:hover {
    color: var(--ink) !important;
}

.bcs-team-page .team-paper-shell .text-primary {
    color: var(--accent-readable) !important;
}

.bcs-public-page .bcs-article-shell {
    background:
        radial-gradient(circle at 12% 8%, rgba(212, 135, 54, 0.08), transparent 30rem),
        linear-gradient(180deg, #111511 0%, #0b0d0b 100%);
}

.bcs-public-page .article-content,
.bcs-public-page article {
    font-family: 'Inter', system-ui, sans-serif;
}

.bcs-public-page .article-content h2,
.bcs-public-page .article-content h3,
.bcs-public-page article h2,
.bcs-public-page article h3 {
    font-family: 'Fraunces', Georgia, serif;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.bcs-public-page .article-content a,
.bcs-public-page article a {
    color: var(--accent);
    text-decoration-color: currentColor;
    text-underline-offset: 0.25em;
}

.bcs-public-page .news-toc a {
    color: var(--mid) !important;
    text-decoration: none;
}

.bcs-public-page .news-toc a:hover {
    color: var(--accent) !important;
}

body.bcs-article-page main,
body.bcs-article-page .bcs-article-shell {
    background:
        radial-gradient(circle at 14% 8%, rgba(212, 135, 54, 0.1), transparent 30rem),
        linear-gradient(90deg, rgba(29, 47, 37, 0.58) 0%, rgba(13, 16, 13, 0.98) 15%, rgba(13, 16, 13, 1) 85%, rgba(29, 47, 37, 0.52) 100%) !important;
}

body.bcs-article-page main,
body.bcs-article-page main section,
body.bcs-article-page main .grid {
    overflow: visible !important;
}

body.bcs-article-page aside:has(.news-toc) {
    align-self: stretch;
}

body.bcs-article-page .news-toc {
    position: sticky !important;
    top: 7rem !important;
    max-height: calc(100svh - 8.5rem);
    overflow: auto;
    background:
        radial-gradient(circle at 20% 0%, rgba(212, 135, 54, .1), transparent 18rem),
        rgba(22, 32, 25, .86) !important;
    border-color: rgba(243, 236, 216, .14) !important;
    color: var(--paper);
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 135, 54, .45) transparent;
}

body.bcs-article-page .news-toc::-webkit-scrollbar {
    width: 6px;
}

body.bcs-article-page .news-toc::-webkit-scrollbar-thumb {
    background: rgba(212, 135, 54, .45);
    border-radius: 999px;
}

body.bcs-article-page .article-panel {
    background:
        linear-gradient(180deg, rgba(243, 236, 216, .09), rgba(243, 236, 216, .045)) !important;
    border-color: rgba(243, 236, 216, .14) !important;
    color: rgba(243, 236, 216, .82);
    box-shadow: 0 35px 120px rgba(0, 0, 0, .18);
}

body.bcs-article-page .article-content {
    color: rgba(243, 236, 216, .82);
}

body.bcs-article-page .article-content h2,
body.bcs-article-page .article-content h3 {
    color: var(--paper);
}

body.bcs-article-page .article-content p,
body.bcs-article-page .article-content li {
    color: rgba(243, 236, 216, .76);
}

body.bcs-article-page .article-content blockquote {
    background: rgba(212, 135, 54, .06);
    border-left-color: var(--accent);
}

/* Tipografia di base per articoli con contenuto "nudo" (markdown→HTML senza classi
   utility, es. /news/). :where() ha specificità 0 → NON sovrascrive gli articoli che
   usano classi Tailwind inline (es. news_pages). Compensa il reset di Preflight. */
:where(body.bcs-article-page .article-content) h2 {
    font-size: clamp(1.6rem, 1rem + 2.2vw, 2.2rem);
    font-weight: 600;
    margin: 1.9em 0 .6em;
}
:where(body.bcs-article-page .article-content) h3 {
    font-size: clamp(1.3rem, .9rem + 1.4vw, 1.6rem);
    font-weight: 600;
    margin: 1.6em 0 .5em;
}
:where(body.bcs-article-page .article-content) p {
    margin: 0 0 1.15em;
    line-height: 1.78;
}
:where(body.bcs-article-page .article-content) ul,
:where(body.bcs-article-page .article-content) ol {
    margin: 0 0 1.3em;
    padding-left: 1.5em;
}
:where(body.bcs-article-page .article-content) ul { list-style: disc; }
:where(body.bcs-article-page .article-content) ol { list-style: decimal; }
:where(body.bcs-article-page .article-content) li { margin: .4em 0; line-height: 1.65; }
:where(body.bcs-article-page .article-content) strong { font-weight: 600; color: var(--paper); }

/* TOC: i link sono <a> diretti (senza <li>) → renderli a blocco con spaziatura */
.bcs-public-page .news-toc .toc-list a {
    display: block;
    padding: .3rem 0;
    line-height: 1.4;
    font-size: .86rem;
}

@media (max-width: 1023px) {
    .bcs-practice-page .section-grid,
    .bcs-practice-page .band__inner {
        grid-template-columns: 1fr;
    }

    .bcs-practice-page .section-grid > .section-kicker,
    .bcs-practice-page .section-grid > .card-grid {
        grid-column: auto;
        position: static;
    }

    .bcs-practice-page .card-grid {
        grid-template-columns: 1fr;
    }

    .bcs-practice-page .band__inner {
        align-items: start;
    }

    body.bcs-article-page .news-toc {
        position: relative !important;
        top: auto !important;
        max-height: none;
    }
}

/* Light mode mirrors the homepage: beige paper, dark text, dark footer. */
body.bcs-public-page.light-mode {
    background: linear-gradient(180deg, #faf6ed 0%, #f3ecd8 100%);
    color: #1b1712;
    color-scheme: light;
}

body.bcs-public-page.light-mode ::selection {
    background: #1b1712;
    color: #f3ecd8;
}

body.bcs-public-page.light-mode main {
    background:
        radial-gradient(circle at 12% 8%, rgba(212, 135, 54, 0.14), transparent 28rem),
        linear-gradient(180deg, #faf6ed 0%, #f3ecd8 100%);
    color: #1b1712;
}

body.bcs-public-page.light-mode header {
    background: rgba(243, 236, 216, 0.92) !important;
    border-color: rgba(27, 23, 18, 0.08) !important;
}

body.bcs-public-page.light-mode header .font-serif,
body.bcs-public-page.light-mode .nav-link,
body.bcs-public-page.light-mode #mobileMenuBtn {
    color: #1b1712 !important;
}

body.bcs-public-page.light-mode .nav-link.active {
    color: #1b1712 !important;
}

body.bcs-public-page.light-mode header .border-accent {
    background: #1b1712 !important;
    color: #f3ecd8 !important;
    border-color: #1b1712 !important;
}

body.bcs-public-page.light-mode header .border-accent:hover {
    background: var(--accent) !important;
    color: #1b1712 !important;
    border-color: var(--accent) !important;
}

body.bcs-public-page.light-mode .theme-toggle {
    color: #1b1712;
    border-color: rgba(27, 23, 18, 0.25);
    background: rgba(27, 23, 18, 0.04);
}

body.bcs-public-page.light-mode .theme-toggle:hover {
    border-color: #1b1712;
    background: #1b1712;
    color: #f3ecd8;
}

body.bcs-public-page.light-mode .header-search {
    border-color: rgba(27, 23, 18, 0.12) !important;
    background: rgba(27, 23, 18, 0.04) !important;
}

body.bcs-public-page.light-mode .header-search button,
body.bcs-public-page.light-mode .header-search input {
    color: #1b1712 !important;
}

body.bcs-public-page.light-mode .header-search input::placeholder {
    color: rgba(27, 23, 18, 0.42) !important;
}

body.bcs-public-page.light-mode main .text-white,
body.bcs-public-page.light-mode main .text-paper {
    color: #1b1712 !important;
}

body.bcs-public-page.light-mode main .text-gray-300,
body.bcs-public-page.light-mode main .text-gray-400,
body.bcs-public-page.light-mode main .text-mid {
    color: rgba(27, 23, 18, 0.62) !important;
}

body.bcs-public-page.light-mode .news-toc [class*="text-primary"] {
    color: var(--accent-readable-soft) !important;
}

body.bcs-public-page.light-mode .news-toc [class*="text-accent"] {
    color: var(--accent-readable) !important;
}

body.bcs-public-page.light-mode .news-toc .toc-list span {
    color: rgba(22, 19, 16, 0.34) !important;
}

body.bcs-public-page.light-mode .article-content [class*="text-primary"],
body.bcs-public-page.light-mode .article-content [class*="text-accent"] {
    color: var(--accent-readable) !important;
}

body.bcs-public-page.light-mode .article-content .lead,
body.bcs-public-page.light-mode .article-content p,
body.bcs-public-page.light-mode .article-content li {
    color: rgba(22, 19, 16, 0.76) !important;
}

body.bcs-public-page.light-mode .article-content h2,
body.bcs-public-page.light-mode .article-content h3 {
    color: #1b1712 !important;
}

body.bcs-public-page.light-mode main .bg-background-dark,
body.bcs-public-page.light-mode main .bg-surface-dark,
body.bcs-public-page.light-mode main .bg-ink,
body.bcs-public-page.light-mode main .bg-ink-soft {
    background-color: rgba(255, 255, 255, 0.72) !important;
}

body.bcs-practice-page.light-mode main {
    background:
        radial-gradient(circle at 12% 8%, rgba(212, 135, 54, .13), transparent 30rem),
        linear-gradient(90deg, #ebe4d8 0%, #faf6ed 14%, #f3ecd8 86%, #e7dfd2 100%) !important;
}

body.bcs-practice-page.light-mode .bg-surface-dark,
body.bcs-practice-page.light-mode .service-card,
body.bcs-practice-page.light-mode .feature-card,
body.bcs-practice-page.light-mode .signal-card {
    background: rgba(255, 252, 246, .72) !important;
    border-color: rgba(22, 19, 16, .13) !important;
    color: var(--ink);
}

body.bcs-practice-page.light-mode .section-title,
body.bcs-practice-page.light-mode .bcs-reading-card__title,
body.bcs-practice-page.light-mode .band__title {
    color: var(--ink) !important;
}

body.bcs-practice-page.light-mode #category-news > *,
body.bcs-practice-page.light-mode .bcs-reading-card {
    background: rgba(22, 19, 16, .92) !important;
    color: var(--paper);
}

body.bcs-practice-page.light-mode .bcs-reading-card__title,
body.bcs-practice-page.light-mode #category-news .bcs-reading-card__title {
    color: var(--paper) !important;
}

body.bcs-practice-page.light-mode .band {
    background:
        radial-gradient(circle at 86% 20%, rgba(212, 135, 54, .2), transparent 26rem),
        linear-gradient(135deg, rgba(29, 47, 37, .98), rgba(27, 23, 18, .98));
}

body.bcs-practice-page.light-mode .band__title {
    color: var(--paper) !important;
}

body.bcs-article-page.light-mode main,
body.bcs-article-page.light-mode .bcs-article-shell {
    background:
        radial-gradient(circle at 12% 8%, rgba(212, 135, 54, .12), transparent 28rem),
        linear-gradient(90deg, #ebe4d8 0%, #f3ecd8 14%, #efe8dc 86%, #e4dccf 100%) !important;
}

body.bcs-article-page.light-mode .news-toc {
    background:
        radial-gradient(circle at 20% 0%, rgba(139, 94, 36, .08), transparent 18rem),
        rgba(255, 252, 246, .74) !important;
    border-color: rgba(22, 19, 16, .18) !important;
    color: var(--ink);
}

body.bcs-article-page.light-mode .news-toc a {
    color: rgba(22, 19, 16, .58) !important;
}

body.bcs-article-page.light-mode .news-toc a:hover {
    color: var(--accent-readable) !important;
}

body.bcs-article-page.light-mode .article-panel {
    background: rgba(232, 221, 196, .78) !important;
    border-color: rgba(22, 19, 16, .18) !important;
    color: rgba(22, 19, 16, .82);
}

body.bcs-article-page.light-mode .article-content,
body.bcs-article-page.light-mode .article-content p,
body.bcs-article-page.light-mode .article-content li {
    color: rgba(22, 19, 16, .76) !important;
}

body.bcs-article-page.light-mode .article-content h2,
body.bcs-article-page.light-mode .article-content h3 {
    color: var(--ink) !important;
}

body.bcs-article-page.light-mode .article-content table {
    background: rgba(255, 252, 246, .80) !important;
    border-color: rgba(22, 19, 16, .18) !important;
}

body.bcs-article-page.light-mode .article-content th,
body.bcs-article-page.light-mode .article-content td {
    border-bottom-color: rgba(22, 19, 16, .12) !important;
}

body.bcs-article-page.light-mode .article-content td {
    color: rgba(22, 19, 16, .82) !important;
}

body.bcs-public-page.light-mode main .text-accent,
body.bcs-public-page.light-mode main .text-primary,
body.bcs-public-page.light-mode main .hover\:text-accent:hover,
body.bcs-public-page.light-mode main .hover\:text-primary:hover,
body.bcs-article-page.light-mode .article-content a,
body.bcs-article-page.light-mode .article-content th,
body.bcs-article-page.light-mode .article-content li::before,
body.bcs-article-page.light-mode .toc-list h2,
body.bcs-article-page.light-mode .toc-list .text-primary,
body.bcs-article-page.light-mode .news-toc .text-accent,
body.bcs-article-page.light-mode .news-toc .text-primary {
    color: var(--accent-readable) !important;
}

body.bcs-article-page.light-mode .news-toc .text-primary\/40 {
    color: rgba(22, 19, 16, .36) !important;
}

body.bcs-article-page.light-mode .news-toc [class*="text-primary/"],
body.bcs-article-page.light-mode .news-toc [class*="text-accent/"] {
    color: var(--accent-readable-soft) !important;
}

body.bcs-article-page.light-mode .news-toc .text-primary\/40 {
    color: rgba(22, 19, 16, .36) !important;
}

body.bcs-article-page.light-mode .article-content blockquote {
    border-left-color: var(--accent-readable) !important;
    background: rgba(139, 94, 36, .07);
}

body.bcs-article-page.light-mode .article-panel .cta-primary,
body.bcs-article-page.light-mode .article-panel .cta-primary span {
    background: var(--accent) !important;
    color: var(--ink) !important;
    text-decoration: none !important;
}

body.bcs-article-page.light-mode .article-panel .cta-primary:hover,
body.bcs-article-page.light-mode .article-panel .cta-primary:hover span {
    background: var(--ink) !important;
    color: var(--paper) !important;
}

body.bcs-public-page.light-mode main .bg-primary {
    background-color: var(--accent) !important;
    color: var(--ink) !important;
}

body.bcs-public-page.light-mode main .text-primary\/40 {
    color: rgba(22, 19, 16, .36) !important;
}

body.bcs-public-page.light-mode main .text-background-dark,
body.bcs-public-page.light-mode main .bg-primary .material-symbols-outlined,
body.bcs-public-page.light-mode main .bg-primary span {
    color: var(--ink) !important;
}

body.bcs-article-page.light-mode .article-panel > section .text-accent {
    color: var(--accent-readable) !important;
    font-weight: 700;
}

body.bcs-article-page.light-mode .article-panel > section .cta-primary,
body.bcs-article-page.light-mode .article-panel > section .cta-primary span,
body.bcs-practice-page.light-mode .band .cta-primary,
body.bcs-practice-page.light-mode .band .cta-primary span {
    color: var(--ink) !important;
}

body.bcs-public-page.light-mode footer,
body.bcs-public-page.light-mode footer.bg-ink {
    background: #1b1712 !important;
    color: #f3ecd8 !important;
}

body.bcs-public-page.light-mode footer .text-paper {
    color: #f3ecd8 !important;
}

body.bcs-public-page.light-mode footer .text-mid {
    color: #a89880 !important;
}

body.bcs-public-page.light-mode #mobileMenu {
    background: #f3ecd8 !important;
}

body.bcs-public-page.light-mode #mobileMenu a,
body.bcs-public-page.light-mode #mobileMenu input {
    color: #1b1712 !important;
}

/* Light-mode contrast rescue for dark practice-page modules. */
body.bcs-practice-page.light-mode #category-news > *,
body.bcs-practice-page.light-mode .bcs-reading-card,
body.bcs-practice-page.light-mode .band {
    color: var(--paper) !important;
}

body.bcs-practice-page.light-mode #category-news .bcs-reading-card__title,
body.bcs-practice-page.light-mode .bcs-reading-card .bcs-reading-card__title,
body.bcs-practice-page.light-mode .band .band__title {
    color: var(--paper) !important;
}

body.bcs-practice-page.light-mode #category-news .bcs-reading-card__copy,
body.bcs-practice-page.light-mode .bcs-reading-card .bcs-reading-card__copy,
body.bcs-practice-page.light-mode .band .band__copy,
body.bcs-practice-page.light-mode .band p {
    color: rgba(243, 236, 216, 0.72) !important;
}

body.bcs-practice-page.light-mode #category-news .bcs-reading-card__date,
body.bcs-practice-page.light-mode .bcs-reading-card .bcs-reading-card__date,
body.bcs-practice-page.light-mode .band .eyebrow {
    color: rgba(243, 236, 216, 0.58) !important;
}

body.bcs-practice-page.light-mode #category-news .bcs-reading-card__tag,
body.bcs-practice-page.light-mode .bcs-reading-card .bcs-reading-card__tag,
body.bcs-practice-page.light-mode #category-news .bcs-reading-card__link,
body.bcs-practice-page.light-mode .bcs-reading-card .bcs-reading-card__link,
body.bcs-practice-page.light-mode .band .text-accent {
    color: var(--accent) !important;
}

body.bcs-practice-page.light-mode .band .cta-primary {
    background: var(--accent) !important;
    color: var(--ink) !important;
}

@media (max-width: 1023px) {
    .bcs-public-page .header-search input {
        width: 100%;
        opacity: 1;
        padding: 0;
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bcs-public-page *,
    .bcs-public-page *::before,
    .bcs-public-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   BELLE ÉPOQUE REFINEMENT LAYER
   ------------------------------------------------------------
   - Restrained brass accent (used sparely, never as primary fill)
   - Warm ink + cream paper alternation
   - Mobile-first contrast + touch-target guards
   - Vintage editorial flourishes (hairline rules, italic display)
   ============================================================ */

/* Refined body gradient — paper-textured warmth, no neon halo */
body.bcs-public-page {
    background:
        radial-gradient(circle at 12% -8%, rgba(212, 135, 54, 0.07), transparent 38%),
        radial-gradient(circle at 92% 6%, rgba(212, 135, 54, 0.04), transparent 28%),
        linear-gradient(180deg, #241f1a 0%, var(--ink) 30%, var(--ink-deep) 100%);
}

body.bcs-public-page main {
    background:
        radial-gradient(circle at 16% 12%, rgba(212, 135, 54, 0.06), transparent 30rem),
        linear-gradient(180deg, rgba(22, 19, 16, 0.98), rgba(12, 10, 7, 1));
}

/* Selection refined — brass on ink, paper on brass */
body.bcs-public-page::selection,
body.bcs-public-page ::selection {
    background: var(--accent);
    color: var(--ink);
}
body.bcs-public-page.light-mode::selection,
body.bcs-public-page.light-mode ::selection {
    background: var(--ink);
    color: var(--paper);
}

/* CTA primary — typewriter brass plate, tighter spacing */
.bcs-public-page .cta-primary {
    background: var(--accent);
    color: var(--ink) !important;
    border: 1px solid var(--accent);
    letter-spacing: 0.18em;
    font-weight: 600;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 0 0 rgba(212, 135, 54, 0);
}
.bcs-public-page .cta-primary:hover,
.bcs-public-page .cta-primary:focus-visible {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(122, 91, 42, 0.28);
}

/* CTA underline — thin brass-on-paper line that slides in */
.bcs-public-page .cta-underline {
    color: var(--paper);
    border-bottom: 1px solid var(--accent);
    letter-spacing: 0.14em;
    transition: color 0.3s ease, border-color 0.3s ease;
}
.bcs-public-page .cta-underline:hover {
    color: var(--accent-strong);
    border-color: var(--accent-strong);
}
body.bcs-public-page.light-mode .cta-underline { color: var(--ink); }
body.bcs-public-page.light-mode .cta-underline:hover { color: var(--accent-readable); border-color: var(--accent-readable); }

/* Hairline rule — vintage editorial double-line */
.bcs-public-page hr,
.bcs-public-page .editorial-rule {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 2.5rem auto;
    max-width: 14rem;
}

/* Headings — slightly italicised display, vintage masthead feel */
.bcs-public-page .display-mega em,
.bcs-public-page .display-l em,
.bcs-public-page .display-m em {
    font-style: italic;
    font-weight: 300;
    color: var(--accent);
}

/* Eyebrow tags — brass uppercase mono */
.bcs-public-page .eyebrow,
.bcs-public-page [class*="__eyebrow"] {
    color: var(--accent);
}

/* Paper sections — invert to ink on cream, never grey-on-grey */
.bcs-public-page .bcs-paper-section,
.bcs-public-page section.bcs-paper-section,
.bcs-public-page div.bcs-paper-section {
    background: var(--paper) !important;
    color: var(--ink) !important;
}
.bcs-public-page .bcs-paper-section .text-accent,
.bcs-public-page .bcs-paper-section .eyebrow,
.bcs-public-page .bcs-paper-section [class*="__eyebrow"] {
    color: var(--accent-readable) !important;
}

/* Marquee separator — accent star (brass) */
.bcs-public-page .marquee__item::after { color: var(--accent); }

/* Light mode contrast hardening — never paper-on-paper, never ink-on-ink */
body.bcs-public-page.light-mode {
    background:
        radial-gradient(circle at 90% -4%, rgba(212, 135, 54, 0.08), transparent 32%),
        linear-gradient(180deg, #fbf6ed 0%, var(--paper) 30%, #e4d4b8 100%);
    color: var(--ink);
}
body.bcs-public-page.light-mode main {
    background:
        radial-gradient(circle at 16% 12%, rgba(212, 135, 54, 0.05), transparent 30rem),
        linear-gradient(180deg, rgba(243, 236, 216, 0.96), rgba(232, 221, 196, 0.94));
}
body.bcs-public-page.light-mode .text-paper,
body.bcs-public-page.light-mode main .text-paper { color: var(--ink) !important; }
body.bcs-public-page.light-mode .text-mid { color: rgba(22, 19, 16, 0.62) !important; }
body.bcs-public-page.light-mode .border-rule,
body.bcs-public-page.light-mode .border-paper\/10 { border-color: rgba(22, 19, 16, 0.12) !important; }
body.bcs-public-page.light-mode .nav-link { color: var(--ink); }
body.bcs-public-page.light-mode .nav-link.active { color: var(--accent-readable); }
body.bcs-public-page.light-mode .nav-link::after { background: var(--accent-readable); }
body.bcs-public-page.light-mode .text-accent { color: var(--accent-readable) !important; }
body.bcs-public-page.light-mode .border-accent { border-color: var(--accent-readable) !important; }
body.bcs-public-page.light-mode .cta-primary {
    background: var(--ink);
    color: var(--paper) !important;
    border-color: var(--ink);
}
body.bcs-public-page.light-mode .cta-primary:hover,
body.bcs-public-page.light-mode .cta-primary:focus-visible {
    background: var(--accent-readable);
    border-color: var(--accent-readable);
    color: var(--paper) !important;
}
body.bcs-public-page.light-mode .display-mega em,
body.bcs-public-page.light-mode .display-l em,
body.bcs-public-page.light-mode .display-m em { color: var(--accent-readable); }
body.bcs-public-page.light-mode .marquee__item::after { color: var(--accent-readable); }
body.bcs-public-page.light-mode .eyebrow,
body.bcs-public-page.light-mode [class*="__eyebrow"] { color: var(--accent-readable); }
body.bcs-public-page.light-mode hr,
body.bcs-public-page.light-mode .editorial-rule {
    background: linear-gradient(90deg, transparent, var(--accent-readable), transparent);
}
body.bcs-public-page.light-mode .header-search {
    border-color: rgba(22, 19, 16, 0.16) !important;
    background: rgba(22, 19, 16, 0.04) !important;
}
body.bcs-public-page.light-mode .theme-toggle {
    border-color: rgba(22, 19, 16, 0.2);
    background: rgba(22, 19, 16, 0.04);
    color: var(--ink);
}
body.bcs-public-page.light-mode .theme-toggle:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* Auto contrast safety on Tailwind utility classes that may collide
   in either mode (e.g. bg-ink wrapper showing in light mode without
   explicit text color). Forces a legible foreground if missing. */
.bcs-public-page .bg-ink:not([class*="text-"]) { color: var(--paper); }
.bcs-public-page .bg-paper:not([class*="text-"]) { color: var(--ink); }
.bcs-public-page .bg-ink-soft:not([class*="text-"]) { color: var(--paper); }

/* Mobile optimisation
   ------------------------------------------------------------
   - Touch targets ≥44px (WCAG AA)
   - Tighter side-padding on small viewports
   - Hero typography rescaled for legibility
   - Marquee speed adjusted for short screens */
@media (max-width: 639px) {
    .bcs-public-page .nav-link,
    .bcs-public-page .cta-underline,
    .bcs-public-page .cta-primary,
    .bcs-public-page .theme-toggle,
    .bcs-public-page button,
    .bcs-public-page a[role="button"] {
        min-height: 44px;
    }
    .bcs-public-page .cta-primary {
        padding: 0.95rem 1.5rem;
        font-size: 0.78rem;
        letter-spacing: 0.16em;
    }
    .bcs-public-page header {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .bcs-public-page main {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .bcs-public-page .hero-stats-badge,
    .bcs-public-page .hero-float-tag {
        font-size: 0.62rem !important;
    }
    .bcs-public-page .marquee__item {
        font-size: 1.15rem !important;
        padding: 0.85rem 1.5rem !important;
        gap: 1.25rem !important;
    }
    .bcs-public-page .display-mega {
        font-size: clamp(2.6rem, 14vw, 5rem) !important;
    }
    .bcs-public-page .display-l {
        font-size: clamp(2rem, 10vw, 3.4rem) !important;
    }
    .bcs-public-page .display-m {
        font-size: clamp(1.5rem, 7vw, 2.4rem) !important;
    }
    .bcs-public-page .body-lg {
        font-size: 1rem;
        line-height: 1.6;
    }
    /* Stack marquee items more comfortably on tiny screens */
    .bcs-public-page .marquee__track { animation-duration: 28s; }
    /* Tighten section vertical rhythm */
    .bcs-public-page section {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }
}

@media (max-width: 480px) {
    .bcs-public-page header [data-magnetic] span:first-child img {
        height: 28px !important;
    }
    .bcs-public-page .masthead-title {
        font-size: clamp(1.55rem, 7vw, 2rem);
    }
    /* Single-column hero stack: portrait drops below copy */
    .bcs-public-page .hero-portrait {
        max-width: 320px;
        margin: 2rem auto 0;
    }
}

/* Mobile footer containment: prevents the colophon column from spilling outside
   the viewport when long addresses or emails are rendered on narrow screens. */
@media (max-width: 767px) {
    footer[data-bcs-shell="footer"] {
        overflow-x: hidden !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    footer[data-bcs-shell="footer"] > div,
    footer[data-bcs-shell="footer"] .max-w-\[1400px\] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    footer[data-bcs-shell="footer"] .grid.grid-cols-12 {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 2rem !important;
    }

    footer[data-bcs-shell="footer"] .grid.grid-cols-12 > * {
        grid-column: 1 / -1 !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    footer[data-bcs-shell="footer"] p,
    footer[data-bcs-shell="footer"] a,
    footer[data-bcs-shell="footer"] li,
    footer[data-bcs-shell="footer"] address {
        overflow-wrap: anywhere;
        word-break: normal;
    }
}

/* Tablet refinement */
@media (min-width: 640px) and (max-width: 1023px) {
    .bcs-public-page .display-mega {
        font-size: clamp(4rem, 11vw, 8rem) !important;
    }
    .bcs-public-page main {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Print — strip backgrounds, force ink on paper */
@media print {
    body.bcs-public-page,
    body.bcs-public-page main {
        background: #fff !important;
        color: #000 !important;
    }
    .bcs-public-page header,
    .bcs-public-page .marquee,
    .bcs-public-page .wa-fab,
    .bcs-public-page .sticky-cta { display: none !important; }
}

/* =====================================================================
 * Premium tech enhancements — Desert Tech
 * ===================================================================== */

/* Scanline overlay for dark/tech sections */
.bcs-scanline {
    position: relative;
}
.bcs-scanline::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.02;
    z-index: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(77, 184, 184, 0.4) 3px,
        rgba(77, 184, 184, 0.4) 4px
    );
}

/* Premium card hover glow */
[class*="hover:bg-ink-soft"] {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
[class*="hover:bg-ink-soft"]:hover {
    box-shadow: 0 4px 24px rgba(212, 135, 54, 0.08), inset 0 1px 0 rgba(77, 184, 184, 0.04);
    transform: translateY(-2px);
}

/* Display headings subtle depth */
.bcs-public-page .display-l,
.bcs-public-page .display-m {
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

/* Scroll progress glow (shared) */
.scroll-progress {
    box-shadow: 0 0 8px rgba(212, 135, 54, 0.4);
}

/* Back to top glow */
#backToTop {
    box-shadow: 0 4px 20px rgba(212, 135, 54, 0.3);
}

/* =====================================================================
 * NEWS / ARTICLE — MOBILE REFINEMENT  (≤640px)
 * ---------------------------------------------------------------------
 * Additive, mobile-only, article-scoped layer. Desktop is untouched
 * (no rule fires above 640px). Selectors are prefixed with
 * `body.bcs-article-page` (specificity 0,0,2,1) so they win over the
 * `:where()` base rules and the per-page inline <style>, without
 * !important wars. Goal: surface the article sooner (tame the hero),
 * comfortable reading rhythm, scrollable tables, generous tap targets.
 * ===================================================================== */
@media (max-width: 640px) {
    /* Defensive: never allow sideways scroll on a phone */
    body.bcs-article-page { overflow-x: hidden; }
    body.bcs-article-page .news-hero h1,
    body.bcs-article-page .article-content,
    body.bcs-article-page .article-content h2,
    body.bcs-article-page .article-content h3,
    body.bcs-article-page .article-content li {
        overflow-wrap: break-word;
        hyphens: auto;
    }

    /* Hero — stop it eating the whole first screen.
       Compact title, shorter cover, tighter padding and gaps. */
    body.bcs-article-page .news-hero {
        padding: 1.5rem 1.15rem !important;
        border-radius: 1.4rem;
        margin-bottom: 0.5rem;
    }
    body.bcs-article-page .news-hero .grid {
        gap: 1.1rem !important;
    }
    body.bcs-article-page .news-hero h1 {
        font-size: clamp(1.85rem, 7.4vw, 2.5rem) !important;
        line-height: 1.05 !important;
        letter-spacing: -0.03em;
        margin-bottom: 0.25rem;
    }
    body.bcs-article-page .news-hero .summary-text {
        margin-top: 1.15rem !important;
        font-size: 1.02rem !important;
        line-height: 1.6;
    }
    /* Shorten the cover (4:3 full-width adds ~270px) → cinematic 16:9 */
    body.bcs-article-page .news-hero figure {
        aspect-ratio: 16 / 9 !important;
        border-radius: 1.2rem;
    }
    /* Trim the content section's top air now that the hero is compact */
    body.bcs-article-page main > section:last-of-type {
        padding-top: 2.25rem !important;
        padding-bottom: 2.75rem !important;
    }

    /* Article panel — comfortable, not cramped, not bloated */
    body.bcs-article-page .article-panel {
        padding: 1.4rem 1.15rem !important;
        border-radius: 1.4rem;
    }

    /* Reading rhythm — tame the desktop-sized heading margins */
    body.bcs-article-page .article-content h2 { margin: 1.5em 0 .5em !important; }
    body.bcs-article-page .article-content h3 { margin: 1.3em 0 .4em !important; }
    body.bcs-article-page .article-content p  { line-height: 1.72; }

    /* Tables — scroll instead of squishing into unreadable columns */
    body.bcs-article-page .article-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0.8rem;
    }
    body.bcs-article-page .article-content th,
    body.bcs-article-page .article-content td {
        padding: 0.6rem 0.7rem !important;
        font-size: 0.9rem;
    }

    /* TOC (stacks inline on mobile) — compact, denser chrome, still tappable.
       Trims the heading margin, link rhythm and the "Torna al Blog" block so
       the index doesn't push the article body too far down the page. */
    body.bcs-article-page .news-toc {
        padding: 1rem 1.1rem !important;
        border-radius: 1.1rem;
    }
    body.bcs-article-page .news-toc h2 {
        margin-bottom: 0.6rem !important;
    }
    body.bcs-article-page .news-toc .toc-list {
        margin: 0 !important;
    }
    body.bcs-article-page .news-toc .toc-list a {
        padding: 0.28rem 0 !important;
        font-size: 0.88rem;
        line-height: 1.3;
    }
    body.bcs-article-page .news-toc .toc-list a + a {
        margin-top: 0.15rem !important;
    }
    body.bcs-article-page .news-toc nav + div {
        margin-top: 0.85rem !important;
        padding-top: 0.75rem !important;
    }

    /* End-of-article modules (CTA / author / related) — trim padding,
       cap the CTA headline so it doesn't tower on a phone */
    body.bcs-article-page .article-panel > section,
    body.bcs-article-page .bcs-author-card {
        padding: 1.5rem 1.25rem !important;
        border-radius: 1.4rem;
    }
    body.bcs-article-page .article-panel > section h2 {
        font-size: clamp(1.55rem, 6.4vw, 2.1rem) !important;
        line-height: 1.12;
    }
}

/* =====================================================================
 * NEWS / ARTICLE — MOBILE REFINEMENT v2  (≤640px)
 * Completa 061914f: fix overflow orizzontale (grid item) + media/box/
 * blockquote/liste/FAQ. Additivo, article-scoped, desktop intatto.
 * ===================================================================== */
@media (max-width: 640px) {
    /* FIX overflow: il layout articolo e una griglia Tailwind grid-cols-12
       (TOC + corpo) che NON collassava su mobile: gap-10 (40px) x 11 = 440px di
       gap dentro un container da ~310px -> tracce a 0 e l'articolo sforava a 440px,
       trascinando la tabella (061914f lo CLIPpava con overflow-x:hidden, non lo
       risolveva). La impiliamo a 1 colonna: TOC sopra, corpo sotto, full-width. */
    body.bcs-article-page main .grid.grid-cols-12 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    body.bcs-article-page main .grid.grid-cols-12 > * { min-width: 0; }

    /* Media e contenuti larghi non sforano mai */
    body.bcs-article-page .article-content img,
    body.bcs-article-page .article-content video,
    body.bcs-article-page .article-content iframe {
        max-width: 100% !important;
        height: auto;
        border-radius: 0.8rem;
    }
    body.bcs-article-page .article-content pre {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Box evidenza piu compatti */
    body.bcs-article-page .article-content .bg-surface-dark {
        padding: 1.15rem 1.1rem !important;
        border-radius: 1rem;
    }

    /* Blockquote: leggibile, non proporzioni da desktop */
    body.bcs-article-page .article-content blockquote {
        font-size: 1.1rem !important;
        padding: 0.85rem 0 0.85rem 1.05rem !important;
        margin: 1.6rem 0 !important;
    }

    /* Liste piu compatte */
    body.bcs-article-page .article-content ul,
    body.bcs-article-page .article-content ol { margin: 1.1rem 0 1.4rem !important; }
    body.bcs-article-page .article-content li { margin-bottom: 0.5rem; }

    /* FAQ: gli h4 (Domande) ora hanno ritmo e dimensione coerenti */
    body.bcs-article-page .article-content h4 {
        font-size: 1.06rem;
        line-height: 1.3;
        margin: 1.3em 0 0.35em;
    }
}

/* Fix mobile TOC news: l'aside dell'indice era generato senza col-span base, quindi nella
   griglia a 12 colonne collassava a ~1/12 di larghezza su mobile, schiacciando il testo
   "INDICE CONTENUTI" in verticale. Questa regola ripara le pagine news GIA' pubblicate
   (HTML statico congelato prima del fix). Il template news_template.php e' stato corretto
   con "col-span-12" base per i futuri articoli, che avranno una classe diversa (questa
   regola non li tocca, ne' serve). Selettore ad attributo esatto = colpisce solo il TOC rotto. */
@media (max-width: 1023px) {
    aside[class="lg:col-span-4 xl:col-span-3"] {
        grid-column: 1 / -1;
    }
}
