:root {
    --gaslit-masthead: #FAFAFA; /* Matches logo exactly */
    --gaslit-page: #FAFAFA; /* Clean white outer background */
    --gaslit-paper: #EBEBEB; /* Cool gray content paper */
    --gaslit-text: #1C1C1C;
    --gaslit-headline: #111111;
    --gaslit-red: #BF0A30; /* Old Glory Red */
    --gaslit-blue: #002868; /* Old Glory Blue */
    --gaslit-white: #FFFFFF; /* Flag white */
    --gaslit-muted: #444444;
    --gaslit-border: #D1D1D1;
}

body {
    background-color: var(--gaslit-page);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--gaslit-text);
    line-height: 1.7;
}

/* Masthead */
.masthead {
    background-color: var(--gaslit-masthead);
    border-bottom: 3px solid var(--gaslit-red);
    padding: 1.25rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gaslit-logo {
    height: 64px;
    width: auto;
}

.tagline {
    font-family: Georgia, serif;
    font-size: 1.1rem;
    color: var(--gaslit-muted);
    font-style: italic;
    margin: 0;
}

/* Main Content Area */
.main-content {
    width: 100%;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    background-color: transparent;
    border: none;
    border-radius: 0;
    min-height: 80vh;
    box-shadow: none;
    box-sizing: border-box;
}

.headline {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.1rem;
    line-height: 1.2;
    color: var(--gaslit-headline);
    margin-bottom: 1.25rem;
}

/* Footer */
footer {
}

/* Login / Account Dropdown - Light Newspaper Style */
.btn-outline-dark {
    color: #1C1C1C;
    border-color: #1C1C1C;
}

    .btn-outline-dark:hover {
        background-color: var(--gaslit-red);
        color: white;
        border-color: var(--gaslit-red);
    }

.dropdown-menu {
    background-color: white;
    border: 1px solid #D1D1D1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    min-width: 140px;
}

.dropdown-item {
    color: #1C1C1C;
    padding: 10px 20px;
    font-size: 0.95rem;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: #F8F4F0;
        color: var(--gaslit-red);
    }

    /* Sign Out - Red background with white text on hover */
    .dropdown-item.text-danger {
        color: var(--gaslit-red);
    }

        .dropdown-item.text-danger:hover {
            background-color: var(--gaslit-red); /* Gaslit red */
            color: white !important; /* White text - much better contrast */
        }

/* "Hello, Username!" text */
.text-light {
    color: #1C1C1C !important;
}

/* Greeting */
.greeting {
    color: var(--gaslit-red);
    font-weight: 600;
}

/* Positioning Strip - Between Masthead and Content */
.tagline-strip {
    background-color: #F8F6F2;
    border-bottom: 1px solid #D1CBC0;
    padding: 1.25rem 0 1rem 0; /* Good top padding + balanced bottom */
    font-size: 0.97rem;
    color: #555555;
    font-style: italic;
    text-align: center;
    line-height: 1.5;
}

    .tagline-strip .container {
        max-width: 1100px;
    }

/* Social links in footer */
.social-link {
    color: var(--gaslit-muted);
    transition: transform 0.15s ease, filter 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .social-link:hover,
    .social-link:focus {
        color: var(--gaslit-red); /* still applied but overridden below for Instagram */
        text-decoration: none;
        transform: scale(1.1);
        filter: brightness(1.1);
    }

/* Instagram - prevent color change to stay brand compliant */
.social-link-instagram:hover,
.social-link-instagram:focus {
    color: inherit;
}

/* Size all icons consistently */
.social-link svg,
.social-link img {
    width: 20px;
    height: 20px;
    display: block;
}

/* X icon specific */
.social-link .x-icon {
    width: 20px;
    height: auto;
}

.x-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: currentColor;
}

.swamp-page {
    display: block;
    width: min(100%, 880px) !important;
    max-width: 880px !important;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem 1rem 2.5rem;
    box-sizing: border-box !important;
    align-self: stretch;
}

.swamp-sheet {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: var(--gaslit-white);
    border: 1px solid var(--gaslit-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 1.25rem 1.35rem 1.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    min-height: 22rem;
}

/* Banners fill the same track as the sheet */
.swamp-page > [class$="-banner"] {
    width: 100%;
    box-sizing: border-box;
}

/* Dossier only — leave Articles / other pages at 1140 */
.main-content:has(.dossier-layout) {
    max-width: 1280px;
}

.gaslit-status {
    padding: 1rem;
    text-align: center;
    color: var(--gaslit-muted);
    background: #f7f5f0;
    border: 1px solid var(--gaslit-border);
    border-radius: 4px;
}

.gaslit-status-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.gaslit-page-spinner {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    border: 2px solid rgba(191, 10, 48, 0.25);
    border-top-color: var(--gaslit-red);
    border-radius: 50%;
    animation: gaslit-spin 0.7s linear infinite;
}

@keyframes gaslit-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .swamp-page {
        padding: 0.35rem 0.75rem 2rem;
    }

    .swamp-sheet {
        padding: 1rem 1rem 1.25rem;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .headline {
        font-size: 1.75rem;
    }

    .masthead {
        padding: 1rem 0;
    }

    .gaslit-logo {
        height: 40px;
    }

    .main-content {
        margin: 1rem auto;
        padding: 1.25rem 1rem;
    }
}

/* Legal / static pages — Gaslit sheet system */
.legal-page.gaslit-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.5rem 1rem 2.5rem;
    box-sizing: border-box;
}

.gaslit-sheet {
    background: var(--gaslit-white);
    border: 1px solid var(--gaslit-border);
    border-radius: 6px;
    padding: 1.5rem 1.5rem 1.75rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.gaslit-sheet-center {
    text-align: center;
}

.gaslit-page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gaslit-red);
}

    .gaslit-page-header h1 {
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 1.85rem;
        font-weight: 700;
        color: var(--gaslit-headline);
        margin: 0 0 0.35rem 0;
    }

.gaslit-page-lede {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--gaslit-muted);
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--gaslit-muted);
}

.legal-body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--gaslit-text);
}

    .legal-body h2 {
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--gaslit-headline);
        margin: 1.5rem 0 0.65rem;
        padding-bottom: 0.35rem;
        border-bottom: 1px solid var(--gaslit-border);
    }

    .legal-body p {
        margin: 0 0 1rem;
    }

    .legal-body ul {
        margin: 0.35rem 0 1rem 1.25rem;
        padding: 0;
    }

    .legal-body li {
        margin-bottom: 0.35rem;
    }

    .legal-body a {
        color: var(--gaslit-red);
    }

.legal-callout {
    margin: 1.25rem 0;
    padding: 1rem 1.1rem;
    background: #f7f5f0;
    border: 1px solid var(--gaslit-border);
    border-radius: 6px;
    font-size: 0.95rem;
}

.legal-footer-note {
    margin-top: 2rem !important;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gaslit-border);
    font-size: 0.88rem;
    color: var(--gaslit-muted);
}

.gaslit-btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid transparent;
}

.gaslit-btn-primary {
    background: var(--gaslit-red);
    border-color: var(--gaslit-red);
    color: var(--gaslit-white);
}

    .gaslit-btn-primary:hover {
        filter: brightness(0.96);
        color: var(--gaslit-white);
    }

/* Shared callouts (Account, billing, future alerts) */
.gaslit-callout {
    margin: 0 0 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: 6px;
    border: 1px solid transparent;
    border-left-width: 3px;
}

.gaslit-callout-title {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.gaslit-callout-body {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
}

.gaslit-callout-warning {
    background: #fff8e6;
    border-color: #e6c200;
    border-left-color: #c4a000;
    color: #6b5a00;
}

    .gaslit-callout-warning .gaslit-callout-title {
        color: #5c4d00;
    }

.gaslit-callout-danger {
    background: #fdf2f2;
    border-color: #f0c9c9;
    border-left-color: var(--gaslit-red);
    color: #842029;
}

    .gaslit-callout-danger .gaslit-callout-title {
        color: #6b1c24;
    }

.gaslit-callout-info {
    background: #f7f5f0;
    border-color: var(--gaslit-border);
    border-left-color: var(--gaslit-muted);
    color: var(--gaslit-text);
}

/* Toast host (circuit-scoped notices) */
.gaslit-toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid #e2ddd2;
    border-left-width: 4px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    padding: 1.2rem 1.15rem;
    color: #2b2b28;
}

.gaslit-toast-body {
    flex: 1 1 auto;
    min-width: 0;
}

.gaslit-toast-title {
    margin: 0 0 0.2rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.gaslit-toast-message {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
}

.gaslit-toast-close {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0.1rem 0.2rem;
}

    .gaslit-toast-close:hover {
        opacity: 1;
    }

.gaslit-toast-success {
    background: #f3f7f3;
    border-color: #cfe0d0;
    border-left-color: #2e7d32;
}

.gaslit-toast-info {
    background: #f3f6f9;
    border-color: #cdd7e3;
    border-left-color: #2b5c8a;
}

.gaslit-toast-warning {
    background: #fff8e6;
    border-color: #e6c200;
    border-left-color: #c4a000;
    color: #6b5a00;
}

.gaslit-toast-failure {
    background: #fdf2f2;
    border-color: #f0c9c9;
    border-left-color: var(--gaslit-red);
    color: #842029;
}

@media (max-width: 640px) {
    .legal-page.gaslit-page {
        padding: 0.35rem 0.75rem 2rem;
    }

    .gaslit-sheet {
        padding: 1.15rem 1rem 1.35rem;
    }

    .gaslit-page-header h1 {
        font-size: 1.55rem;
    }
}
