/* ═══════════════════════════════════════════════════════════════════════════
   British Health News — Refined Editorial Stylesheet
   Aesthetic: Clean, authoritative British press with warm accents
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   CSS Custom Properties — Light Theme (Default)
   ───────────────────────────────────────────────────────────────────────────── */

:root {
    /* Typography — BBC/Guardian British style */
    --font-display: 'Guardian Egyptian', Georgia, 'Times New Roman', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    /* Core Colors — BBC/Guardian inspired: crisp, authoritative */
    --color-ink: #121212;
    --color-ink-muted: #505050;
    --color-ink-light: #767676;
    --color-paper: #ffffff;
    --color-paper-warm: #f6f6f6;
    --color-paper-cool: #f1f1f1;
    /* Accent — BBC Red */
    --color-accent: #bb1919;
    --color-accent-hover: #9a1414;
    --color-accent-light: #fef2f2;
    /* Secondary — Guardian Yellow highlight */
    --color-highlight: #ffe500;
    --color-highlight-light: #fffbe6;
    /* Semantic */
    --color-warning: #b8860b;
    --color-warning-bg: #fef9e7;
    --color-error: #c0392b;
    --color-success: #27ae60;
    /* Borders & Shadows */
    --color-border: #e8e6e1;
    --color-border-strong: #d1cfc9;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
    /* Layout */
    --header-height: 64px;
    --max-width: 1320px;
    --content-width: 820px;
    --rail-width: 340px;
    --gap: 48px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Reset & Base
   ───────────────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-ink);
    background-color: var(--color-paper);
    min-height: 100vh;
    transition: background-color var(--duration-normal) var(--ease-out), color var(--duration-normal) var(--ease-out);
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--color-accent-hover);
}

ul,
ol {
    list-style: none;
}

/* Focus styles */

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Selection */

::selection {
    background-color: var(--color-accent-light);
    color: var(--color-ink);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UK-SPECIFIC LAYOUT - BBC/Guardian Style
   ═══════════════════════════════════════════════════════════════════════════ */

/* BBC-style Top Utility Bar - always dark */

.uk-top-bar {
    background: #1a1a1a;
    color: white;
    font-size: 0.75rem;
    font-family: var(--font-ui);
}

.uk-top-bar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uk-top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.uk-date-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

.uk-date-badge svg {
    opacity: 0.7;
}

.uk-top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.uk-top-bar-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.uk-top-bar-link:hover {
    color: white;
    text-decoration: underline;
}

.uk-theme-toggle {
    width: 52px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    padding: 0;
}

.uk-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
}

.uk-theme-toggle .theme-toggle-thumb {
    position: absolute;
    width: 22px;
    height: 22px;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: left 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uk-theme-toggle .theme-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.uk-theme-toggle .theme-toggle-sun {
    color: #f59e0b;
}

.uk-theme-toggle .theme-toggle-moon {
    color: #a5b4fc;
    display: none;
}

/* UK Header - BBC/Guardian Masthead style */

.uk-header {
    border-bottom: none;
    position: relative;
}

.uk-main-header {
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-border);
    transition: background-color var(--duration-normal) var(--ease-out);
}

.uk-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.uk-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--color-ink);
    flex-shrink: 0;
}

.uk-logo-icon {
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.uk-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.uk-logo-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-ink);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.uk-logo-tagline {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--color-ink-muted);
}

.uk-header-center {
    flex: 1;
    max-width: 400px;
    margin: 0 auto;
}

.uk-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.uk-search-input {
    width: 100%;
    padding: 10px 44px 10px 16px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    background: var(--color-paper-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: border-color 0.2s, background-color 0.2s;
}

.uk-search-input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-paper);
}

.uk-search-input::placeholder {
    color: var(--color-ink-light);
}

.uk-search-btn {
    position: absolute;
    right: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-muted);
    background: transparent;
    border-radius: var(--radius-full);
    transition: color 0.2s, background-color 0.2s;
}

.uk-search-btn:hover {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

.uk-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.uk-social-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.uk-social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-muted);
    background: var(--color-paper-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all 0.2s;
}

.uk-social-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: var(--color-accent-light);
}

/* UK Navigation Bar - Guardian style with colored underlines */

.uk-nav-bar {
    background: var(--color-paper);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 999;
}

.uk-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 48px;
}

.uk-nav-toggle {
    display: none;
}

.uk-mobile-search {
    display: none;
}

.uk-nav-menu {
    display: flex;
    gap: 0;
    flex: 1;
}

.uk-nav-link {
    position: relative;
    padding: 14px 18px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-ink);
    text-decoration: none;
    transition: color 0.2s;
}

.uk-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    transition: background-color 0.2s;
}

.uk-nav-link:hover {
    color: var(--color-accent);
}

/* Colored underlines for each category - Guardian style */

.uk-nav-link--uk:hover::after,
.uk-nav-link--uk.uk-nav-link--active::after {
    background: #c70000;
}

.uk-nav-link--health:hover::after,
.uk-nav-link--health.uk-nav-link--active::after {
    background: #bb1919;
}

.uk-nav-link--science:hover::after,
.uk-nav-link--science.uk-nav-link--active::after {
    background: #633399;
}

.uk-nav-link--lifestyle:hover::after,
.uk-nav-link--lifestyle.uk-nav-link--active::after {
    background: #f5be2c;
}

.uk-nav-link--wellbeing:hover::after,
.uk-nav-link--wellbeing.uk-nav-link--active::after {
    background: #22874d;
}

.uk-nav-link--opinion:hover::after,
.uk-nav-link--opinion.uk-nav-link--active::after {
    background: #e05e00;
}

.uk-nav-link--world:hover::after,
.uk-nav-link--world.uk-nav-link--active::after {
    background: #0084c6;
}

.uk-nav-link--active {
    color: var(--color-accent);
}

/* Desktop only elements */

.uk-desktop-only {
    display: inline;
}

/* Mobile Responsive UK Header */

@media (max-width: 1024px) {
    .uk-header-center {
        display: none;
    }
}

@media (max-width: 900px) {
    .uk-logo-tagline {
        display: none;
    }
    .uk-logo-title {
        font-size: 1.25rem;
    }
    .uk-social-links {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Hide Sign In / Register on mobile */
    .uk-desktop-only {
        display: none;
    }
    /* Top bar - show date, theme toggle only */
    .uk-top-bar {
        padding: 8px 16px;
    }
    .uk-top-bar-inner {
        padding: 0;
    }
    .uk-top-bar-left {
        flex: 1;
    }
    .uk-date-badge {
        font-size: 0.75rem;
    }
    .uk-date-badge svg {
        width: 12px;
        height: 12px;
    }
    .uk-top-bar-right {
        flex-shrink: 0;
    }
    /* Theme toggle - proper colors on dark bar */
    .uk-theme-toggle {
        width: 46px;
        height: 26px;
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    .uk-theme-toggle:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    .uk-theme-toggle .theme-toggle-thumb {
        width: 20px;
        height: 20px;
        left: 3px;
    }
    /* Main header */
    .uk-header-inner {
        padding: 14px 16px;
    }
    .uk-logo-title {
        font-size: 1.2rem;
    }
    /* Navigation bar */
    .uk-nav-bar {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    .uk-nav-inner {
        padding: 0 16px;
        height: 48px;
        justify-content: space-between;
    }
    .uk-nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 10px;
        background: transparent;
        border: none;
        cursor: pointer;
    }
    .uk-nav-toggle .nav-toggle-bar {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--color-ink);
        border-radius: 2px;
        transition: transform 0.3s, opacity 0.3s;
    }
    .uk-nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .uk-nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }
    .uk-nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    .uk-nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        background: var(--color-paper);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        padding: 8px 0;
        z-index: 100;
    }
    .uk-nav-menu.is-open {
        display: flex;
    }
    .uk-nav-link {
        padding: 14px 20px;
        border-left: 4px solid transparent;
        font-size: 1rem;
    }
    .uk-nav-link::after {
        display: none;
    }
    .uk-nav-link--uk:hover,
    .uk-nav-link--uk.uk-nav-link--active {
        border-left-color: #c70000;
        background: rgba(199, 0, 0, 0.05);
    }
    .uk-nav-link--health:hover,
    .uk-nav-link--health.uk-nav-link--active {
        border-left-color: #bb1919;
        background: rgba(187, 25, 25, 0.05);
    }
    .uk-nav-link--science:hover,
    .uk-nav-link--science.uk-nav-link--active {
        border-left-color: #633399;
        background: rgba(99, 51, 153, 0.05);
    }
    .uk-nav-link--lifestyle:hover,
    .uk-nav-link--lifestyle.uk-nav-link--active {
        border-left-color: #f5be2c;
        background: rgba(245, 190, 44, 0.05);
    }
    .uk-nav-link--wellbeing:hover,
    .uk-nav-link--wellbeing.uk-nav-link--active {
        border-left-color: #22874d;
        background: rgba(34, 135, 77, 0.05);
    }
    .uk-nav-link--opinion:hover,
    .uk-nav-link--opinion.uk-nav-link--active {
        border-left-color: #e05e00;
        background: rgba(224, 94, 0, 0.05);
    }
    .uk-nav-link--world:hover,
    .uk-nav-link--world.uk-nav-link--active {
        border-left-color: #0084c6;
        background: rgba(0, 132, 198, 0.05);
    }
    /* Show mobile search button */
    .uk-mobile-search {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        color: var(--color-ink-muted);
        background: transparent;
        border: none;
        cursor: pointer;
        margin-left: auto;
    }
    .uk-mobile-search:hover {
        color: var(--color-accent);
    }
}

@media (max-width: 480px) {
    .uk-top-bar {
        padding: 6px 12px;
    }
    .uk-date-badge {
        font-size: 0.7rem;
    }
    .uk-header-inner {
        padding: 12px 12px;
    }
    .uk-logo-title {
        font-size: 1.05rem;
    }
    .uk-nav-inner {
        padding: 0 12px;
        height: 44px;
    }
    .uk-nav-link {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-border);
    transition: background-color var(--duration-normal) var(--ease-out), border-color var(--duration-normal) var(--ease-out);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Logo */

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-ink);
    flex-shrink: 0;
}

.logo-mark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-highlight) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    .logo-text {
        display: none;
    }
}

/* Navigation */

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-ink);
    border-radius: 1px;
    transition: transform var(--duration-normal) var(--ease-out), opacity var(--duration-fast);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-ink-muted);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.nav-link:hover {
    color: var(--color-ink);
    background: var(--color-paper-warm);
}

.nav-link--active {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

.nav-link--active:hover {
    color: var(--color-accent);
    background: var(--color-accent-light);
}

/* Header Right */

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Search */

.search-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-muted);
    border-radius: var(--radius-full);
    transition: color var(--duration-fast), background-color var(--duration-fast);
}

.search-toggle:hover {
    color: var(--color-ink);
    background: var(--color-paper-warm);
}

.search-box {
    position: absolute;
    top: 100%;
    right: 24px;
    width: 320px;
    padding: 16px;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 8px;
    animation: slideDown var(--duration-normal) var(--ease-out);
}

.search-box[hidden] {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--color-paper-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.search-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-muted);
    border-radius: var(--radius-sm);
}

.search-close:hover {
    background: var(--color-paper-warm);
    color: var(--color-ink);
}

/* Theme Toggle */

/* Mobile Nav */

@media (max-width: 768px) {
    .header-inner {
        justify-content: flex-start;
    }
    .header-left {
        order: 2;
    }
    .main-nav {
        flex: 0;
        order: 1;
        margin-right: 12px;
    }
    .header-right {
        order: 3;
        margin-left: auto;
    }
    .nav-toggle {
        display: flex;
    }
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 16px;
        background: var(--color-paper);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        display: none;
    }
    .nav-menu.is-open {
        display: flex;
    }
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .main-content {
        padding: 32px 24px;
    }
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr var(--rail-width);
    gap: var(--gap);
    align-items: start;
}

@media (max-width: 1100px) {
    .main-content {
        display: flex;
        flex-direction: column;
    }
    .content-grid {
        display: contents;
    }
    .content-grid>* {
        min-width: 0;
        max-width: 100%;
    }
    .article {
        order: 1;
    }
    .comments-section {
        order: 2;
    }
    .faq-section {
        order: 3;
    }
    .cta-section--footer {
        order: 4;
    }
    .sidebar-rail {
        order: 5;
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE
   ═══════════════════════════════════════════════════════════════════════════ */

.article {
    max-width: var(--content-width);
    width: 100%;
}

/* Breadcrumbs */

.breadcrumbs {
    margin-bottom: 24px;
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--color-ink-light);
}

.breadcrumbs-list li {
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumbs-list li:not(:last-child)::after {
    content: '›';
    margin-left: 4px;
    color: var(--color-ink-light);
}

.breadcrumbs-list a {
    color: var(--color-ink-muted);
}

.breadcrumbs-list a:hover {
    color: var(--color-accent);
}

/* Article Header */

.article-header {
    margin-bottom: 32px;
}

.article-category {
    margin-bottom: 16px;
}

.category-tag {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    padding: 6px 12px;
    background: var(--color-accent-light);
    border-radius: var(--radius-sm);
}

.article-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-ink);
    margin-bottom: 16px;
}

.article-standfirst {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.5;
    color: var(--color-ink-muted);
    font-style: italic;
    border-left: 3px solid var(--color-accent);
    padding-left: 16px;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.author-name {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-ink);
}

.author-role {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--color-ink-light);
}

.article-date-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--color-ink-muted);
}

.article-read-time {
    font-size: 0.7rem;
    color: var(--color-ink-light);
}

@media (max-width: 600px) {
    .author-avatar {
        display: none;
    }
}

@media (max-width: 350px) {
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .article-date-info {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }
    .article-read-time::before {
        content: "·";
        margin-right: 6px;
    }
}

/* Hero Image */

.article-hero {
    margin-bottom: 40px;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-paper-warm);
}

.hero-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.hero-caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 0;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--color-ink-light);
}

.caption-credit {
    font-style: italic;
}

/* Gallery badge - Independent style */

.gallery-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-ink);
}

.gallery-badge i {
    font-size: 1rem;
    color: var(--color-ink-muted);
}

/* Article Figure — Independent style in-article image */

.article-figure {
    margin: 2em 0;
}

.figure-image-wrapper {
    position: relative;
    overflow: hidden;
}

.figure-image {
    width: 100%;
    height: auto;
    display: block;
}

.figure-caption {
    padding: 12px 0;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-ink-muted);
}

.figure-caption .caption-credit {
    font-style: italic;
    color: var(--color-ink-light);
}

/* Gallery Lightbox */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
    z-index: 10;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-content {
    max-width: 100%;
    max-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 180px);
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.lightbox-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 20px 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.lightbox-caption {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    max-width: 70%;
}

.lightbox-credit {
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
}

.lightbox-counter {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .lightbox-container {
        padding: 50px 16px;
    }
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .lightbox-prev {
        left: 10px;
    }
    .lightbox-next {
        right: 10px;
    }
    .lightbox-caption {
        font-size: 0.8rem;
        max-width: 65%;
    }
}

/* Article Body */

.article-body {
    font-size: 1.05rem;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.article-body>*+* {
    margin-top: 1.5em;
}

.article-body>* {
    max-width: 100%;
}

.article-body h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-ink);
    margin-top: 1.5em;
    margin-bottom: 1em;
}

.article-body h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-ink);
    margin-top: 2em;
    margin-bottom: 0.5em;
}

.article-body p {
    color: var(--color-ink);
}

.article-lede {
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--color-ink);
}

.article-lede::first-letter {
    font-family: var(--font-display);
    font-size: 3.5em;
    font-weight: 700;
    float: left;
    line-height: 0.8;
    margin-right: 12px;
    margin-top: 6px;
    color: var(--color-accent);
}

/* Callouts — BBC/Guardian minimal style */

.article-callout {
    padding: 20px 24px;
    margin: 24px 0;
    background: var(--color-paper-warm);
    border-left: 3px solid var(--color-ink-light);
}

.callout-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-ink);
    margin-bottom: 12px;
}

.callout-header i {
    font-size: 0.85rem;
    color: var(--color-ink-muted);
}

.callout-list {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.callout-list li {
    margin-bottom: 6px;
    color: var(--color-ink);
    font-size: 0.9rem;
    line-height: 1.5;
}

.callout-list li:last-child {
    margin-bottom: 0;
}

.callout-key {
    border-left-color: var(--color-accent);
}

.callout-key .callout-header i {
    color: var(--color-accent);
}

.callout-warning {
    background: #fef9f0;
    border-left-color: #c45911;
}

.callout-warning .callout-header {
    color: #8b3d0f;
}

.callout-warning .callout-header i {
    color: #c45911;
}

.callout-warning p {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--color-ink);
}

/* Blockquote */

.article-quote {
    position: relative;
    padding: 48px 40px 32px;
    margin: 2em 0;
    background: var(--color-paper-warm);
    border-radius: var(--radius-md);
    font-style: italic;
    overflow: visible;
}

.article-quote::before {
    content: '\201C';
    position: absolute;
    top: 24px;
    left: 24px;
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 0.8;
    color: var(--color-accent);
    opacity: 0.4;
}

.article-quote p {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--color-ink);
    margin-bottom: 16px;
}

.article-quote cite {
    display: block;
    font-family: var(--font-ui);
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-ink-muted);
}

@media (max-width: 480px) {
    .article-quote {
        padding: 40px 20px 24px;
        margin: 1.5em 0;
    }
    .article-quote::before {
        top: 16px;
        left: 16px;
        font-size: 3rem;
    }
    .article-quote p {
        font-size: 1rem;
    }
    .article-quote cite {
        font-size: 0.8rem;
    }
}

/* Tags */

.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 32px;
    margin-top: 40px;
    border-top: 1px solid var(--color-border);
}

.tags-label {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-ink-muted);
    margin-right: 8px;
}

.tag {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-ink-muted);
    padding: 6px 14px;
    background: var(--color-paper-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
}

.tag:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: var(--color-accent-light);
}

/* Article Footer */

.article-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.share-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.share-label {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-ink-muted);
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-muted);
    background: var(--color-paper-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
}

.share-btn:hover {
    color: var(--color-paper);
    border-color: transparent;
}

.share-btn--twitter:hover {
    background: #1da1f2;
}

.share-btn--facebook:hover {
    background: #1877f2;
}

.share-btn--linkedin:hover {
    background: #0a66c2;
}

.share-btn--email:hover {
    background: var(--color-accent);
}

.share-btn--copy:hover {
    background: var(--color-ink);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR RAIL
   ═══════════════════════════════════════════════════════════════════════════ */

.sidebar-rail {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    background: var(--color-paper-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-height: calc(100vh - var(--header-height) - 48px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rail-header {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.rail-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-ink);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-accent);
}

.rail-tabs {
    display: flex;
    gap: 4px;
}

.rail-tab {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-ink-muted);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: transparent;
    transition: all var(--duration-fast) var(--ease-out);
}

.rail-tab:hover {
    color: var(--color-ink);
    background: var(--color-paper);
}

.rail-tab--active {
    color: var(--color-paper);
    background: var(--color-accent);
}

.rail-tab--active:hover {
    color: var(--color-paper);
    background: var(--color-accent);
}

.rail-content {
    flex: 1;
    overflow-y: auto;
    margin: 0 -8px;
    padding: 0 8px;
}

/* Custom scrollbar for rail */

.rail-content::-webkit-scrollbar {
    width: 6px;
}

.rail-content::-webkit-scrollbar-track {
    background: transparent;
}

.rail-content::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: 3px;
}

.rail-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-ink-light);
}

/* News Items */

.news-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    transition: transform var(--duration-fast) var(--ease-out);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    transform: translateX(4px);
}

.news-item:hover .news-title {
    color: var(--color-accent);
}

.news-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--color-paper-cool);
}

.news-content {
    flex: 1;
    min-width: 0;
}

.news-title {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-ink);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--duration-fast) var(--ease-out);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: var(--color-ink-light);
}

.news-source {
    font-weight: 600;
    color: var(--color-accent);
}

.news-time::before {
    content: '•';
    margin-right: 8px;
}

/* Skeleton Loader */

.news-skeleton {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.skeleton-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--color-paper-cool) 25%, var(--color-paper) 50%, var(--color-paper-cool) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-content {
    flex: 1;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--color-paper-cool) 25%, var(--color-paper) 50%, var(--color-paper-cool) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin-bottom: 8px;
}

.skeleton-line:nth-child(1) {
    width: 100%;
}

.skeleton-line:nth-child(2) {
    width: 80%;
}

.skeleton-line:nth-child(3) {
    width: 50%;
    animation-delay: 0.2s;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* News Error State */

.news-error {
    text-align: center;
    padding: 32px 16px;
}

.news-error-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--color-ink-light);
    opacity: 0.5;
}

.news-error-text {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--color-ink-muted);
    margin-bottom: 16px;
}

.news-retry {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-accent);
    padding: 8px 16px;
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
}

.news-retry:hover {
    color: var(--color-paper);
    background: var(--color-accent);
}

/* Rail Refresh Button */

.rail-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-ink-muted);
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    width: 100%;
    flex-shrink: 0;
    transition: all var(--duration-fast) var(--ease-out);
}

.rail-refresh:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.rail-refresh.is-loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Rail */

@media (max-width: 1100px) {
    .sidebar-rail {
        position: static;
        max-height: none;
        margin-top: 48px;
        width: 100%;
    }
    .rail-content {
        max-height: 400px;
    }
}

/* Mobile Rail Toggle */

.rail-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-paper);
    background: var(--color-accent);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast);
}

.rail-mobile-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

@media (max-width: 1100px) and (min-width: 481px) {
    .rail-mobile-toggle {
        display: flex;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CTA SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.cta-section {
    max-width: var(--content-width);
    margin: 64px 0;
}

.cta-section--primary {
    padding: 48px;
    background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-paper-warm) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.cta-section--primary::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, var(--color-accent) 100%);
    opacity: 0.03;
    transform: rotate(-15deg);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-paper);
    color: var(--color-accent);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.cta-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-ink);
    margin-bottom: 12px;
}

.cta-description {
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-ink-muted);
    margin-bottom: 24px;
    max-width: 480px;
}

.cta-form {
    max-width: 420px;
}

.cta-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.cta-input {
    flex: 1;
    padding: 14px 18px;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--duration-fast);
}

.cta-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.cta-button {
    padding: 14px 28px;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

.cta-button:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-privacy {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--color-ink-light);
}

.cta-privacy a {
    color: var(--color-ink-muted);
    text-decoration: underline;
}

/* CTA Footer */

.cta-section--footer {
    padding: 48px;
    text-align: center;
    background: var(--color-paper-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.cta-footer-content {
    max-width: 400px;
    margin: 0 auto;
}

.cta-footer-text {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--color-ink-muted);
    margin-bottom: 20px;
}

.cta-button--large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1rem;
}

.cta-button--large:hover {
    color: white;
}

@media (max-width: 768px) {
    .cta-section--footer {
        margin-block: 0;
    }
}

@media (max-width: 600px) {
    .cta-section--primary {
        padding: 32px 24px;
    }
    .cta-input-group {
        flex-direction: column;
    }
    .cta-button {
        width: 100%;
    }
    .cta-section--footer {
        padding: 24px;
    }
    .cta-button--large {
        padding-inline: 8px;
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .cta-button--large {
        white-space: wrap;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMMENTS SECTION — Facebook Style
   ═══════════════════════════════════════════════════════════════════════════ */

.comments-section {
    max-width: var(--content-width);
    margin: 64px 0;
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.comments-title {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-ink);
}

.comments-count {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--color-ink-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Login Prompt
   ───────────────────────────────────────────────────────────────────────────── */

.comment-login-prompt {
    padding: 20px 24px;
    background: var(--color-paper-warm);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    color: var(--color-ink-muted);
    text-align: center;
}

.comment-login-link {
    color: #1877f2;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.comment-login-link:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Comment Modal
   ───────────────────────────────────────────────────────────────────────────── */

.comment-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-out), visibility var(--duration-normal) var(--ease-out);
}

.comment-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.comment-modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--color-paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform var(--duration-normal) var(--ease-out);
}

.comment-modal.is-open .comment-modal-content {
    transform: translateY(0) scale(1);
}

.comment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.comment-modal-title {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-ink);
    margin: 0;
}

.comment-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-paper-warm);
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-ink-muted);
    cursor: pointer;
    transition: background-color var(--duration-fast);
}

.comment-modal-close:hover {
    background: var(--color-border);
}

.comment-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    max-height: calc(90vh - 70px);
}

.comment-form--modal {
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
    background: transparent;
}

.comment-form--modal .comment-form-textarea {
    min-height: 100px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Comment Form — FB Style
   ───────────────────────────────────────────────────────────────────────────── */

.comment-form {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.comment-form-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #1877f2 0%, #42b72a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-form-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-form-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-form-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form-fields {
    flex: 1;
}

.comment-form-name {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    background: var(--color-paper-warm);
    border: none;
    border-radius: var(--radius-full);
    transition: background-color var(--duration-fast);
}

.comment-form-name:focus {
    outline: none;
    background: var(--color-paper-cool);
}

.comment-form-name::placeholder {
    color: var(--color-ink-light);
}

.comment-form-input-wrapper {
    position: relative;
}

.comment-form-textarea {
    width: 100%;
    min-height: 44px;
    max-height: 200px;
    padding: 12px 16px;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    line-height: 1.4;
    background: var(--color-paper-warm);
    border: none;
    border-radius: 20px;
    resize: none;
    transition: background-color var(--duration-fast);
}

.comment-form-textarea:focus {
    outline: none;
    background: var(--color-paper-cool);
}

.comment-form-textarea::placeholder {
    color: var(--color-ink-light);
}

/* Photo Upload */

.comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
}

.comment-form-tools {
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-upload-btn,
.avatar-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--color-ink-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background-color var(--duration-fast);
}

.comment-upload-btn:hover,
.avatar-upload-btn:hover {
    background: var(--color-paper-warm);
    color: var(--color-accent);
}

.comment-upload-btn input[type="file"],
.avatar-upload-btn input[type="file"] {
    display: none;
}

.comment-submit {
    padding: 8px 16px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    background: #1877f2;
    border: none;
    border-radius: var(--radius-full);
    transition: background-color var(--duration-fast);
}

.comment-submit:hover:not(:disabled) {
    background: #166fe5;
}

.comment-submit:disabled {
    background: #e4e6eb;
    color: #bcc0c4;
    cursor: not-allowed;
}

/* Photo Preview */

.comment-photo-preview {
    position: relative;
    display: inline-block;
    margin-top: 12px;
}

.comment-photo-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--radius-md);
}

.comment-photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: var(--radius-full);
    font-size: 16px;
    line-height: 1;
    transition: background-color var(--duration-fast);
}

.comment-photo-remove:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Character Counter */

.comment-char-count {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--color-ink-light);
    text-align: right;
    padding-right: 8px;
}

.comment-char-count.is-warning {
    color: #f0932b;
}

.comment-char-count.is-error {
    color: #e74c3c;
}

/* Honeypot */

.comment-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Comment List — FB Style
   ───────────────────────────────────────────────────────────────────────────── */

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comments-empty {
    text-align: center;
    padding: 40px 24px;
    color: var(--color-ink-muted);
}

.comments-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--color-ink-light);
    opacity: 0.5;
}

.comments-empty-text {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    color: var(--color-ink-muted);
    margin-bottom: 4px;
}

.comments-empty-hint {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--color-ink-light);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Single Comment — FB Style
   ───────────────────────────────────────────────────────────────────────────── */

.comment {
    padding: 8px 0;
    animation: commentFadeIn var(--duration-normal) var(--ease-out);
}

@keyframes commentFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-main {
    display: flex;
    gap: 10px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #1877f2 0%, #42b72a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

/* Comment Bubble */

.comment-bubble {
    display: inline-block;
    max-width: 100%;
    padding: 10px 14px;
    background: var(--color-paper-warm);
    border-radius: 18px;
    position: relative;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.comment-author {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-ink);
}

.comment-author:hover {
    text-decoration: underline;
    cursor: pointer;
}

.comment-text {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--color-ink);
    word-wrap: break-word;
}

/* Comment Photo */

.comment-photo {
    max-width: 300px;
    margin-top: 8px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.comment-photo img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Reactions Summary — Under comment (FB style)
   ───────────────────────────────────────────────────────────────────────────── */

.reactions-summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    cursor: pointer;
}

/* Inline variant for short comments - next to Reply button */

.reactions-summary--inline {
    margin-left: 0;
    padding-left: 12px;
}

.reactions-summary:hover {
    text-decoration: underline;
}

.reactions-summary-icons {
    display: flex;
    align-items: center;
}

.reactions-summary-icons .reaction-icon {
    width: 18px;
    height: 18px;
    margin-left: -4px;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
    border-radius: 50%;
}

.reactions-summary-icons .reaction-icon:first-child {
    margin-left: 0;
}

.reactions-summary-count {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-ink-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Comment Actions — FB Style
   ───────────────────────────────────────────────────────────────────────────── */

.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 14px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
}

.comment-time {
    color: var(--color-ink-light);
}

.comment-action-btn {
    font-weight: 600;
    color: var(--color-ink-muted);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color var(--duration-fast);
}

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

.comment-action-btn.is-active {
    color: #1877f2;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Reaction Picker — FB Style Floating Bar
   ───────────────────────────────────────────────────────────────────────────── */

.reaction-picker-wrapper {
    position: relative;
    display: inline-block;
}

.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: var(--color-paper);
    border-radius: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.9);
    transform-origin: bottom left;
    transition: all var(--duration-fast) var(--ease-out);
    z-index: 100;
}

.reaction-picker-wrapper:hover .reaction-picker,
.reaction-picker-wrapper:focus-within .reaction-picker,
.reaction-picker.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(-4px) scale(1);
}

.reaction-picker-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-out);
}

.reaction-picker-btn:hover {
    transform: scale(1.3) translateY(-4px);
}

.reaction-picker-btn img {
    width: 32px;
    height: 32px;
    pointer-events: none;
}

.reaction-picker-btn.is-selected {
    background: var(--color-accent-light);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Replies — FB Style
   ───────────────────────────────────────────────────────────────────────────── */

.comment-replies {
    margin-left: 46px;
    padding-top: 4px;
}

.comment-replies .comment {
    padding: 6px 0;
}

.comment-replies .comment-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.comment-replies .comment-bubble {
    padding: 8px 12px;
}

.view-replies-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-ink-muted);
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 46px;
}

.view-replies-btn:hover {
    text-decoration: underline;
}

.view-replies-btn svg {
    width: 12px;
    height: 12px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Reply Form — FB Style Inline
   ───────────────────────────────────────────────────────────────────────────── */

.reply-form {
    display: flex;
    gap: 8px;
    margin-left: 46px;
    margin-top: 8px;
    padding: 8px 0;
}

.reply-form .comment-form-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.reply-form-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reply-form-header {
    display: flex;
    gap: 8px;
}

.reply-form .comment-form-name {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-full);
}

.reply-form .comment-form-textarea {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 0.9rem;
    border-radius: 18px;
}

.reply-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.reply-form-tools {
    display: flex;
    gap: 4px;
}

.reply-form-tools .comment-upload-btn {
    width: 32px;
    height: 32px;
}

.reply-cancel {
    padding: 6px 12px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-ink-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
}

.reply-cancel:hover {
    background: var(--color-paper-warm);
}

.reply-submit {
    padding: 6px 14px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background: #1877f2;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background-color var(--duration-fast);
}

.reply-submit:hover:not(:disabled) {
    background: #166fe5;
}

.reply-submit:disabled {
    background: #e4e6eb;
    color: #bcc0c4;
    cursor: not-allowed;
}

/* Throttle Warning */

.throttle-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-top: 8px;
    background: #fff3cd;
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: #856404;
}

.email-mockup {
    background-color: var(--color-surface-alt, #f9fbfd);
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
    border: 1px solid var(--color-border, #e0e0e0);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Mobile Responsive — FB Style
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .comment-form {
        padding: 12px;
    }
    .comment-form-avatar {
        width: 36px;
        height: 36px;
    }
    .reaction-picker {
        left: -50px;
    }
    .comment-replies {
        margin-left: 36px;
    }
    .reply-form {
        margin-left: 36px;
    }
    .view-replies-btn {
        margin-left: 36px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.site-footer {
    background: var(--color-paper-warm);
    border-top: 1px solid var(--color-border);
    margin-top: 80px;
    padding: 64px 24px 32px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-brand {
    margin-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-ink);
}

.footer-tagline {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--color-ink-muted);
    margin-top: 8px;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    margin-bottom: 48px;
}

.footer-nav-title {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-ink);
    margin-bottom: 16px;
}

.footer-nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav-list a {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--color-ink-muted);
    transition: color var(--duration-fast);
}

.footer-nav-list a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.footer-copyright {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--color-ink-light);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-muted);
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
}

.social-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIGHTBOX (for comment photos)
   ═══════════════════════════════════════════════════════════════════════════ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal), visibility var(--duration-normal);
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform var(--duration-normal) var(--ease-out);
}

.lightbox.is-open .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-sm);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    transition: background var(--duration-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */

@media print {
    .site-header,
    .sidebar-rail,
    .cta-section,
    .comments-section,
    .site-footer,
    .rail-mobile-toggle {
        display: none !important;
    }
    .content-grid {
        display: block;
    }
    .article {
        max-width: 100%;
    }
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
        background: white;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Scroll Progress Bar
   ───────────────────────────────────────────────────────────────────────────── */

.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #dc3545, #ff6b6b);
    transition: width 0.1s ease-out;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Styled List
   ───────────────────────────────────────────────────────────────────────────── */

.styled-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.styled-list-item {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #333;
}

.styled-list-item b {
    white-space: nowrap;
}

.styled-list-icon {
    color: #dc3545;
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Chart Component
   ───────────────────────────────────────────────────────────────────────────── */

.chart-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #dee2e6;
}

.chart-title {
    text-align: center;
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 700;
}

.chart-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 2rem 0;
}

.chart-bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 3rem;
    height: 280px;
    padding: 0 1rem;
}

.chart-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 120px;
    height: 100%;
}

.chart-bar-percent {
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.chart-bar-percent.red {
    color: #dc3545;
}

.chart-bar-percent.gray {
    color: #6c757d;
}

.chart-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
}

.chart-bar.red {
    background: #ff6b6b;
}

.chart-bar.gray {
    background: #adb5bd;
}

.chart-bar-label {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    text-align: center;
    color: #333;
    font-weight: 500;
}

@media (max-width: 600px) {
    .chart-container {
        padding: 1rem;
    }
    .chart-title {
        font-size: 0.85rem;
    }
    .chart-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }
    .chart-bars {
        gap: 1rem;
        height: 200px;
        padding: 0;
    }
    .chart-bar-item {
        width: 80px;
    }
    .chart-bar-percent {
        font-size: 1.1rem;
    }
    .chart-bar-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 400px) {
    .chart-bars {
        gap: 0.5rem;
        height: 160px;
    }
    .chart-bar-item {
        width: 60px;
        min-width: 0;
    }
    .chart-bar-percent {
        font-size: 0.9rem;
    }
    .chart-bar-label {
        font-size: 0.6rem;
        word-break: break-word;
    }
}

@media (max-width: 320px) {
    .chart-bars {
        gap: 0.25rem;
        height: 140px;
    }
    .chart-bar-item {
        width: 50px;
    }
    .chart-bar-percent {
        font-size: 0.8rem;
    }
    .chart-bar-label {
        font-size: 0.55rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Quiz Section
   ───────────────────────────────────────────────────────────────────────────── */

.quiz-section .cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.quiz-section .quiz-header {
    transition: all 0.3s ease;
}

.quiz-section .quiz-header.hidden {
    display: none;
}

.quiz-section .quiz-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: inherit;
    text-align: left;
}

.quiz-section .quiz-step {
    display: none;
}

.quiz-section .quiz-step.active {
    display: block;
}

.quiz-section .quiz-question {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.quiz-section .quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-section .quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.quiz-section .quiz-option:hover {
    background: #fff;
    border-color: #fff;
    transform: translateX(4px);
}

.quiz-section .quiz-option input {
    accent-color: #dc3545;
    width: 18px;
    height: 18px;
}

.quiz-section .quiz-option:has(input:checked) {
    background: #fff;
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.quiz-section .quiz-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.quiz-section .quiz-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.quiz-section .quiz-dot::after {
    counter-increment: dot;
}

.quiz-section .quiz-dot[data-dot="1"]::after {
    content: "1";
}

.quiz-section .quiz-dot[data-dot="2"]::after {
    content: "2";
}

.quiz-section .quiz-dot[data-dot="3"]::after {
    content: "3";
}

.quiz-section .quiz-dot.active {
    background: #fff;
    border-color: #fff;
    color: #dc3545;
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.quiz-section .quiz-dot.completed {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.9);
    color: #dc3545;
}

.quiz-section .quiz-result {
    text-align: center;
}

.quiz-section .quiz-result-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    display: inline-block;
}

.quiz-section .quiz-result img {
    max-width: 320px;
    margin: 1rem auto;
}

.quiz-section .quiz-timer {
    font-size: 2rem;
    font-weight: bold;
    margin: 1rem 0;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.quiz-section .quiz-order-btn {
    display: inline-block;
    background: linear-gradient(90deg, #dc3545, #ff6b6b, #e63946, #dc3545);
    background-size: 300% 100%;
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: gradientShift 3s ease infinite;
}

.quiz-section .quiz-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.5);
}

.quiz-section .quiz-stock {
    margin-top: 1rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .quiz-section .cta-content {
        padding: 1rem;
    }
    .quiz-section .quiz-title {
        font-size: 1.2rem;
    }
    .quiz-section .quiz-question {
        font-size: 1rem;
    }
    .quiz-section .quiz-option {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    .quiz-section .quiz-progress {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    .quiz-section .quiz-dot {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    .quiz-section .quiz-result-title {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }
    .quiz-section .quiz-result img {
        max-width: 280px;
    }
    .quiz-section .quiz-timer {
        font-size: 1.5rem;
    }
    .quiz-section .quiz-order-btn {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .quiz-section .quiz-title {
        font-size: 1.1rem;
    }
    .quiz-section .quiz-option {
        padding: 0.6rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    .quiz-section .quiz-dot {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
}

@media (max-width: 320px) {
    .quiz-section .quiz-title {
        font-size: 1rem;
    }
    .quiz-section .quiz-question {
        font-size: 0.9rem;
    }
    .quiz-section .quiz-option {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    .quiz-section .quiz-result-title {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }
    .quiz-section .quiz-order-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ═══════════ compat shim — components the reference sheet does not cover ═══════════ */

/* --- Gmail-style reader e-mail. Deliberately light in both themes: it is a
       screenshot of an inbox, so it should not follow the site theme. --- */

.mail-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1rem;
    border: 1px solid rgba(0, 102, 204, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    position: relative;
    overflow: hidden;
}

.mail-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
}

.mail-control-panel,
.mail-title-wrapper,
.mail-sender,
.mail-text,
.mail-bottom-options {
    margin-bottom: 1.25rem;
}

.mail-control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-grey);
    margin-bottom: 1.5rem;
}

.mail-control-panel img {
    width: 24px;
    height: 24px;
    opacity: 0.6;
    transition: var(--transition-fast);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.mail-control-panel img:hover {
    opacity: 1;
    background: rgba(0, 102, 204, 0.1);
}

.mail-title-wrapper {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-grey);
}

.mail-title {
    color: var(--navy);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-family: var(--font-primary);
}

.mail-title .inbox {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    padding: 0.25em 0.75em;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
}

.mail-sender {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-grey);
}

.mail-sender-logo {
    background: #4285F4;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    font-size: 1.25rem;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    flex-shrink: 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: none;
}

.mail-sender-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

.mail-sender-logo p {
    margin: 0;
    line-height: 1;
}

.mail-sender-description {
    flex: 1;
}

.mail-sender-text p {
    margin: 0.25rem 0;
    color: var(--text-dark);
}

.mail-sender-text-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--navy);
    line-height: 1.3;
}

.mail-sender-text-recipient {
    font-size: 0.875rem;
    color: var(--medium-grey);
    font-weight: 400;
}

.mail-sender-options {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.mail-sender-options img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.mail-sender-options img:hover {
    opacity: 1;
    background: rgba(0, 102, 204, 0.1);
}

.mail-text {
    padding: 1.5rem 0;
    line-height: 1.6;
}

.mail-text p {
    color: var(--text-light);
    line-height: 1.7;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.mail-text p:first-child {
    margin-top: 0;
    font-weight: 500;
    color: var(--navy);
}

.mail-text p:last-child {
    margin-bottom: 0;
}

.mail-bottom-options {
    display: flex;
    gap: 1rem;
    padding: 1rem 0 0;
    border-top: 1px solid var(--border-grey);
    margin-bottom: 0;
}

.mail-bottom-options-reply,
.mail-bottom-forward {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(0, 102, 204, 0.05);
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid transparent;
}

.mail-bottom-options-reply:hover,
.mail-bottom-forward:hover {
    background: rgba(0, 102, 204, 0.1);
    border-color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.mail-wrapper .mail-control-panel img,
.mail-wrapper .mail-sender-options img,
.mail-wrapper .mail-bottom-options-reply,
.mail-wrapper .mail-bottom-forward {
    pointer-events: none !important;
    cursor: not-allowed !important;
    opacity: 0.4 !important;
}

.mail-wrapper .mail-control-panel img:hover,
.mail-wrapper .mail-sender-options img:hover,
.mail-wrapper .mail-bottom-options-reply:hover,
.mail-wrapper .mail-bottom-forward:hover {
    opacity: 0.4 !important;
    background: transparent !important;
    border-color: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.mail-bottom-options img {
    width: 16px;
    height: 16px;
}

.mail-wrapper {
    margin: 0.5rem;
    max-width: 100%;
    padding: 1.25rem;
}

.mail-control-panel {
    padding: 0.5rem 0;
}

.mail-control-panel img {
    width: 20px;
    height: 20px;
}

.mail-title {
    font-size: 0.95rem;
    line-height: 1.3;
}

.mail-title .inbox {
    font-size: 0.65rem;
    padding: 0.2em 0.6em;
    margin-left: 0 !important;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.mail-sender {
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.mail-sender-logo {
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.25);
}

.mail-sender-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(66, 133, 244, 0.35);
}

.mail-sender-text-name {
    font-size: 0.95rem;
}

.mail-sender-text-recipient {
    font-size: 0.8rem;
}

.mail-sender-options img {
    width: 18px;
    height: 18px;
}

.mail-text {
    padding: 1.25rem 0;
}

.mail-text p {
    font-size: 0.9rem;
    margin: 0.875rem 0;
}

.mail-bottom-options {
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mail-bottom-options-reply,
.mail-bottom-forward {
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

.mail-bottom-options img {
    width: 14px;
    height: 14px;
}

.mail-wrapper {
    margin: 0.25rem;
    padding: 1rem;
    border-radius: var(--radius-md);
}

.mail-wrapper::before {
    height: 2px;
}

.mail-control-panel {
    padding: 0.375rem 0;
    margin-bottom: 1rem;
}

.mail-control-panel img {
    width: 18px;
    height: 18px;
    padding: 0.2rem;
}

.mail-title-wrapper {
    padding: 0.75rem 0;
}

.mail-title {
    font-size: 0.875rem;
    line-height: 1.25;
}

.mail-title .inbox {
    font-size: 0.6rem;
    padding: 0.15em 0.5em;
    margin-left: 0 !important;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    border-radius: 15px;
}

.mail-sender {
    gap: 0.625rem;
    padding: 0.625rem 0;
}

.mail-sender-logo {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    box-shadow: 0 1px 4px rgba(66, 133, 244, 0.2);
}

.mail-sender-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.mail-sender-text-name {
    font-size: 0.875rem;
    line-height: 1.2;
}

.mail-sender-text-recipient {
    font-size: 0.75rem;
}

.mail-sender-options {
    gap: 0.25rem;
}

.mail-sender-options img {
    width: 16px;
    height: 16px;
    padding: 0.2rem;
}

.mail-text {
    padding: 1rem 0;
}

.mail-text p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0.75rem 0;
}

.mail-bottom-options {
    gap: 0.5rem;
    padding: 0.75rem 0 0;
}

.mail-bottom-options-reply,
.mail-bottom-forward {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    min-width: 100px;
}

.mail-bottom-options img {
    width: 12px;
    height: 12px;
}

.email-mockup {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 12px);
    padding: 14px 16px;
    margin: 28px 0;
    background: var(--color-paper-warm);
}

.email-mockup .mail-wrapper {
    border: 0;
    padding: 0;
    margin: 0;
}

/* --- long list items must never push the page sideways on a phone --- */

.styled-list {
    padding-left: 0;
    list-style: none;
}

.styled-list-item {
    display: flex;
    align-items: flex-start;
    gap: .6em;
    min-width: 0;
}

.styled-list-item>span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.styled-list-item>.styled-list-icon {
    flex: 0 0 auto;
    overflow-wrap: normal;
    color: var(--color-accent);
}

.article-body p,
.article-body li,
.comment-text,
.figure-caption,
.caption-text {
    overflow-wrap: anywhere;
}

.article-body,
.comments-section,
.cta-section {
    min-width: 0;
}

.article-body img,
.article-body figure,
.comment-text img {
    max-width: 100%;
    height: auto;
}

/* --- numbered mechanism callouts --- */

.callout-header {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.callout-num {
    flex: 0 0 auto;
    color: var(--color-accent);
}

.callout-num text {
    fill: var(--color-paper);
}

.article-callout .styled-list {
    margin-top: .75rem;
}

/* --- sidebar rail without thumbnails --- */

.news-item--textonly {
    display: block;
}

.news-item--textonly .news-content {
    padding-left: 0;
}

/* --- article meta --- */

.article-views {
    display: inline-block;
    margin-left: .75rem;
    color: var(--color-ink-light);
}

/* --- footer legal --- */

.footer-legal {
    margin-top: 1.5rem;
    font-size: .75rem;
    line-height: 1.55;
    color: var(--color-ink-light);
}

.footer-legal p {
    margin: 0 0 .5rem;
}

.comment-login-prompt {
    margin: 0 0 1rem;
}

/* ── inline + footer CTA: one item per row, image actually constrained ── */

.cta-section .cta-content,
.cta-section .cta-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 44rem;
    margin: 0 auto;
}

.cta-section .cta-eyebrow {
    font-family: var(--font-ui);
    font-size: .75rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-accent);
    margin: 0 0 .6rem;
}

.cta-section .cta-title {
    margin: 0 0 .25rem;
}

.cta-section .cta-product {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 1.1rem 0 1.35rem;
}

/* two classes — beats `.article-body img{max-width:100%}` */

.cta-section .cta-product-img {
    width: auto;
    height: auto;
    max-width: min(260px, 70%);
    max-height: 200px;
    object-fit: contain;
}

.cta-section .cta-button {
    margin: 0;
}

.cta-section .cta-guarantee {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    margin: 1.05rem 0 0;
    padding: .5em 1.15em;
    border-radius: 999px;
    background: var(--color-paper);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-family: var(--font-ui);
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.3;
}

.cta-section .cta-stock {
    margin: .7rem 0 0;
    font-family: var(--font-ui);
    font-size: .82rem;
    line-height: 1.45;
    color: var(--color-ink-muted);
}

.cta-section .cta-micro {
    margin: .8rem 0 0;
    max-width: 46ch;
    font-family: var(--font-ui);
    font-size: .78rem;
    line-height: 1.55;
    color: var(--color-ink-light);
}

.cta-section .cta-footer-text {
    margin: .5rem 0 1.25rem;
}

/* landscape phones and small tablets */

@media (max-width:900px) {
    .cta-section--primary,
    .cta-section--footer {
        padding: 26px 18px;
    }
    .cta-section .cta-product {
        margin: .9rem 0 1.1rem;
    }
    .cta-section .cta-product-img {
        max-width: min(200px, 55%);
        max-height: 150px;
    }
}

@media (max-width:480px) {
    .cta-section--primary,
    .cta-section--footer {
        padding: 22px 14px;
    }
    .cta-section .cta-title {
        font-size: 1.15rem;
        line-height: 1.3;
    }
    .cta-section .cta-button {
        width: 100%;
        justify-content: center;
    }
    .cta-section .cta-guarantee {
        width: 100%;
        justify-content: center;
    }
    .cta-section .cta-product-img {
        max-width: min(170px, 60%);
        max-height: 130px;
    }
}

/* very short viewports (phone held sideways) */

@media (max-height:480px) and (orientation:landscape) {
    .cta-section .cta-product-img {
        max-height: 110px;
    }
    .cta-section .cta-product {
        margin: .7rem 0 .9rem;
    }
}

/* ── corrections to the reference sheet ─────────────────────────────────── */

/* The reference sets `.styled-list-item b{white-space:nowrap}`. Its own labels
   are two words; ours run to eight, so the bold lead-in refused to wrap and
   pushed the page sideways on a phone. */

.styled-list-item b,
.styled-list-item strong {
    white-space: normal;
}

/* `.styled-list-item{color:#333}` is hardcoded and unreadable in dark mode. */

.styled-list-item {
    color: inherit;
}

/* Break only when a word genuinely does not fit — `anywhere` plus automatic
   hyphens was chopping ordinary words mid-syllable. */

.article-body p,
.article-body li,
.styled-list-item>span,
.comment-text,
.figure-caption,
.caption-text,
.article-standfirst {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
}

/* Topics + share row */

.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 2rem 0 0;
}

.article-tags .tags-label {
    font-family: var(--font-ui);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-ink-light);
}

.article-tags .tag {
    font-family: var(--font-ui);
    font-size: .82rem;
    text-decoration: none;
    padding: .35em .85em;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-paper-warm);
    color: var(--color-ink-muted);
}

.article-tags .tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.article-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.share-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .85rem;
}

.share-label {
    font-family: var(--font-ui);
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-ink-muted);
}

.share-buttons {
    display: flex;
    gap: .5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-paper-warm);
    color: var(--color-ink-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
}

.share-btn:hover {
    color: #fff;
    border-color: transparent;
}

/* Hero caption */

.hero-caption {
    margin-top: .6rem;
}

.hero-caption .caption-text {
    font-family: var(--font-ui);
    font-size: .85rem;
    line-height: 1.5;
    color: var(--color-ink-light);
}

/* ── accent colours ─────────────────────────────────────────────────────── */

:root {
    --color-success: #1a7f4b;
    --color-success-bg: #eaf6ef;
    --color-success-border: #9ed3b6;
}

/* money-back badge reads as reassurance, not as urgency — so green */

.cta-section .cta-guarantee {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success);
}

/* deadline date and the reader-only line stay red */

.offer-date {
    color: var(--color-accent);
    font-weight: 700;
    white-space: nowrap;
}

.offer-highlight {
    color: var(--color-accent);
}

/* ── Gmail mock-up: a screenshot of an inbox, so it stays light in both
      themes; only its frame follows the page. ───────────────────────────── */

.email-mockup {
    background: var(--color-paper-warm);
    border: 1px solid var(--color-border);
}

.email-mockup .mail-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin: 0;
    font-family: var(--font-ui);
    color: #212529;
}

.email-mockup .mail-control-panel,
.email-mockup .mail-title-wrapper,
.email-mockup .mail-sender {
    border-bottom-color: #dee2e6;
}

.email-mockup .mail-bottom-options {
    border-top-color: #dee2e6;
}

.email-mockup .mail-title {
    color: #1a1a2e;
}

.email-mockup .mail-title .inbox {
    background: #1f6f5c;
    color: #fff;
}

.email-mockup .mail-sender-logo {
    background: #4285f4;
}

.email-mockup .mail-sender-logo p {
    color: #fff;
}

.email-mockup .mail-sender-text-name {
    color: #1a1a2e;
}

.email-mockup .mail-sender-text-recipient {
    color: #6c757d;
}

.email-mockup .mail-text p,
.email-mockup .mail-sender-text p {
    color: #495057;
}

.email-mockup .mail-bottom-options-reply,
.email-mockup .mail-bottom-forward {
    background: rgba(31, 111, 92, .08);
    color: #1f6f5c;
    border: 1px solid transparent;
}

.email-mockup .mail-control-panel img,
.email-mockup .mail-sender-options img {
    opacity: .55;
}

/* dark frame around the light inbox{
  background:#101010;border-color:#333;}

/* The reference inverts the inbox toolbar icons for its dark email card
   (`filter:brightness(0) invert(1)`). Ours stays a light inbox{filter:none;}

/* whispered aside in the personal story */

.article-body .story-aside {
    margin: 1.1rem 0 1.1rem 1.25rem;
    padding-left: 1rem;
    border-left: 3px solid var(--color-border-strong, var(--color-border));
    font-style: italic;
    color: var(--color-ink-muted);
}

/* the packshot may run bigger on phones — it is the only visual in the block */

@media (max-width:480px) {
    .cta-section .cta-product-img {
        max-height: 260px;
    }
}

@media (max-height:480px) and (orientation:landscape) {
    .cta-section .cta-product-img {
        max-height: 250px;
    }
}

.cta-stock-live {
    margin: .85rem 0 0;
    font-family: var(--font-ui);
    font-size: .85rem;
    color: var(--color-ink-muted);
    text-align: center;
}

.cta-stock-live strong {
    color: var(--color-accent);
    font-weight: 700;
}

/* ── CTA button: animated gradient, identical in both themes ───────────────
   `@keyframes gradientShift` is already in the sheet (it drove the quiz
   button). The base rule is theme-agnostic, so no dark variant is needed —
   but the reference's `:hover` repaints a flat colour and has to be beaten. */

.cta-section .cta-button {
    background: linear-gradient(90deg, #dc3545, #ff6b6b, #e63946, #dc3545);
    background-size: 300% 100%;
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform .2s ease, box-shadow .2s ease;
    animation: gradientShift 3s ease infinite;
}

.cta-section .cta-button:hover {
    background: linear-gradient(90deg, #dc3545, #ff6b6b, #e63946, #dc3545);
    background-size: 300% 100%;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, .35);
}

.cta-section .cta-button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* an endless animation is a battery and accessibility cost for anyone who
   has asked the system to keep still */

@media (prefers-reduced-motion:reduce) {
    .cta-section .cta-button {
        animation: none;
        background-position: 0 50%;
    }
}

/* ── offer click: loading overlay ─────────────────────────────────────────── */

.offer-loading {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.offer-loading.is-on {
    opacity: 1;
    visibility: visible;
}

.offer-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 34px;
    border-radius: 12px;
    background: var(--color-paper);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
    max-width: 78vw;
    text-align: center;
}

.offer-loading-text {
    font-family: var(--font-ui);
    font-size: .95rem;
    font-weight: 600;
    color: var(--color-ink);
}

.offer-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    animation: offerSpin .8s linear infinite;
}

@keyframes offerSpin {
    to {
        transform: rotate(360deg)
    }
}

@media (prefers-reduced-motion:reduce) {
    .offer-spinner {
        animation-duration: 2.4s;
    }
}

/* ── chrome scrolls away with the page ───────────────────────────────────────
   The reference pins both the masthead and the nav bar at top:0. Unpinning
   only the nav would leave the masthead stuck with the nav sliding under it,
   so both go static. The 4px progress bar stays position:fixed. */

.site-header,
.uk-nav-bar {
    position: static;
    top: auto;
}

/* the rail offset no longer has to clear a pinned header */

.sidebar-rail {
    top: 24px;
}

/* `.cta-section .cta-content` centres its children, so the quiz used to size
   itself to whichever step was on screen — step 3's short answers made the
   whole box shrink. Pin the steps to the container width instead. */

.quiz-section .quiz-header,
.quiz-section .quiz-body,
.quiz-section .quiz-step,
.quiz-section .quiz-options {
    width: 100%;
    align-self: stretch;
}

.quiz-section .quiz-option {
    width: 100%;
    box-sizing: border-box;
}

/* ═══════════ quiz, green skin ═══════════
   `.quiz-section` sits on the same element as `.cta-section--primary`, so these
   tie on specificity and win on order. Only hues change: the 135° block wash,
   the 45° sheen and the 300%-wide animated button gradient all stay. */

.quiz-section {
    background: linear-gradient(135deg, #eaf7ef 0%, #f7fbf8 100%);
    border-color: #cfe6d7;
}

.quiz-section::before {
    background: linear-gradient(45deg, transparent 30%, #1a7f4b 100%);
}

.quiz-section .quiz-option:has(input:checked) {
    border-color: #1a7f4b;
    box-shadow: 0 0 0 2px rgba(26, 127, 75, .2);
}

.quiz-section .quiz-option input {
    accent-color: #1a7f4b;
}

.quiz-section .quiz-dot.active {
    color: #14663c;
    box-shadow: 0 0 15px rgba(26, 127, 75, .35);
}

.quiz-section .quiz-dot.completed {
    color: #14663c;
}

/* deep green, same 4-stop shift as the red one it replaces */

.quiz-section .quiz-order-btn {
    background: linear-gradient(90deg, #14532d, #1a7f4b, #15803d, #14532d);
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
}

.quiz-section .quiz-order-btn:hover {
    box-shadow: 0 6px 16px rgba(20, 83, 45, .45);
}

@media (prefers-reduced-motion: reduce) {
    .quiz-section .quiz-order-btn {
        animation: none;
        background-position: 0 50%;
    }
}

/* ── the beat between the last answer and the result ── */

.quiz-section .quiz-loading {
    text-align: center;
    padding: 1.5rem 0 .5rem;
}

.quiz-section .quiz-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 1.4rem;
    border-radius: 50%;
    border: 3px solid rgba(26, 127, 75, .18);
    border-top-color: #1a7f4b;
    animation: quizSpin .9s linear infinite;
}

@keyframes quizSpin {
    to {
        transform: rotate(360deg);
    }
}

.quiz-section .quiz-checks {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 22rem;
    text-align: left;
}

.quiz-section .quiz-checks li {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .45rem 0;
    font-family: var(--font-ui);
    font-size: 1rem;
    opacity: .35;
    transition: opacity .35s ease;
}

.quiz-section .quiz-checks li.is-on {
    opacity: 1;
}

.quiz-section .quiz-checks li.is-done {
    opacity: .75;
}

.quiz-section .quiz-check-mark {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(26, 127, 75, .35);
    position: relative;
    transition: all .3s ease;
}

.quiz-section .quiz-checks li.is-done .quiz-check-mark {
    background: #1a7f4b;
    border-color: #1a7f4b;
}

.quiz-section .quiz-checks li.is-done .quiz-check-mark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
    .quiz-section .quiz-spinner {
        animation-duration: 2.4s;
    }
}

@media (max-width:600px) {
    .quiz-section .quiz-checks li {
        font-size: .92rem;
    }
}

/* ── footer CTA button, green ──
   `.cta-section--footer .cta-button` ties with `.cta-section .cta-button` and
   wins on order; the hover pair has to be matched too, because the base sheet
   repaints the background on hover. */

.cta-section--footer .cta-button {
    background: linear-gradient(90deg, #14532d, #1a7f4b, #15803d, #14532d);
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
}

.cta-section--footer .cta-button:hover {
    background: linear-gradient(90deg, #14532d, #1a7f4b, #15803d, #14532d);
    background-size: 300% 100%;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20, 83, 45, .35);
}

.cta-section--footer .cta-eyebrow {
    color: #1a7f4b;
}

@media (prefers-reduced-motion: reduce) {
    .cta-section--footer .cta-button {
        animation: none;
        background-position: 0 50%;
    }
}

/* two lines in the footer button — one line ran wall to wall on a phone */

.cta-section--footer .cta-button {
    align-items: center;
    padding-block: .85rem;
    line-height: 1.3;
}

.cta-section--footer .cta-button>span {
    display: block;
    text-align: center;
    text-wrap: balance;
}

/* article headlines: all caps, ink colour */

.article-body h2 {
    color: var(--color-ink);
    text-transform: uppercase;
}

/* brand wordmark above the quiz question */

.quiz-section .quiz-logo {
    display: block;
    margin: 0 auto 1rem;
    height: 38px;
    width: auto;
    max-width: 72%;
    object-fit: contain;
}

@media (max-width:600px) {
    .quiz-section .quiz-logo {
        height: 32px;
        margin-bottom: .85rem;
    }
}

/* ═══ recolor — гамма GLP3-B, зелёный CTA, без тёмной темы ═══ */

:root {
    --color-paper: #ffffff;
    --color-paper-warm: #f7f5f3;
    --color-paper-cool: #efecea;
    --color-accent: #b15649;
    --color-accent-hover: #8a4338;
    --color-accent-light: #f7eeec;
}

/* CTA и кнопка заказа зелёные у всех продуктов: переменные наследуются,
   поэтому одного переопределения на секции хватает на всё внутри */

.cta-section {
    --color-accent: #1a7f4b;
    --color-accent-hover: #14532d;
    --color-accent-light: #eaf6ef;
}

/* ── врезка-CTA после цитаты врача ────────────────────────────────── */

.cta-section--inline {
    padding: 34px 32px;
    margin: 36px 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-paper-warm) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.cta-section--inline .cta-title {
    margin-bottom: 18px;
}

.cta-section--inline .cta-product {
    margin-bottom: 18px;
}

.cta-section--inline .cta-product-img {
    max-width: 200px;
}

.cta-section--inline .cta-guarantee {
    margin-top: 14px;
}

@media (max-width:640px) {
    .cta-section--inline {
        padding: 24px 16px;
        margin: 28px 0;
    }
}

/* ── шапки блоков механизма вынесены над блоками ──────────────────── */

.article-body h3.callout-heading {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-ui);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--color-ink);
    margin: 30px 0 10px;
}

.article-body h3.callout-heading+.article-callout {
    margin-top: 0;
}

@media (max-width:640px) {
    .article-body h3.callout-heading {
        font-size: .95rem;
        margin: 24px 0 8px;
    }
}

/* ── название продукта в тексте — ссылка на оффер ──────────────────── */

.article-body a.product-name {
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid var(--color-accent-light);
    padding-bottom: 1px;
    transition: border-color .15s ease, background-color .15s ease;
}

.article-body a.product-name:hover,
.article-body a.product-name:focus {
    border-bottom-color: var(--color-accent);
    background: var(--color-accent-light);
}

/* ── финальный экран квиза: строки под остатком ────────────────────── */

.quiz-section .quiz-note {
    margin: .45rem auto 0;
    max-width: 34em;
    line-height: 1.45;
    font-family: var(--font-ui);
    color: var(--color-ink);
}

.quiz-section .quiz-note--ship {
    font-size: .86rem;
    font-weight: 600;
    opacity: .95;
}

.quiz-section .quiz-note--why {
    font-size: .8rem;
    opacity: .78;
    margin-top: .55rem;
}

@media (max-width:640px) {
    .quiz-section .quiz-note--ship {
        font-size: .8rem;
    }
    .quiz-section .quiz-note--why {
        font-size: .76rem;
    }
}

/* ── финальный экран: остаток сразу под кнопкой, таймер ниже ──────────
   #quiz-promo-text своего правила не имел и прилипал к строке остатка.
   Воздух даём сверху ему, а у .quiz-timer гасим верхний отступ, чтобы
   зазор не складывался из двух margin. Селектор с .quiz-result (0,3,0)
   перебивает базовый .quiz-section .quiz-timer (0,2,0). */

.quiz-section .quiz-result #quiz-promo-text {
    margin-top: 1.6rem;
    margin-bottom: .35rem;
}

.quiz-section .quiz-result .quiz-timer {
    margin-top: 0;
}

/* --- comparison table (NHS / private / GLP3-B) --- */

.compare-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0
}

.compare-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 34rem;
    font-size: .95rem;
    line-height: 1.35
}

.compare-table th,
.compare-table td {
    border: 1px solid #e3e3e0;
    padding: .6rem .7rem;
    text-align: left;
    vertical-align: top
}

.compare-table thead th {
    background: #f4f3f0;
    font-weight: 700;
    white-space: nowrap
}

.compare-table tbody th {
    background: #faf9f7;
    font-weight: 600;
    white-space: nowrap
}

.compare-table thead th:last-child,
.compare-table tbody td:last-child {
    background: #f2f7f2
}

.compare-table tbody tr:hover td {
    background: #fbfbf9
}

/* --- FAQ --- */

.faq-list {
    margin: 1.5rem 0;
    border-top: 1px solid #e3e3e0
}

.faq-item {
    border-bottom: 1px solid #e3e3e0
}

.faq-item>summary {
    cursor: pointer;
    list-style: none;
    padding: .9rem 2rem .9rem 0;
    font-weight: 600;
    position: relative
}

.faq-item>summary::-webkit-details-marker {
    display: none
}

.faq-item>summary::after {
    content: "+";
    position: absolute;
    right: .4rem;
    top: .8rem;
    font-size: 1.25rem;
    line-height: 1;
    color: #8a8a84
}

.faq-item[open]>summary::after {
    content: "\2013"
}

.faq-item>p {
    margin: 0 0 1rem;
    color: #4a4a45
}

/* --- legal --- */

.legal-links {
    font-size: .85rem;
    color: #6b6b66;
    padding: .75rem 0;
    border-bottom: 1px solid #e3e3e0;
    margin-bottom: .75rem
}

.legal-links a {
    color: #6b6b66;
    text-decoration: underline
}

.legal-note {
    display: block;
    margin-top: .35rem
}

.faq-section {
    max-width: var(--content-width);
    width: 100%
}