/* MindfulPrintables.com - High-Contrast, Neurodivergent-Accessible, Responsive Stylesheet */
:root {
    --bg-primary: #0b132b;
    --bg-secondary: #151f38;
    --bg-card: #1e293b;
    --bg-elevated: #28354d;
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #cbd5e1;
    --accent-teal: #0d9488;
    --accent-cyan: #2dd4bf;
    --accent-gold: #facc15;
    --accent-coral: #fb7185;
    --accent-indigo: #4f46e5;
    --accent-emerald: #10b981;
    --border-subtle: rgba(255, 255, 255, 0.15);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-xl: 0 20px 30px -8px rgba(0, 0, 0, 0.55);
    --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.32);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.68;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
    padding-bottom: 88px;
    margin-bottom: 56px;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--accent-gold);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.svg-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 12px;
    background: var(--accent-gold);
    color: #0b132b;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 8px;
    z-index: 999;
}
.skip-link:focus {
    top: 12px;
}

/* Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 19, 43, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 16px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.26rem;
    color: #ffffff;
    letter-spacing: -0.02em;
}
.brand-logo:hover {
    color: #ffffff;
}

.brand-emblem-svg {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.brand-wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1.18;
}

.brand-wordmark small {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.95rem;
    font-weight: 600;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-secondary);
    padding: 6px 8px;
    border-radius: 8px;
}
.nav-links a:hover, .nav-links a.active {
    color: #0b132b;
    background: var(--accent-cyan);
}

.quota-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #064e3b;
    border: 2px solid #34d399;
    color: #ecfdf5;
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.quota-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #34d399;
    flex-shrink: 0;
}

/* AdSense Containers: Strictly hidden until a live ca-pub-XXXX ID is active! */
.ad-slot-wrapper, .sticky-ad-footer {
    display: none !important;
}
body.live-adsense-ready .ad-slot-wrapper {
    display: block !important;
    margin: 22px auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}

/* Hero Section with High-Contrast Vibrant Solid Distinguishable Colors (WCAG AAA) */
.hero-section {
    padding: 40px 0 32px;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, rgba(13, 148, 136, 0.24), transparent 72%);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1e293b;
    border: 1px solid #5eead4;
    color: #99f6e4;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(1.85rem, 3.9vw, 3.05rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.22;
    margin-bottom: 16px;
    color: #ffffff;
}

/* Vibrant, Solid, High-Contrast Distinguishable Highlights for ASD & ADHD Readability */
.hl-gold {
    color: #facc15; /* 13.2:1 contrast ratio on #0b132b */
}
.hl-cyan {
    color: #2dd4bf; /* 10.9:1 contrast ratio on #0b132b */
}
.hl-coral {
    color: #fda4af; /* 9.8:1 contrast ratio on #0b132b */
}

.hero-subtitle {
    color: #f1f5f9;
    max-width: 780px;
    margin: 0 auto 28px;
    font-size: 1.06rem;
    font-weight: 500;
}

.generator-card {
    background: var(--bg-secondary);
    border: 2px solid rgba(94, 234, 212, 0.35);
    border-radius: var(--radius-lg);
    padding: 26px;
    max-width: 1020px;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
    text-align: left;
}

.prompt-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.prompt-textarea {
    flex: 1 1 440px;
    min-height: 68px;
    background: var(--bg-primary);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}
.prompt-textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.btn-primary {
    background: #0d9488;
    color: #ffffff;
    border: 2px solid #5eead4;
    border-radius: var(--radius-md);
    padding: 12px 22px;
    font-weight: 800;
    font-size: 0.98rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    transition: transform 0.15s, background 0.2s;
}
.btn-primary:hover {
    transform: translateY(-1px);
    background: #0f766e;
    color: #ffffff;
}

.btn-enhance {
    background: #1e3a8a;
    color: #fef08a;
    border: 2px solid #facc15;
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    transition: transform 0.15s, background 0.2s;
}
.btn-enhance:hover {
    transform: translateY(-1px);
    background: #1d4ed8;
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-card);
    color: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.86rem;
    font-weight: 700;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-cyan);
    color: #ffffff;
}

.generator-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    align-items: end;
}

.control-group label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #e2e8f0;
    margin-bottom: 6px;
    font-weight: 700;
}

.control-select, .control-input {
    width: 100%;
    min-height: 46px;
    background: var(--bg-primary);
    color: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.92rem;
    font-weight: 500;
}

.quick-modifiers {
    margin-top: 16px;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.modifier-chip {
    background: #1e293b;
    border: 1px solid #5eead4;
    color: #ccfbf1;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.modifier-chip:hover {
    background: var(--accent-teal);
    color: #ffffff;
}

/* Interactive Feature Bar: Routine Board Builder & Saved Pack */
.feature-bar {
    margin: 28px 0 18px;
    padding: 18px 22px;
    background: var(--bg-secondary);
    border: 2px solid rgba(250, 204, 21, 0.4);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.routine-slots-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.routine-slot-card {
    background: var(--bg-primary);
    border: 2px dashed rgba(94, 234, 212, 0.45);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Filter Tabs & Search Bar */
.toolbar-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 26px 0 22px;
    flex-wrap: wrap;
}

.category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: #e2e8f0;
    padding: 10px 16px;
    min-height: 44px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.cat-tab.active, .cat-tab:hover {
    background: var(--accent-gold);
    color: #0b132b;
    border-color: var(--accent-gold);
}

.search-box {
    flex: 1 1 240px;
    max-width: 340px;
    min-height: 46px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    font-size: 0.92rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 22px;
}

.art-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s;
}
.art-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-cyan);
}

.art-thumb-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #ffffff;
    overflow: hidden;
    cursor: pointer;
    display: block;
    padding: 6px;
}

.art-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}
.art-card:hover .art-thumb-wrap img {
    transform: scale(1.03);
}

.art-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #0b132b;
    border: 1px solid #5eead4;
    color: #facc15;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.art-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.art-title {
    font-size: 1.02rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: #ffffff;
    line-height: 1.35;
}

.art-prompt-snippet {
    font-size: 0.84rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
    flex: 1;
}

.art-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}
.modal-backdrop.open {
    display: flex;
}

.modal-window {
    background: var(--bg-secondary);
    border: 2px solid rgba(94, 234, 212, 0.35);
    border-radius: var(--radius-lg);
    max-width: 1060px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: var(--shadow-xl);
}

.studio-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.canvas-preview-container {
    background: #ffffff;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

#studioCanvas {
    max-width: 100%;
    max-height: 480px;
    border-radius: 6px;
}

/* SEO Guide & FAQ Cards */
.seo-guide-section {
    margin-top: 52px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 34px 26px;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.seo-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px;
}

.seo-card h3 {
    font-size: 1.06rem;
    margin-bottom: 8px;
    color: var(--accent-gold);
}

.seo-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.breadcrumb-nav {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Spacious Footer with Clear Separation from Main Body */
.site-footer {
    flex-shrink: 0;
    margin-top: 64px;
    padding: 52px 0 64px;
    background: #070c1c;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-card-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Mobile Hamburger Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: var(--bg-card);
    color: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.header-Collapse-Wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}

@media (max-width: 920px) {
    .studio-layout {
        grid-template-columns: 1fr;
    }
    .mobile-menu-toggle {
        display: inline-flex;
    }
    .nav-bar {
        justify-content: space-between;
        position: relative;
        flex-wrap: wrap;
    }
    .header-Collapse-Wrap {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg-secondary);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 16px;
        margin-top: 10px;
        gap: 14px;
        box-shadow: var(--shadow-xl);
    }
    .header-Collapse-Wrap.open {
        display: flex;
    }
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 8px;
    }
    .nav-links a {
        width: 100%;
        padding: 12px 14px;
        border-radius: var(--radius-sm);
        background: var(--bg-primary);
    }
    .quota-pill {
        justify-content: center;
        width: 100%;
    }
    .search-box {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    .container {
        padding: 0 14px;
    }
    .generator-card {
        padding: 18px;
    }
    .btn-primary, .btn-enhance {
        width: 100%;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .seo-guide-section {
        padding: 24px 16px;
    }
}

@media print {
    .site-header, .ad-slot-wrapper, .sticky-ad-footer, .site-footer, .btn-secondary, .btn-primary, .btn-enhance {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
    }
}
