/* ===========================================================================
   Dunce Dynamics — Stylesheet
   Palette: warm off-white, coral accent, clean type
   =========================================================================== */

:root {
    --bg: #FBF7F0;
    --bg-card: #FFFFFF;
    --text: #241F1C;
    --text-muted: #6B7B8D;
    --accent: #E8573A;
    --accent-hover: #D04425;
    --highlight: #FFE066;
    --border: #E8E5DE;
    --border-light: #F0EDE6;
    --success: #3A8A5C;
    --danger: #C0392B;
    --link-blue: #1a73e8;

    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --max-width: 720px;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 3rem;

    --radius: 8px;
    --radius-lg: 12px;
}

/* ===========================================================================
   Reset & base
   =========================================================================== */

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

img, svg { max-width: 100%; height: auto; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ===========================================================================
   Header
   =========================================================================== */

.site-header {
    border-bottom: 2px solid var(--border);
    padding: var(--space-md) 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.logo:hover { color: var(--text); }

.logo-icon {
    height: 40px;
    width: auto;
    flex-shrink: 0;
    display: block;
}

.site-header nav {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.site-header nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.15s;
}

.site-header nav a:hover { color: var(--accent); }

/* ===========================================================================
   Hero (homepage)
   =========================================================================== */

.hero {
    text-align: center;
    padding: var(--space-xl) 0 var(--space-lg);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: var(--space-md);
}

.hero .accent { color: var(--accent); }

.hero-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: var(--space-lg);
}

/* ===========================================================================
   Ask form
   =========================================================================== */

.ask-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 520px;
    margin: 0 auto;
}

.ask-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-body);
    background: var(--bg-card);
    transition: border-color 0.2s;
}

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

.ask-form button,
.btn-primary {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-display);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.ask-form button:hover,
.btn-primary:hover {
    background: var(--accent-hover);
}

.ask-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-msg {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: var(--space-sm);
    text-align: center;
}

.loading-msg {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: var(--space-sm);
    text-align: center;
    font-style: italic;
}

/* ===========================================================================
   Question grid (homepage popular)
   =========================================================================== */

.popular-section {
    padding: var(--space-lg) 0;
}

.popular-section h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: var(--space-md);
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.question-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--space-md) calc(var(--space-md) + 0.25rem);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 100px;
}

.question-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    color: var(--text);
}

.card-question {
    font-weight: 600;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.card-rating {
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 1px;
}

.total-count {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: var(--space-md) 0 var(--space-xl);
}

/* ===========================================================================
   Answer page
   =========================================================================== */

.answer-page {
    padding: var(--space-lg) 0;
}

.answer-question {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: var(--space-md);
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Stupidity rating */
.stupidity-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.stupidity-meter svg { width: 180px; }

.stupidity-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Answer block */
.answer-block {
    margin-bottom: var(--space-lg);
}

.section-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.answer-text {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: var(--space-sm);
}

.read-aloud-btn, .learn-more-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: border-color 0.15s, color 0.15s;
}

.read-aloud-btn:hover, .learn-more-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.answer-tools {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

/* Funny line block — the punchline, give it visual weight */
.funny-block {
    background: var(--highlight);
    border-radius: var(--radius-lg);
    padding: calc(var(--space-md) + 0.25rem) var(--space-lg);
    margin-bottom: var(--space-lg);
    position: relative;
}

.funny-line {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
}

/* External Links (Wikipedia + Google pills) */
.external-links {
    border-top: 1px solid var(--border);
    padding-top: var(--space-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.external-links-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.external-links-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.external-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--bg);
    color: var(--link-blue);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border);
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}

.external-pill:hover {
    background: #eef3ff;
    border-color: var(--link-blue);
    color: var(--link-blue);
}

/* Comic */
.comic-block {
    margin: var(--space-lg) 0 calc(var(--space-lg) + 0.5rem);
    text-align: center;
}

.comic-block svg { max-width: 500px; }

/* Comic tier indicator (Tier 1 sketch → Tier 2 full comic) */
.comic-tier {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-md);
}
.tier-step {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    white-space: nowrap;
}
.tier-on {
    background: var(--highlight);
    color: var(--text);
    border-color: var(--highlight);
}
.tier-locked {
    color: var(--text-muted);
    background: var(--bg-card);
    border-style: dashed;
}
.tier-arrow { color: var(--text-muted); font-weight: 700; }
.comic-basic-note {
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* First-to-ask celebration banner + upgrade-notify capture */
.first-ask-banner {
    background: linear-gradient(180deg, #FFF9E6 0%, var(--bg-card) 100%);
    border: 2px solid var(--highlight);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    text-align: center;
    animation: firstAskIn 0.5s ease-out;
}
@keyframes firstAskIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.first-ask-pop {
    font-size: 2.4rem;
    line-height: 1;
    animation: firstAskPop 0.6s ease-out;
}
@keyframes firstAskPop {
    0%   { transform: scale(0) rotate(-20deg); }
    60%  { transform: scale(1.3) rotate(8deg); }
    100% { transform: scale(1) rotate(0); }
}
.first-ask-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: var(--space-sm) 0 var(--space-xs);
    color: var(--text);
}
.first-ask-sub {
    color: var(--text-muted);
    max-width: 34rem;
    margin: 0 auto var(--space-md);
    line-height: 1.5;
}
.first-ask-hook { margin-bottom: var(--space-sm); color: var(--text); }
.first-ask-form { max-width: 26rem; margin: 0 auto; }
.first-ask-row {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}
.first-ask-input {
    flex: 1 1 12rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-body);
}
.first-ask-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.first-ask-btn {
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}
.first-ask-btn:hover { background: var(--accent-hover); }
.first-ask-btn:disabled { opacity: 0.6; cursor: default; }
.first-ask-check {
    display: block;
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.first-ask-fine {
    margin-top: var(--space-xs);
    font-size: 0.75rem;
    color: var(--text-muted);
}
.first-ask-success {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--success);
    margin-top: var(--space-sm);
}

/* Why People Ask This block */
.why-people-ask-block {
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
}

.why-people-ask-block .section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.why-people-ask-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
    margin: 0;
}

/* Voting */
.vote-section {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
    flex-wrap: wrap;
}

.vote-label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.vote-btn {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}

.vote-btn:hover {
    border-color: var(--accent);
    background: #fef2ef;
}

.vote-thanks {
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 500;
}

/* Sharing */
.share-section {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-md) 0;
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.share-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

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

/* Meta */
.answer-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: var(--space-lg) 0;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
    line-height: 1.8;
}

/* Related questions */
.related-section {
    margin: var(--space-lg) 0;
}

.related-section h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}

.related-list {
    list-style: none;
}

.related-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
}

.related-list li:last-child { border-bottom: none; }

.related-list a { transition: color 0.15s; }

.related-unlinked { color: var(--text-muted); }

/* Ask another CTA */
.ask-another {
    text-align: center;
    padding: var(--space-xl) 0;
}

.ask-another p {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
}

/* ===========================================================================
   Browse page
   =========================================================================== */

.browse-page {
    padding: var(--space-lg) 0;
}

.browse-page h1 {
    font-family: var(--font-display);
    margin-bottom: var(--space-md);
}

.search-form {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.search-form input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.15s;
}

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

.search-form button {
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.search-form button:hover { background: var(--accent-hover); }

.question-list { margin-bottom: var(--space-lg); }

.question-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: background 0.15s;
}

.question-row:hover { background: var(--bg-card); }

.row-question { font-weight: 500; line-height: 1.4; }

.row-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: var(--space-md);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.9rem;
}

/* ===========================================================================
   About page
   =========================================================================== */

.about-page {
    padding: var(--space-xl) 0;
    max-width: 580px;
}

.about-page h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: var(--space-md);
}

.about-page h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-top: calc(var(--space-lg) + 0.25rem);
    margin-bottom: var(--space-sm);
}

.about-page p {
    margin-bottom: var(--space-md);
    line-height: 1.75;
    color: var(--text);
}

/* ===========================================================================
   Error page (404)
   =========================================================================== */

.error-page {
    text-align: center;
    max-width: 480px;
    padding: var(--space-xl) 0;
}

.error-page h1 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.error-page p {
    margin-bottom: var(--space-md);
    line-height: 1.7;
    color: var(--text);
}

.error-figure {
    margin-bottom: var(--space-md);
}

.error-svg {
    width: 140px;
    height: auto;
}

.error-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.error-meter {
    width: 180px;
}

.error-rating-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===========================================================================
   Page container — for privacy, terms, and other long-form text pages
   =========================================================================== */

.page-container {
    max-width: var(--max-width);
    margin: var(--space-lg) auto;
    padding: 0 var(--space-md);
}

.page-container h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

.page-container h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-top: calc(var(--space-lg) + 0.25rem);
    margin-bottom: var(--space-sm);
}

.page-container h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
}

.page-container p {
    margin-bottom: var(--space-md);
    line-height: 1.75;
}

.page-container ul {
    margin-bottom: var(--space-md);
    padding-left: 1.5rem;
    line-height: 1.75;
}

.page-container li {
    margin-bottom: var(--space-xs);
}

.page-container .page-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

/* ===========================================================================
   Categories page
   =========================================================================== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--space-md) + 0.25rem) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
    min-height: 90px;
}

.category-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    color: var(--text);
}

.category-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.category-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===========================================================================
   Category hub pages
   =========================================================================== */

.category-hub {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-lg) 0;
}

.category-hub-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.category-hub-intro {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: var(--space-lg);
}

.category-hub-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    font-style: italic;
}

.category-hub-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-hub-item {
    border-bottom: 1px solid var(--border);
}

.category-hub-item:first-child {
    border-top: 1px solid var(--border);
}

.category-hub-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
    text-decoration: none;
    color: var(--text);
    transition: color 0.15s;
}

.category-hub-link:hover {
    color: var(--accent);
}

.category-hub-question {
    font-size: 1rem;
    flex: 1;
    line-height: 1.4;
}

.category-hub-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: var(--space-md);
    white-space: nowrap;
    font-style: italic;
}

.category-hub-empty {
    color: var(--text-muted);
    font-style: italic;
}

/* ===========================================================================
   Footer
   =========================================================================== */

.site-footer {
    border-top: 1px solid var(--border);
    padding: calc(var(--space-lg) + 0.5rem) 0 var(--space-lg);
    margin-top: var(--space-xl);
    text-align: center;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
}

.footer-links {
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

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

.footer-dot {
    color: var(--border);
    margin: 0 0.4rem;
}

/* ===========================================================================
   Cookie banner
   =========================================================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--text);
    color: white;
    padding: var(--space-md) var(--space-lg);
    text-align: center;
    z-index: 9999;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

body.cookie-visible {
    padding-bottom: 80px;
}

.cookie-text {
    line-height: 1.4;
}

.cookie-text a {
    color: var(--accent);
}

.cookie-text a:hover {
    color: var(--highlight);
}

.cookie-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.4rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.cookie-btn:hover {
    background: var(--accent-hover);
}

.cookie-actions {
    display: inline-flex;
    gap: var(--space-sm);
    align-items: center;
}

.cookie-btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ===========================================================================
   Admin
   =========================================================================== */

.admin-page {
    padding: var(--space-lg) 0;
    max-width: 800px;
    margin: 0 auto;
}

.admin-page h1 {
    font-family: var(--font-display);
    margin-bottom: var(--space-md);
}

.admin-stats {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.admin-nav {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    border-bottom: 2px solid var(--border);
    padding-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.admin-nav a {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.admin-nav a.active {
    background: var(--accent);
    color: white;
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.admin-card-header h3 {
    font-family: var(--font-display);
    font-size: 1rem;
}

.admin-source {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.admin-card-body p {
    font-size: 0.85rem;
    margin-bottom: var(--space-xs);
    line-height: 1.5;
}

.admin-edit {
    margin: var(--space-md) 0;
}

.admin-edit summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--accent);
}

.admin-edit form {
    margin-top: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.admin-edit label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-edit textarea, .admin-edit input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.admin-edit button {
    align-self: flex-start;
    padding: 0.4rem 1rem;
    background: var(--text);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.admin-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.btn-approve {
    background: var(--success);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-reject {
    background: var(--text-muted);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-delete {
    background: none;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 4px;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-view {
    font-size: 0.85rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    text-decoration: none;
}

.batch-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

.batch-form button {
    padding: 0.6rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
}

.batch-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* Login */
.login-page {
    text-align: center;
    padding: var(--space-xl) 0;
}

.login-page h1 {
    font-family: var(--font-display);
    margin-bottom: var(--space-md);
}

.login-form {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

.login-form input {
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.login-form button {
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
}

.empty-state {
    color: var(--text-muted);
    font-style: italic;
    padding: var(--space-lg) 0;
}

/* ===========================================================================
   Sensitive / Help content pages
   =========================================================================== */

.sensitive-page {
    padding: var(--space-xl) 0;
    max-width: 580px;
}

.sensitive-page h1 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: var(--space-md);
}

.sensitive-page h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-top: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.sensitive-page p {
    margin-bottom: var(--space-md);
    line-height: 1.75;
}

/* Resource cards — base style */
.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--text-muted);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

/* Featured resource cards — stronger accent for primary resources */
.resource-card-featured {
    border-left-color: var(--accent);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.resource-card h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.resource-card p {
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
    line-height: 1.6;
}

.resource-link {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Help page "More Support" heading */
.help-more-heading {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

/* Help page "Learn More" section */
.help-learn-more {
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

.help-learn-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-sm);
}

.help-learn-more .external-pill {
    margin-right: var(--space-xs);
    margin-bottom: var(--space-xs);
}

.sensitive-note {
    font-style: italic;
    color: var(--text-muted);
    margin-top: var(--space-lg);
}

/* ===========================================================================
   Newsletter signup
   =========================================================================== */

.newsletter-signup {
    text-align: center;
    padding: calc(var(--space-md) + 0.25rem) var(--space-md);
    margin: var(--space-lg) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.newsletter-hook {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    font-family: var(--font-display);
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    max-width: 420px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: var(--bg-card);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.newsletter-input:focus {
    border-color: var(--accent);
}

.newsletter-btn {
    padding: 0.6rem 1.3rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-display);
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: var(--accent-hover);
}

.newsletter-fine-print {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.6rem;
}

/* ===========================================================================
   What's New page
   =========================================================================== */

.whats-new-entries {
    margin-top: var(--space-lg);
}

.whats-new-entry {
    padding-bottom: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.whats-new-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.whats-new-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
    font-family: var(--font-display);
    letter-spacing: 0.02em;
}

.whats-new-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.whats-new-entry p {
    line-height: 1.7;
    color: var(--text);
    margin: 0;
}

/* ===========================================================================
   Contest coming soon page
   =========================================================================== */

.contest-page {
    padding: var(--space-xl) 0;
    max-width: 580px;
}

.contest-hero {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.contest-eyebrow {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.contest-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.contest-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.contest-how {
    margin-bottom: var(--space-xl);
}

.contest-section-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.contest-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contest-step {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.contest-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
}

.contest-step strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.contest-step p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

.contest-cta {
    text-align: center;
    background: var(--highlight);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-md);
    margin-bottom: var(--space-lg);
}

.contest-cta-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
}

.contest-cta-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.contest-fine {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.7;
}

/* ===========================================================================
   Gazette — Index & Issue Pages
   =========================================================================== */

/* Branded header (shared by index + issue pages) */
.gazette-branded-header {
    text-align: center;
    padding: var(--space-xl) var(--space-md) var(--space-lg);
    background: var(--accent);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.gazette-header-the {
    display: block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-xs);
}

.gazette-header-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 6vw, 2.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: var(--space-xs);
    color: #fff;
}

.gazette-header-title .accent {
    color: var(--highlight);
}

.gazette-header-tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    margin-bottom: var(--space-xs);
}

.gazette-header-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Gazette intro (index page) */
.gazette-intro {
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: var(--space-lg);
}

/* Subscribe CTA (shared by index + issue) */
.gazette-subscribe-cta {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    margin-bottom: var(--space-xl);
    background: var(--accent);
    border: none;
    border-radius: var(--radius-lg);
}

.gazette-subscribe-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
    color: #fff;
}

.gazette-subscribe-sub {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-md);
}

.gazette-subscribe-cta .newsletter-input {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text);
}

.gazette-subscribe-cta .newsletter-input:focus {
    border-color: #fff;
    background: #fff;
}

.gazette-subscribe-cta .newsletter-btn {
    background: var(--text);
    color: #fff;
}

.gazette-subscribe-cta .newsletter-btn:hover {
    background: #111;
}

.gazette-subscribe-cta .newsletter-fine-print {
    color: rgba(255, 255, 255, 0.7);
}

/* Issue list (index page) */
.gazette-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gazette-card {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s;
}

.gazette-card:first-child {
    border-top: 1px solid var(--border);
}

.gazette-card:hover {
    color: var(--accent);
}

.gazette-card-number {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 60px;
}

.gazette-card-title {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
}

.gazette-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ===========================================================================
   Individual Gazette Issue
   =========================================================================== */

.gazette-issue {
    padding: var(--space-lg) 0;
    max-width: 620px;
}

/* Intro block */
.gazette-intro-block {
    border-top: 1px solid var(--border);
    padding-top: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.gazette-intro-block p {
    font-size: 1.05rem;
    line-height: 1.75;
}

/* Section labels */
.gazette-section-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* Editor's Picks — card style */
.gazette-section {
    margin-bottom: var(--space-xl);
}

.gazette-pick-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md) calc(var(--space-md) + 0.5rem);
    margin-bottom: var(--space-md);
    transition: border-color 0.2s;
}

.gazette-pick-card:hover {
    border-color: var(--accent);
}

.gazette-pick-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.4;
}

.gazette-pick-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s;
}

.gazette-pick-title a:hover {
    color: var(--accent);
}

.gazette-pick-rating {
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.gazette-pick-writeup {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: var(--space-sm);
}

.gazette-pick-link {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.gazette-pick-link:hover {
    color: var(--accent-hover);
}

/* By the Numbers — yellow highlight block */
.gazette-numbers-block {
    background: var(--highlight);
    border-radius: var(--radius-lg);
    padding: calc(var(--space-md) + 0.25rem) var(--space-lg);
    margin-bottom: var(--space-lg);
}

.gazette-numbers-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.gazette-numbers-block p {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: var(--space-sm);
}

.gazette-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.gazette-cat-pill {
    font-size: 0.85rem;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.6);
    padding: 4px 14px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background 0.15s;
}

.gazette-cat-pill:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
}

/* Coming Soon card */
.gazette-coming-soon-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md) calc(var(--space-md) + 0.5rem);
    margin-bottom: var(--space-lg);
}

.gazette-coming-soon-card p {
    font-size: 1.05rem;
    line-height: 1.75;
}

/* Contest teaser (inside gazette issues) */
.gazette-contest-teaser {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: var(--space-md) calc(var(--space-md) + 0.5rem);
    margin-bottom: var(--space-lg);
}

.gazette-contest-teaser-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-xs);
}

.gazette-contest-teaser-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.gazette-contest-teaser-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: var(--space-sm);
}

.gazette-contest-teaser-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.gazette-contest-teaser-link:hover {
    color: var(--accent-hover);
}

/* Issue navigation */
.gazette-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    .gazette-card {
        flex-direction: column;
        gap: var(--space-xs);
    }
    .gazette-card-number {
        min-width: auto;
    }
    .gazette-branded-header {
        padding: var(--space-lg) var(--space-sm) var(--space-md);
    }
    .gazette-numbers-block {
        padding: var(--space-md);
    }
    .gazette-subscribe-cta {
        padding: var(--space-md);
    }
}

/* ===========================================================================
   Submit page
   =========================================================================== */

.submit-page {
    padding: var(--space-xl) 0;
    max-width: 560px;
}

.submit-page h1 {
    font-family: var(--font-display);
    margin-bottom: var(--space-sm);
}

.submit-intro {
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: var(--space-lg);
}

.submit-form-wrap {
    margin-bottom: var(--space-xl);
}

.submit-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    background: var(--bg-card);
    color: var(--text);
    transition: border-color 0.2s;
}

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

.submit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-sm);
}

.submit-charcount {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.submit-btn {
    flex-shrink: 0;
}

.submit-error {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: var(--space-sm);
}

.submit-success {
    text-align: center;
    padding: var(--space-lg) 0;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--accent);
    color: white;
    border-radius: 16px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    margin-bottom: var(--space-md);
}

.success-msg {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    color: var(--text);
}

.submit-guidelines {
    border-top: 1px solid var(--border);
    padding-top: var(--space-lg);
}

.submit-guidelines h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}

.submit-guidelines p {
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: var(--space-md);
}

/* ===========================================================================
   Responsive
   =========================================================================== */

@media (max-width: 600px) {
    .site-header .container {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    .site-header nav {
        gap: var(--space-sm);
        width: 100%;
        justify-content: flex-start;
    }
    .site-header nav a {
        font-size: 0.85rem;
    }
    .ask-form {
        flex-direction: column;
    }
    .admin-stats {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    .question-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    .row-meta { margin-left: 0; }
    .stupidity-meter svg { width: 140px; }
    .external-links {
        flex-direction: column;
        align-items: flex-start;
    }
    .external-links-pills {
        flex-direction: column;
        width: 100%;
    }
    .external-pill {
        white-space: normal;
    }
    .cookie-banner {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-md);
    }
    .newsletter-form {
        flex-direction: column;
    }
    .newsletter-input,
    .newsletter-btn {
        width: 100%;
    }
    .error-page {
        padding: var(--space-lg) 0;
    }
    .submit-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    .submit-charcount {
        text-align: right;
    }
    .share-section {
        gap: var(--space-xs);
    }
    .share-label {
        width: 100%;
        margin-bottom: var(--space-xs);
    }
    .vote-section {
        gap: var(--space-xs);
    }
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--space-sm);
    }
    .question-grid {
        grid-template-columns: 1fr;
    }
    .funny-block {
        padding: var(--space-md);
    }
    .hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}

/* =========================================================================
   SSA EMERGENCY INTERSTITIAL STYLES
   ========================================================================= */

/* --- Overlay --- */
.ssa-emergency-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 20px;
    box-sizing: border-box;
}

.ssa-emergency-overlay.ssa-emergency-visible {
    opacity: 1;
}

/* --- Card (shared) --- */
.ssa-emergency-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.ssa-emergency-visible .ssa-emergency-card {
    transform: scale(1);
}

/* --- Card 1: "Is This Real?" --- */
.ssa-emergency-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ssa-emergency-headline {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.ssa-emergency-subtext {
    font-size: 16px;
    color: #666;
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.ssa-emergency-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ssa-emergency-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.ssa-emergency-btn:active {
    transform: scale(0.98);
}

.ssa-emergency-btn-danger {
    background: #dc2626;
    color: #fff;
}

.ssa-emergency-btn-danger:hover {
    background: #b91c1c;
}

.ssa-emergency-btn-neutral {
    background: #f3f4f6;
    color: #374151;
}

.ssa-emergency-btn-neutral:hover {
    background: #e5e7eb;
}

/* --- Card 2: Emergency Response --- */
.ssa-emergency-card-response {
    text-align: left;
    padding: 0;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.ssa-emergency-response-header {
    background: #dc2626;
    padding: 24px 32px;
}

.ssa-emergency-response-headline {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

/* --- Phone action buttons --- */
.ssa-emergency-actions {
    padding: 20px 32px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ssa-emergency-phone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.ssa-emergency-phone-primary {
    background: #dc2626;
    color: #fff;
}

.ssa-emergency-phone-primary:hover {
    background: #b91c1c;
}

.ssa-emergency-phone-secondary {
    background: #f3f4f6;
    color: #1a1a1a;
}

.ssa-emergency-phone-secondary:hover {
    background: #e5e7eb;
}

.ssa-emergency-phone-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.ssa-emergency-phone-label {
    font-weight: 600;
    font-size: 16px;
    flex: 1;
}

.ssa-emergency-phone-number {
    font-size: 14px;
    opacity: 0.8;
}

/* --- Instructions --- */
.ssa-emergency-instructions {
    padding: 20px 32px 8px;
    margin: 0;
    list-style: none;
}

.ssa-emergency-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ssa-emergency-step:last-child {
    border-bottom: none;
}

.ssa-emergency-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
}

.ssa-emergency-step-text {
    font-size: 15px;
    line-height: 1.5;
    color: #374151;
    padding-top: 3px;
}

/* --- Footer / back button --- */
.ssa-emergency-footer {
    padding: 16px 32px 24px;
}

.ssa-emergency-btn-back {
    background: #f3f4f6;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
}

.ssa-emergency-btn-back:hover {
    background: #e5e7eb;
    color: #374151;
}

/* --- Emergency mobile --- */
@media (max-width: 500px) {
    .ssa-emergency-card {
        padding: 28px 20px;
        border-radius: 12px;
    }

    .ssa-emergency-headline {
        font-size: 20px;
    }

    .ssa-emergency-subtext {
        font-size: 14px;
    }

    .ssa-emergency-btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .ssa-emergency-response-header {
        padding: 20px 20px;
    }

    .ssa-emergency-response-headline {
        font-size: 22px;
    }

    .ssa-emergency-actions {
        padding: 16px 20px 8px;
    }

    .ssa-emergency-instructions {
        padding: 16px 20px 8px;
    }

    .ssa-emergency-footer {
        padding: 12px 20px 20px;
    }
}
