/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    letter-spacing: -0.01em; /* Tighter letter spacing for premium feel */
    font-optical-sizing: auto;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--background-light);
    /* @tweakable Base font size for all general body text (paragraphs, list items etc.) */
    font-size: 0.75rem; /* Reduced by 25% from default 1rem (16px) */
}

h1, h2, h3, h4, h5 {
    /* @tweakable [Font family for all headings (h1-h5) - now using a modern, clean sans-serif font] */
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-color-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 .5rem;
}

/* @tweakable [Color palette for the hero section] */
:root {
    /* @tweakable [Color Palette for ArticleCraft.ai theme] */
    --primary-color: #1a237e; /* Deep royal blue for primary actions and gradients */
    --secondary-color: #00695c; /* Rich teal for accents and secondary elements */
    --accent-color: #d4af37; /* Gold accent for premium touch */
    --text-color-dark: #1a1a1a; /* Rich black for main headings and text */
    --text-color-light: #4a5568; /* Sophisticated gray for paragraphs and secondary text */
    --background-light: #f8fafc; /* Premium light background */
    --background-white: #ffffff; /* Pure white for cards and containers */
    --border-color: #e2e8f0; /* Subtle borders */

    /* @tweakable [Horizontal offset for the logo tagline to fine-tune alignment relative to the title.] */
    --tagline-horizontal-offset: -40px;

    /* NEW: Tweakable variables for desktop logo positioning */
    /* @tweakable [Desktop padding on .logo to shift text right, making space for the icon overlay] */
    --logo-desktop-text-offset: 45px;
    /* @tweakable [Desktop horizontal position offset for the logo icon (::before) relative to the left edge of .logo] */
    --logo-desktop-icon-left: -5px;
    /* @tweakable [Desktop vertical position offset for the logo icon (::before) relative to the top edge of .logo] */
    --logo-desktop-icon-top: 35px;

    /* @tweakable [Spacing between navigation links] */
    --nav-link-spacing: 0.2rem; /* Reduced to fit more links in the nav bar */
    /* @tweakable [Font size for navigation links] */
    --nav-link-font-size: 0.85rem;
    /* @tweakable [Vertical padding for navigation links] */
    --nav-link-vertical-padding: 0.1rem;
    /* @tweakable [Horizontal padding for navigation links] */
    --nav-link-horizontal-padding: 0.2rem; /* Reduced to fit more links in the nav bar */
    /* @tweakable [Remove underline from navigation links across all pages] */
    --nav-link-mobile-font-size: 0.68rem;
    /* @tweakable [Vertical and horizontal padding for navigation links on mobile] */
    --nav-link-mobile-vertical-padding: 0.1rem;
    /* @tweakable [Horizontal padding for navigation links on mobile to fit more links] */
    --nav-link-mobile-horizontal-padding: 0.1rem; /* Reduced for tighter fit on small displays */
    /* @tweakable [Spacing between navigation links on mobile: reduce gap to prevent wrapping] */
    --nav-link-mobile-spacing: 0.01rem;
    /* @tweakable [Top margin for navigation bar links on mobile to reduce space to logo] */
    --nav-mobile-top-margin: -0.2rem;
    /* @tweakable [Top margin for navigation bar links on desktop] */
    --nav-desktop-top-margin: 55px;

    /* @tweakable [Font size for the main content heading on landing, library, privacy, and terms pages] */
    --main-page-heading-font-size: 1.875rem;
    /* @tweakable [Bottom margin for the main content heading on landing, library, privacy, and terms pages] */
    --main-page-heading-margin-bottom: 1.5rem;
    /* @tweakable [Font size for the main content heading on mobile screens (below 480px)] */
    --main-page-heading-mobile-font-size: 1.35rem;

    /* @tweakable [Vertical padding for the main content sections (Hero, Analysis, Knowledge Library Hero, Legal Pages) to control spacing above headings.] */
    --section-vertical-padding: 2.5rem;
    /* @tweakable Top padding for the entire logo element (image and text combo) */
    --logo-top-padding: 25px;
    /* @tweakable [Bottom padding for the site header to control spacing to the section below] */
    --site-header-bottom-padding: 0.3rem; /* Adjusted from 0.6rem (approx 10px less) */

    /* @tweakable [Premium gradient colors for hero sections] */
    --hero-gradient-start: linear-gradient(135deg, #1a237e 0%, #303f9f 50%, #3f51b5 100%);
    --hero-gradient-end: #1a237e;
    --hero-text-color: white;
    --hero-title-text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);

    /* @tweakable [Horizontal padding for article containers in the Knowledge Library and article modal] */
    --articles-horizontal-padding: 1.5rem; /* @tweakable increase/decrease spacing at page edges */

    /* @tweakable [Spacing between category filter buttons] */
    --filter-gap: 0.5rem;
    /* @tweakable [Padding inside category filter buttons: vertical horizontal] */
    --filter-btn-vertical: 0.45rem;
    --filter-btn-horizontal: 0.9rem;

    /* @tweakable [Vertical space after the filtered article grid in the Knowledge Library (adds 1-2 rows of visual breathing room)] */
    --library-bottom-gap: 4rem; /* @tweakable Increase/decrease the vertical gap below library results */
    /* @tweakable [Vertical padding at the bottom of the article modal body for better readability and to prevent content from touching the bottom] */
    --modal-body-padding-bottom: 2rem;
    
    /* @tweakable [Border-radius for the article header in the modal] */
    --modal-article-header-border-radius: 15px; 
    /* @tweakable [Bottom margin for the article header in the modal to separate it from content below] */
    --modal-article-header-margin-bottom: 2rem;
    /* @tweakable [Padding for the text inside the blue article header section] */
    --modal-article-header-padding: 2.5rem;
    /* @tweakable [Bottom padding for the main article content within the modal to create space below the last paragraph] */
    --modal-article-content-bottom-padding: var(--modal-body-padding-bottom); 
    /* @tweakable Top padding for the logo combo on mobile to create space for the icon */
    --logo-mobile-top-padding: 45px;
    /* @tweakable Size of the logo image on mobile (pseudo-element) */
    --logo-mobile-icon-size: 55px;
    /* @tweakable Vertical position of the logo image on mobile. A smaller value moves it up. */
    --logo-mobile-icon-top: 10px;
    
    /* @tweakable [Vertical position of the logo image center from the top of the site header in mobile view. Default 55px ensures alignment below text start, matching desktop relationship.] */
    --logo-mobile-icon-top-position: 55px;
    
    /* NEW: Mobile icon positioning based on desktop values to maintain relationship. */
    /* @tweakable [Mobile icon horizontal offset relative to the .logo container. Should match desktop icon position to maintain visual relationship with the text offset.] */
    --logo-mobile-icon-left: var(--logo-desktop-icon-left);
    /* @tweakable [Mobile text offset inside .logo container. Should match desktop text offset to maintain visual relationship with the icon.] */
    --logo-mobile-text-offset: var(--logo-desktop-text-offset);
}

/* Header Styles */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.1rem var(--site-header-bottom-padding) .8rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.header-content {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    gap: 1rem; 
}

.logo {
    display: flex;
    flex-direction: column; 
    align-items: flex-start; 
    flex-shrink: 0; 
    position: relative; 
    padding-left: var(--logo-desktop-text-offset); 
    text-decoration: none;
    /* @tweakable Top padding for the entire logo element (image and text combo) */
    padding-top: var(--logo-top-padding);
}

.logo::before {
    content: "";
    position: absolute;
    left: var(--logo-desktop-icon-left); 
    top: var(--logo-desktop-icon-top);
    transform: translateY(-50%);
    width: 52px; 
    height: 52px; 
    background-image: url('/logo256.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* @tweakable [Stacking order of the logo image to ensure it is clickable] */
    z-index: 0; 
    opacity: 0.8; 
    /* @tweakable [Transition timing for logo image opacity and transform effects] */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* @tweakable [Disable hover effect on logo image by removing transform and opacity changes] */
.logo:hover::before {
    /* The user wants no hover effect on the image */
}

/* @tweakable [Wrapper for logo text to handle hover effects independently] */
.logo-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* New wrapper for tagline to apply offset */
.logo-tagline-wrapper {
    /* Apply the requested offset */
    transform: translateX(var(--tagline-horizontal-offset));
    transition: transform 0.3s ease;
}

.logo h1 {
    /* @tweakable Font size for the main site title (Demystify.love) */
    font-size: 1.8rem; /* Reduced by 25% from 2.4rem */
    font-weight: 700;
    margin: 2px 5px 2px 0;  
    color: var(--text-color-dark);
    position: relative; 
    z-index: 1;
    /* @tweakable [Transition timing for the logo title color change on hover] */
    transition: color 0.3s ease;
}

/* Update hover targets to apply to the .logo parent */
.logo:hover h1 {
    color: var(--primary-color); 
}

.love-accent {
    color: #FF6B6B;
    /* @tweakable [Transition timing for the accent text color change on hover] */
    transition: color 0.3s ease;
}

/* Update hover targets to apply to the .logo parent */
.logo:hover .love-accent {
    color: #e63939; 
}

.tagline {
    /* @tweakable Font size for the site tagline */
    font-size: 0.6375rem; /* Reduced by 25% from 0.85rem */
    color: var(--text-color-light);
    font-weight: 400;
    margin: 0;
    margin: 0px 5px 0px 0px; 
    position: relative; 
    z-index: 1;
    /* @tweakable [Transition timing for the tagline color change on hover] */
    transition: color 0.3s ease;
}

/* Update hover targets to apply to the .logo parent */
.logo:hover .tagline {
    color: var(--text-color-dark); 
}

.main-nav {
    /* @tweakable Top margin for navigation bar links on desktop */
    margin-top: var(--nav-desktop-top-margin);
    position: static !important;
    flex-direction: row !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--nav-link-spacing) !important;
    justify-content: flex-end !important;
    align-items: center !important;
}
.main-nav.active {
    right: auto !important;
}
.mobile-menu-toggle {
    /* @tweakable [Show hamburger menu toggle: 0 = hide, 1 = show] */
    display: none !important;
}
.menu-backdrop {
    display: none !important;
}

.nav-link {
    color: var(--text-color-dark); 
    /* @tweakable [Font size for navigation links] */
    font-size: var(--nav-link-font-size);
    font-weight: 500;
    /* @tweakable [Padding for navigation links: vertical horizontal] */
    padding: var(--nav-link-vertical-padding) var(--nav-link-horizontal-padding);
    /* @tweakable [Remove underline from navigation links across all pages] */
    border-bottom: none; 
}

.nav-link:last-child {
    /* This rule becomes redundant after making border-bottom: none for all .nav-link */
    /* Keeping for clarity, but it will have no visual effect */
    border-bottom: none; 
}

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

/* @tweakable [Styles for the settings gear icon in the navigation bar] */
.settings-link {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Navbar responsive wrapping */
/* @tweakable [Viewport width below which navbar switches to wrapped layout] */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center; /* Center the whole .logo block */
    }
    .main-nav {
        justify-content: center; /* Center nav links horizontally */
        width: 80%;
        margin-top: var(--nav-mobile-top-margin); /* Use tweakable variable */
        /* @tweakable [Prevent navbar links from wrapping and set mobile spacing] */
        flex-wrap: nowrap;
        gap: var(--nav-link-mobile-spacing);
        overflow-x: auto;
    }
    .nav-link {
        flex: 0 1 auto;
        white-space: nowrap;
        /* @tweakable [Font size for navigation links on mobile] */
        font-size: var(--nav-link-mobile-font-size);
        /* @tweakable [Vertical and horizontal padding for navigation links on mobile] */
        padding: var(--nav-link-mobile-vertical-padding) var(--nav-link-mobile-horizontal-padding);
    }
    .logo {
        /* Overrides: Restore the horizontal relationship of icon and text */
        align-items: flex-start; /* Ensure text stack is left-aligned internally */
        padding-left: var(--logo-mobile-text-offset); /* Keep desktop offset relationship */
        padding-top: var(--logo-mobile-top-padding);
    }
    .logo::before {
        left: var(--logo-mobile-icon-left); /* Restore horizontal icon position relative to padded area */
        top: var(--logo-mobile-icon-top-position); /* Use the new calculated position */
        transform: translateY(-50%); /* Ensure vertical centering is maintained */
        width: var(--logo-mobile-icon-size);
        height: var(--logo-mobile-icon-size);
    }
    .logo h1, .tagline { text-align: left; } /* Override previous mobile centering for internal text elements */
}

/* Hero Section */
.hero {
    background: var(--hero-gradient-start);
    color: var(--hero-text-color);
    padding: var(--section-vertical-padding) 2rem 5rem 2rem; /* Updated top padding */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" fill-opacity="1" d="M0,96L48,106.7C96,117,192,139,288,154.7C384,171,480,181,576,165.3C672,149,768,107,864,101.3C960,96,1056,128,1152,138.7C1248,149,1344,139,1392,133.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: center;
    opacity: 0.6;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(212, 175, 55, 0.1) 0%, rgba(26, 35, 126, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    /* @tweakable Font size for the main hero heading */
    font-size: var(--main-page-heading-font-size);
    font-weight: 700;
    margin-bottom: var(--main-page-heading-margin-bottom);
    text-shadow: var(--hero-title-text-shadow);
    color: var(--hero-text-color); /* Ensure title color is set for hero */
}

.hero-subtitle {
    /* @tweakable Font size for the hero subheading */
    font-size: 0.75rem; /* Reduced by 25% from 1.0rem */
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-benefits {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.benefit {
    display: flex;
    align-items: center;
    font-weight: 500;
    gap: 0.5rem;
}

.benefit i {
    /* @tweakable Icon size for hero benefits */
    font-size: 0.9rem; /* Reduced by 25% from 1.2rem */
    color: #80cbc4; /* Lighter teal */
}

.hero-cta {
    background: linear-gradient(135deg, var(--accent-color) 0%, #b8860b 100%);
    color: var(--text-color-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    /* @tweakable Font size for the main call to action button in hero section */
    font-size: 0.825rem; /* Reduced by 25% from 1.1rem */
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-cta:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #e6c547 0%, var(--accent-color) 100%);
    box-shadow: 0 12px 48px rgba(212, 175, 55, 0.4);
}

.hero-cta i {
    transition: transform 0.3s;
}

.hero-cta:hover i {
    transform: translateX(4px);
}

/* Enhanced Hero Section */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    /* @tweakable Font size for hero stats numbers */
    font-size: 1.5rem; /* Reduced by 25% from 2rem */
    font-weight: 700;
    color: #80cbc4; /* Lighter teal */
}

.stat-label {
    display: block;
    /* @tweakable Font size for hero stats labels */
    font-size: 0.675rem; /* Reduced by 25% from 0.9rem */
    opacity: 0.9;
}

.hero-guarantee {
    margin-top: 1rem;
    /* @tweakable Font size for the guarantee text in hero section */
    font-size: 0.675rem; /* Reduced by 25% from 0.9rem */
    opacity: 0.9;
    text-align: center;
}

/* Problem Section */
.problem-section {
    background: linear-gradient(135deg, #f8fafc 0%, rgba(248, 250, 252, 0.8) 100%);
    padding: 2rem 2rem;
}

.problem-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.problem-content h2 {
    /* @tweakable Font size for the problem section main heading */
    font-size: 1.65rem; /* Reduced by 25% from 2.2rem */
    color: var(--text-color-dark);
    margin-bottom: 3rem;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.problem-item {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.problem-icon {
    /* @tweakable Icon size for problem items */
    font-size: 2.25rem; /* Reduced by 25% from 3rem */
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.problem-item h3 {
    /* @tweakable Font size for problem item subheadings */
    font-size: 0.975rem; /* Reduced by 25% from 1.3rem */
    margin-bottom: 1rem;
    color: var(--text-color-dark);
}

.problem-item p {
    color: var(--text-color-light);
    font-style: italic;
    line-height: 1.6;
}

.problem-text {
    /* @tweakable Font size for the problem section call to action text */
    font-size: 0.9rem; /* Reduced by 25% from 1.2rem */
    color: var(--text-color-dark);
    font-weight: 500;
}

/* Solution Section */
.solution-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #303f9f 50%, #3f51b5 100%); /* Blue gradient */
    color: white;
    padding: 5rem 2rem;
}

.solution-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.solution-content h2 {
    /* @tweakable Font size for the solution section main heading */
    font-size: 1.875rem; /* Reduced by 25% from 2.5rem */
    margin-bottom: 1rem;
    color: white;
}

.solution-subtitle {
    /* @tweakable Font size for the solution section subheading */
    font-size: 0.825rem; /* Reduced by 25% from 1.1rem */
    margin-bottom: 4rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.solution-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    text-align: left;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    display: flex;
    gap: 1rem;
}

.feature-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    /* @tweakable Icon size for feature items */
    font-size: 1.125rem; /* Reduced by 25% from 1.5rem */
    color: var(--primary-color);
}

.feature-content h3 {
    /* @tweakable Font size for feature item headings */
    font-size: 0.975rem; /* Reduced by 25% from 1.3rem (common h3 size) */
    color: white;
    margin-bottom: 0.5rem;
}

.feature-content p {
    opacity: 0.9;
    margin: 0;
}

/* How It Works Section */
.how-it-works {
    background: var(--background-white);
    padding: 5rem 2rem;
    text-align: center;
}

.how-it-works h2 {
    /* @tweakable Font size for the 'How It Works' section main heading */
    font-size: 1.65rem; /* Reduced by 25% from 2.2rem */
    color: var(--text-color-dark);
    margin-bottom: 3rem;
}

.steps-container {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #009688 100%); /* Teal gradient */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* @tweakable Font size for the step numbers in 'How It Works' section */
    font-size: 1.125rem; /* Reduced by 25% from 1.5rem */
    font-weight: 700;
    margin: 0 auto 1rem auto;
}

.step h3 {
    /* @tweakable Font size for step titles in 'How It Works' section */
    font-size: 0.825rem; /* Reduced by 25% from 1.1rem */
    margin-bottom: 0.5rem;
    color: var(--text-color-dark);
}

.step p {
    /* @tweakable Font size for step descriptions in 'How It Works' section */
    font-size: 0.675rem; /* Reduced by 25% from 0.9rem */
    color: var(--text-color-light);
}

.primary-cta {
    background: linear-gradient(135deg, var(--accent-color) 0%, #b8860b 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.2rem 2.5rem;
    /* @tweakable Font size for the primary call to action button */
    font-size: 0.825rem; /* Reduced by 25% from 1.1rem */
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.6);
}

/* AI Detector/Proof Section */
.proof-section {
    background: var(--background-light);
    padding: 5rem 2rem;
    text-align: center;
}

.proof-section h2 {
    font-size: 1.65rem;
    color: var(--text-color-dark);
    margin-bottom: 1rem;
}

.proof-subtitle {
    color: var(--text-color-light);
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 0.825rem;
}

.detectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 2.5rem auto;
}

.detector-card {
    background: var(--background-white);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.detector-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
}

.detector-icon {
    font-size: 2.25rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: inline-block;
}

.detector-card h3 {
    font-size: 0.975rem;
    margin-bottom: 0.5rem;
    color: var(--text-color-dark);
}

.detector-card p {
    color: var(--text-color-light);
    font-size: 0.75rem;
}

.proof-footer {
    color: var(--text-color-light);
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.75rem;
    font-style: italic;
}

/* Authentication Modal */
/* REMOVED: .auth-modal, .auth-modal-content, .auth-modal-header, .auth-modal-close, .auth-form, .auth-form.active, .auth-benefits, .auth-benefits p, .auth-benefits i, .google-auth-btn, .google-auth-btn:hover, .google-auth-btn .fab.fa-google, .auth-disclaimer */

/* User Dashboard */
/* REMOVED: .user-dashboard, .dashboard-header, .welcome-text, .logout-btn, .logout-btn:hover */

/* Main Analysis Section */
.analysis-section {
    /* @tweakable Top padding for the analysis section, controlling space above the heading */
    padding-top: var(--section-vertical-padding); /* Updated to use consistent variable */
    padding-bottom: 5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    background-color: var(--background-light);
    /* @tweakable [Adds scroll-margin-top to ensure the section heading is fully visible when scrolled to, accounting for the fixed header height] */
    scroll-margin-top: 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    /* @tweakable Font size for the main analysis form heading */
    font-size: var(--main-page-heading-font-size); /* Updated for consistency */
    color: var(--text-color-dark);
    margin-bottom: var(--main-page-heading-margin-bottom); /* Updated for consistency */
}

.section-header p {
    color: var(--text-color-light);
    max-width: 600px;
    margin: 0 auto;
}

.subscription-status {
    max-width: 900px;
    margin: -1.5rem auto 2rem auto;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-left: 4px solid #2196f3;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.8rem;
}

.subscription-status p {
    margin: 0;
    color: var(--text-color-dark);
}

.subscription-status .credit-count {
    font-weight: 700;
    color: var(--primary-color);
}

.subscription-status .upgrade-link {
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    margin-left: 1rem;
    transition: color 0.2s;
}

.subscription-status .upgrade-link:hover {
    color: var(--primary-color);
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.07), 0 4px 16px rgba(0, 0, 0, 0.03);
    padding: 2.5rem;
    position: relative;
    border-radius: 16px;
}

.sample-data-container {
    position: absolute;
    top: 1rem;
    right: 2.5rem;
    height: 10px; /* Keep space to prevent layout shift but hide content */
    /* @tweakable [Visibility of the sample data/random title button container] */
    visibility: hidden;
}

.sample-data-link {
    display: inline-flex;
    align-items: center;
    background: #e0e0e0;
    color: var(--text-color-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    /* @tweakable Font size for sample data link */
    font-size: 0.675rem; /* Reduced by 25% from 0.9rem */
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.sample-data-link:hover {
    background: var(--border-color);
    color: var(--text-color-dark);
}

.api-settings {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* @tweakable [Styling for the API key input to obscure text like a password field] */
#apiKey {
    -webkit-text-security: disc;
    text-security: disc;
}

.api-key-group small {
    font-size: 0.6rem;
    color: var(--text-color-light);
    margin-top: -0.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* @tweakable Font size for form input labels */
    font-size: 0.75rem; /* Reduced by 25% from 1rem (common label size) */
}

.form-group label i {
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.8rem 1rem;
    background: rgba(248, 250, 252, 0.8);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    /* @tweakable Font size for form input fields */
    font-size: 0.75rem; /* Reduced by 25% from 1rem */
    resize: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 400;
    /* @tweakable [Ensures form inputs span the full width of their container] */
    width: 100%;
}

.form-group small {
    font-size: 0.7rem;
    color: var(--text-color-light);
    margin-top: -0.25rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 35, 126, 0.08), 0 8px 24px rgba(26, 35, 126, 0.12);
    transform: translateY(-1px);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    border-radius: 8px;
    /* @tweakable Font size for the submit analysis button */
    font-size: 0.825rem; /* Reduced by 25% from 1.1rem */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 71, 161, 0.4);
}

.submit-btn:disabled {
    background: #9e9e9e;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* NEW: Article Generation Warning */
.generation-warning {
    background-color: #fffde7; /* Very light yellow */
    border: 1px solid #ffcc00; /* Amber border */
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-color-dark);
}

.generation-warning strong {
    font-weight: 700;
    color: #cc9900; /* Darker yellow/brown */
}

.generation-warning .fas {
    color: #ffcc00; /* Amber icon */
    margin-right: 0.5rem;
}

.generation-warning .time-range {
    font-weight: 700;
    color: var(--primary-color);
}

/* Loading Animation */
.hidden {
    display: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    background: conic-gradient(from 0deg, var(--primary-color), var(--accent-color), var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    position: relative;
    margin-bottom: 1.5rem;
    /* @tweakable [Animation for the main 'Generating Article' spinner] */
    animation: spin 1.2s linear infinite;
}

.spinner::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    /* @tweakable Font size for loading spinner heading */
    font-size: 1.125rem; /* Reduced by 25% from 1.5rem */
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: var(--text-color-light);
}

/* Action Buttons */
/* @tweakable Base styles for consistent action buttons (Save, Copy, Back, etc.) */
.action-btn {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-2px);
}

/* Save Buttons */
.save-btn {
    background: #4CAF50; /* Green for save actions */
    color: white;
}

.save-btn:hover {
    background: #45a049; /* Darker green on hover */
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

/* Copy Button */
.copy-btn {
    background: #1e88e5; /* Blue for copy */
    color: white;
}

.copy-btn:hover {
    background: #1976d2; /* Darker blue on hover */
    box-shadow: 0 4px 10px rgba(30, 136, 229, 0.3);
}

/* Secondary/Back/Cancel Buttons */
.secondary-btn {
    background-color: #f1f5f9;
    color: var(--text-color-dark);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background-color: #e2e8f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.result-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* @tweakable Spacing between result action buttons after chat removal */
    gap: 0.875rem;
}

/* Edit and Post Section Styles */
#editAndPostSection {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.edit-post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.edit-post-header h3 {
    font-size: 1.5rem;
    color: var(--text-color-dark);
}

.edit-post-header p {
    color: var(--text-color-light);
    max-width: 600px;
    margin: 0.5rem auto 0;
}

.article-editor {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 400px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    line-height: 1.7;
    margin-bottom: 2rem;
    overflow-y: auto;
}

.article-editor:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05), 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.editing-tools, .posting-tools {
    background: #fdfdff;
    border: 1px solid #f0f2f5;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.editing-tools h4, .posting-tools h3, .add-custom-site-form h5 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color-dark);
}
.posting-tools p {
    margin-bottom: 1.5rem;
    color: var(--text-color-light);
}

.backlink-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.backlink-form input {
    flex-grow: 1;
    min-width: 250px;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.site-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-white);
    color: var(--text-color-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.site-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.site-link i {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.site-link.custom .delete-site-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 5px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
}

.site-link.custom:hover .delete-site-btn {
    opacity: 1;
}

.site-link.custom .delete-site-btn:hover {
    color: #ef4444; /* red */
}

.add-custom-site-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.add-custom-site-form h5 {
    margin-bottom: 0;
}

/* Chatbot Styles */
/* REMOVED: #chatbotContainer, .chat-header, .chat-header h3, .chat-header p, #chatDisplay,
   .chat-message, .chat-message ul, .chat-message ol, .chat-message li,
   .bot-message, .user-message, #chatInputArea, #chatInput, #sendChatBtn,
   #sendChatBtn:hover, .send-spinner, duplicate @keyframes spin */

/* Footer Styles */
.site-footer {
    background: var(--text-color-dark);
    color: var(--background-light);
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-disclaimer {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #ff9800; /* Orange */
}

.footer-disclaimer h3 {
    /* @tweakable Font size for footer disclaimer heading */
    font-size: 0.9rem; /* Reduced by 25% from 1.2rem */
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    /* @tweakable Font size for footer links and copyright text */
    font-size: 0.675rem; /* Reduced by 25% from 0.9rem */
}

.footer-links a {
    color: #80cbc4; /* Light Teal */
}

.footer-links a:hover {
    color: #4db6ac; /* Brighter Teal */
}

.footer-divider {
    color: #78909c; /* Gray */
}

.footer-copyright {
    color: #90a4ae; /* Lighter Gray */
}

.footer-crisis {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    /* @tweakable Font size for crisis resources text in footer */
    font-size: 0.675rem; /* Reduced by 25% from 0.9rem */
}

.footer-crisis strong {
    margin-right: 0.5rem;
    color: #ffb74d; /* Light Orange */
}

/* Legal Pages Styles */
.legal-page {
    background: var(--background-light);
    padding-top: var(--section-vertical-padding); /* Updated to use consistent variable */
    padding-bottom: 3rem;
    /* @tweakable [Adds scroll-margin-top to ensure the section heading is fully visible when scrolled to, accounting for the fixed header height] */
    scroll-margin-top: 100px;
}

.legal-header {
    margin-bottom: var(--main-page-heading-margin-bottom); /* Updated for consistency */
}

.legal-header h1 {
    /* @tweakable Font size for main headings on legal pages */
    font-size: var(--main-page-heading-font-size);
    margin-bottom: 0; /* Handled by legal-header margin-bottom */
    text-align: center; /* New: Center the heading */
}

.last-updated {
    color: var(--text-color-light);
    /* @tweakable Font size for last updated text on legal pages */
    font-size: 0.675rem; /* Reduced by 25% from 0.9rem */
    margin-bottom: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--secondary-color);
    font-weight: 500;
    /* @tweakable Font size for back links on legal pages */
    font-size: 0.75rem; /* Reduced by 25% from 1rem (common link size) */
}

.back-link:hover {
    color: #004d40; /* Darker Teal */
}

.legal-content {
    max-width: 800px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.07), 0 4px 16px rgba(0, 0, 0, 0.03);
    padding: 2.5rem;
    border-radius: 16px;
    margin: 0 auto;
}

.legal-content h2 {
    /* @tweakable Font size for section headings on legal pages */
    font-size: 1.35rem; /* Reduced by 25% from common h2 size (approx 1.8rem) */
}

.legal-content h3 {
    /* @tweakable Font size for sub-section headings on legal pages */
    font-size: 1.05rem; /* Reduced by 25% from common h3 size (approx 1.4rem) */
}

/* Knowledge Library Styles */
.library-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #303f9f 50%, #3f51b5 100%); /* Blue gradient */
    color: white;
    padding: var(--section-vertical-padding) 2rem 4rem 2rem; /* Updated top padding */
    text-align: center;
}

.library-hero-content h1 {
    /* @tweakable Font size for the knowledge library hero heading */
    font-size: var(--main-page-heading-font-size);
    margin-bottom: var(--main-page-heading-margin-bottom);
    color: white;
}

.library-hero-content p {
    /* @tweakable Font size for the knowledge library hero subheading */
    font-size: 0.825rem; /* Reduced by 25% from 1.1rem */
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    /* @tweakable Font size for the call to action links in library sections */
    font-size: 0.75rem; /* Reduced by 25% from 1rem */
}

.cta-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.knowledge-articles {
    padding: 4rem 1.5rem;
    background: var(--background-light);
}

.articles-intro {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.articles-intro h2 {
    /* @tweakable Font size for the knowledge browser intro heading */
    font-size: var(--main-page-heading-font-size);
    color: var(--text-color-dark);
    margin-bottom: var(--main-page-heading-margin-bottom);
    text-align: center; /* Changed from left to center */
}

.articles-intro p {
    color: var(--text-color-light);
    margin-bottom: 2rem;
    text-align: center; /* Ensure subheading is centered */
}

/* Removed old framework-filters and filter-btn styles */
.framework-filters {
    display: none;
}

.article-selection-container {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.article-dropdown {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-color-dark);
    appearance: none; /* Remove default dropdown arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234a5568'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.article-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

/* Removed old articles-grid and article-card styles */
.articles-grid {
    display: none;
}
.article-card {
    display: none;
}

.article-display-area {
    /* @tweakable [Horizontal padding for the displayed article content] */
    padding-left: var(--articles-horizontal-padding);
    padding-right: var(--articles-horizontal-padding);
    /* @tweakable [Bottom padding for the displayed article content to add visual breathing room] */
    padding-bottom: var(--library-bottom-gap); 
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.07), 0 4px 16px rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    min-height: 400px; /* @tweakable [Minimum height for the article display area before content is loaded] */
    display: flex; /* Make it a flex container to center initial message */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    text-align: left; /* Default text alignment for article content */
    line-height: 1.7;
}

.article-display-area.active {
    display: block; /* Override flex for actual article content */
}

.article-display-area .initial-message {
    font-size: 1rem;
    color: var(--text-color-light);
    text-align: center;
    max-width: 300px;
    margin: auto; /* Center the message within the flex container */
}

/* Styles for full article content, similar to .article-body or .results-container */
.article-display-area h1,
.article-display-area h2,
.article-display-area h3,
.article-display-area h4,
.article-display-area h5 {
    /* @tweakable [Font family for all headings (h1-h5) within article content areas] */
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text-color-dark);
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.article-display-area h1 { font-size: 2em; }
.article-display-area h2 { font-size: 1.75em; }
.article-display-area h3 { font-size: 1.5em; }
.article-display-area h4 { font-size: 1.25em; }
.article-display-area h5 { font-size: 1.1em; }

.article-display-area p {
    margin-bottom: 1.25em;
}

.article-display-area ul,
.article-display-area ol {
    margin-bottom: 1.25em;
    padding-left: 2em;
}

.article-display-area li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

.article-display-area strong {
    font-weight: 600;
    color: var(--text-color-dark);
}

.article-display-area em {
    font-style: italic;
}

.article-display-area blockquote {
    margin: 1.5em 0;
    padding-left: 1.5em;
    border-left: 4px solid var(--border-color);
    color: var(--text-color-light);
    font-style: italic;
}

.article-display-area pre {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.25em;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}

.article-display-area code {
    background-color: #e2e8f0;
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}

.article-display-area pre code {
    background-color: transparent;
    padding: 0;
}

.article-display-area hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 2em 0;
}

/* Specific styles for elements within the displayed articles */
.article-display-area .hook-section {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.05) 0%, rgba(0, 105, 92, 0.05) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.article-display-area .hook-section h3 {
    font-size: 1.05rem; /* Reduced by 25% from 1.4rem */
    color: var(--text-color-dark);
    margin-bottom: 1rem;
}

.article-display-area .hook-section p {
    color: #374151;
    margin-bottom: 1rem;
}

.article-display-area .hook-section p:last-child {
    margin-bottom: 0;
}

.article-display-area .ai-connection-box,
.article-display-area .cta-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, #303f9f 50%, #3f51b5 100%); /* Blue gradient */
    color: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    margin: 3rem 0;
}

.article-display-area .ai-connection-box h4,
.article-display-area .cta-box h4 {
    font-size: 0.975rem; /* Reduced by 25% from 1.3rem */
    color: white;
    margin-bottom: 1rem;
}

.article-display-area .ai-connection-box p,
.article-display-area .cta-box p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.article-display-area .ai-connection-box ul {
    margin-bottom: 1rem;
    padding-left: 20px;
}

.article-display-area .ai-connection-box li {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.article-display-area .article-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.75rem;
}

.article-display-area .article-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* @tweakable Professional knowledge library color scheme - primary color for headers and buttons */
.love-languages-theme {
    background: #2563eb; /* Professional blue */
}

/* @tweakable MBTI theme color - sophisticated navy */
.mbti-theme {
    background: #1e40af; /* Deep navy blue */
}

/* @tweakable Big Five theme color - trustworthy teal */
.big-five-theme {
    background: #047857; /* Professional teal */
}

/* @tweakable Enneagram theme color - warm professional brown */
.enneagram-theme {
    background: #92400e; /* Professional brown */
}

/* @tweakable Socionics theme color - sophisticated purple */
.socionics-theme {
    background: #7c3aed; /* Professional purple */
}

/* @tweakable [Update existing theme colors to be more professional] */
.gottman-theme {
    background: #dc2626; /* Professional red */
}

.attachment-theme {
    background: #0891b2; /* Professional cyan */
}

.eft-theme {
    background: #059669; /* Professional green */
}

.nvc-theme {
    background: #d97706; /* Professional orange */
}

/* @tweakable [Additional theme colors for new article categories] */
/* Removed old specific category themes and replaced with new ones */
.templates-theme,
.headline-formulas-theme,
.sample-articles-theme,
.workflow-guides-theme,
.productivity-theme,
.writing-tips-theme {
    /* Keeping these styles to prevent errors if old articles exist in local storage, but making them visually distinct/fallback. */
    background: #607d8b; /* Slate Gray Fallback */
}

.seo-guides-theme {
    background: #047857; /* Professional teal for SEO */
}

.prompt-mastery-theme {
    background: #9c27b0; /* Deep Purple for Prompt Mastery */
}

.article-structures-theme {
    background: #2563eb; /* Professional Blue for Article Structures (like Templates) */
}

.post-gen-editing-theme {
    background: #3f51b5; /* Indigo for Post-Generation Editing */
}

.content-strategy-theme {
    background: #00bcd4; /* Cyan for Content Strategy */
}

.distribution-tactics-theme {
    background: #ff9800; /* Amber for Distribution Tactics */
}

/* NEW: Theme for Sample Articles/MISC Topics */
.sample-articles-misc-topics-theme {
    /* @tweakable [Background color for the 'Sample Articles/MISC Topics' category header — must contrast with white header text] */
    background: #2d3748; /* Dark slate to contrast with white text (was #546e7a) */
}

/* @tweakable [Styling for the Knowledge Library main heading to match home page: centered and same size] */
.library-main-heading {
    padding-top: 2rem; /* Adjusted for better spacing above */
    padding-bottom: 0rem;
    text-align: center;
    font-size: var(--main-page-heading-font-size); /* match home page heading size */
    margin-bottom: var(--main-page-heading-margin-bottom);
    color: var(--text-color-dark);
}

/* @tweakable [Improved spacing and typography for article examples] */
.article-full .article-content h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-full .article-content ol,
.article-full .article-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-full .article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* @tweakable [Article content styling for better readability] */
.article-full .article-content p strong {
    color: var(--text-color-dark);
    font-weight: 600;
}

/* @tweakable [Article content styling for better readability] */
.article-full .article-content .hook-section {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.05) 0%, rgba(0, 105, 92, 0.05) 100%);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 2rem;
}

/* @tweakable Responsive design for mobile devices */
@media (max-width: 768px) {
    .hero-stats {
        gap: 2rem;
    }
    
    .problems-grid {
        grid-template-columns: 1fr;
    }
    
    .solution-features {
        grid-template-columns: 1fr;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    .sample-data-container {
        right: 1.5rem;
    }
    .api-settings {
        grid-template-columns: 1fr;
    }
    
    .article-selection-container {
        padding: 0 0.5rem; /* Adjust padding for mobile dropdown */
    }

    .article-dropdown {
        font-size: 0.75rem; /* Smaller font on mobile */
    }

    .article-display-area {
        padding-left: 1rem; /* Adjust horizontal padding for mobile */
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    /* Apply consistent mobile font size for main page headings */
    .hero-title,
    .library-hero-content h1,
    .legal-header h1,
    .library-main-heading { /* Added library-main-heading here */
        font-size: var(--main-page-heading-mobile-font-size);
    }
    
    .solution-content h2 {
        /* @tweakable Font size for solution section heading on small mobile screens */
        font-size: 1.5rem; /* Reduced by 25% from 2rem */
    }
}

/* @tweakable [Toggle visibility of authentication-related UI components] */
.auth-modal, .user-dashboard {
    display: none !important;
}

/* @tweakable [Styling for the new settings modal] */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 126, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001; /* Higher than header */
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.settings-modal.active {
    opacity: 1;
    pointer-events: all;
}

.settings-modal-content {
    background: var(--background-white);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.2);
    /* @tweakable [Prevent content from overflowing the modal's rounded corners, while ensuring inner content is fully visible] */
    overflow: hidden; /* Keep this to ensure rounded corners */
}

.settings-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-modal-header h3 {
    margin: 0;
    /* @tweakable [Font size for the settings modal title] */
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color-light);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    line-height: 1;
}

.settings-modal-close:hover {
    background: var(--background-light);
}

.settings-modal-body {
    /* @tweakable [Padding for the body of the settings modal to ensure content isn't clipped] */
    padding: 1.5rem;
}

.settings-modal-footer {
    /* @tweakable [Padding for the footer of the settings modal to ensure buttons are spaced correctly] */
    padding: 0.5rem 1.5rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    /* @tweakable [Border at the top of the settings modal footer for visual separation] */
    border-top: 1px solid var(--border-color);
    /* @tweakable [Top margin for the settings modal footer to create space from the body content] */
    margin-top: 1rem;
}

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

/* Pricing Page Styles */
.pricing-section {
    padding: 5rem 1.5rem;
    background: var(--background-light);
}

.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-header h1 {
    font-size: 2.5rem;
    color: var(--text-color-dark);
}

.pricing-header p {
    font-size: 1.1rem;
    color: var(--text-color-light);
    max-width: 500px;
    margin: 0.5rem auto 0;
}

.billing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    font-weight: 500;
}

.yearly-discount {
    background: #e0f2f1;
    color: #00796b;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--secondary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--background-white);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.pricing-card.popular {
    border: 2px solid var(--secondary-color);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    color: var(--text-color-dark);
}

.card-description {
    color: var(--text-color-light);
    margin-bottom: 2rem;
    min-height: 50px;
}

.price-container {
    margin-bottom: 2rem;
}

.price {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-color-dark);
}

.price-period {
    color: var(--text-color-light);
    font-weight: 500;
}

.features-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-color-dark);
}

.features-list i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.plan-btn {
    width: 100%;
}

.plan-btn.selected {
    background: #bdbdbd;
    cursor: default;
}
.plan-btn.selected:hover {
    background: #bdbdbd;
    transform: none;
    box-shadow: none;
}

.input-with-button {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Spacing between input and button */
}

.input-with-button textarea {
    flex-grow: 1; /* Allow textarea to take available space */
}

.generate-input-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0; /* Prevent button from shrinking */
    /* @tweakable [Size of the "Generate with AI" buttons for purpose and instructions] */
    font-size: 0.95rem; /* Slightly larger icon */
    line-height: 1; /* Align icon vertically */
}

.generate-input-btn:hover {
    background: #00796b; /* Darker teal */
}

/* New Admin Area Styles for Knowledge Library */

.admin-area {
    /* @tweakable [Max width for the Admin Status/Login container] */
    max-width: 900px;
    margin: 0 auto; /* Remove default margin: 1.5rem auto 3rem; */
    padding: 1rem 0;
    text-align: center;
}

/* Adjust spacing for the admin status text container when logged in */
/* The script now controls margin-top/bottom on .admin-status inline */
.admin-status {
    max-width: 900px; /* Ensure container width consistency */
    margin: 0 auto; /* Removed explicit 1.5rem bottom margin, handled by script now */
}

/* Ensure the login form wrapper has correct padding/border when logged out */
/* Added definition for the login wrapper used in library-script.js */
.admin-login-wrapper {
    max-width: 400px; 
    margin: 1rem auto; 
    padding: 1.5rem; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    background: var(--background-white);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); /* Added subtle shadow */
}

.admin-status-text {
    text-align: center; 
    margin-bottom: 0.75rem !important; 
    font-size: 0.9rem; 
    color: var(--text-color-dark);
    display: block; /* Ensure it takes full width for centering */
}

.admin-controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem; /* Spacing between the toggle group and the logout button */
    max-width: 600px;
    margin: 0 auto;
}

.admin-form-toggles {
    display: inline-flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.admin-toggle-btn {
    /* Base styling for toggle buttons */
    /* Reuse action-btn class but override some padding/margins */
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 0; /* Remove individual button rounding */
    border: none;
    background-color: var(--background-light); /* Light background for non-active */
    color: var(--text-color-light);
    transition: all 0.2s ease;
    box-shadow: none;
    transform: none;
}

/* Separator styling */
.admin-toggle-btn:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.admin-toggle-btn:hover {
    background-color: var(--border-color);
    color: var(--text-color-dark);
    transform: none;
    box-shadow: none;
}

.admin-toggle-btn.active-toggle-btn {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(26, 35, 126, 0.2);
}

.admin-toggle-btn.admin-generator-toggle.active-toggle-btn i,
.admin-toggle-btn.admin-paste-toggle.active-toggle-btn i {
    color: white;
}

/* Default icon colors when non-active */
.admin-generator-toggle i {
    color: var(--secondary-color);
}
.admin-paste-toggle i {
    /* @tweakable [Color for the paste icon when the paste button is not active] */
    color: #ff9800; /* Amber/Orange for paste */
}

/* Adjust button rounding for the group */
.admin-toggle-btn:first-child {
    border-top-left-radius: 7px;
    border-bottom-left-radius: 7px;
}
.admin-toggle-btn:last-child {
    border-top-right-radius: 7px;
    border-bottom-right-radius: 7px;
}

/* Add hover style for clickable article ideas */
#ideasOutput ol li:hover {
    background-color: var(--border-color); /* Subtle hover effect */
    color: var(--primary-color);
    transition: background-color 0.1s ease, color 0.1s ease;
}

/* Single Article View Styles */
#singleArticleView {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

#singleArticleView .article-display-area {
    min-height: 500px;
    padding-top: 0; /* Let the article header handle top padding */
    padding-left: 0; /* Let the article header handle side padding */
    padding-right: 0; /* Let the article header handle side padding */
    /* Maintain the default article box styling */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.07), 0 4px 16px rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}
#singleArticleView .article-full .article-content {
    /* Re-apply article content padding inside single view */
    padding: 0 1.5rem 2rem 1.5rem !important;
}

/* Remove default article-display-area styling from the outer review container */
#draftReviewArea.article-display-area {
    /* Revert to default article-display-area padding/shadow */
    padding-left: var(--articles-horizontal-padding);
    padding-right: var(--articles-horizontal-padding);
    padding-bottom: var(--library-bottom-gap);
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.07), 0 4px 16px rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    padding-top: 0; /* Adjusted for cleaner look */
}

/* Override the previous block to ensure specific styling for the review edit box */
#draftReviewArea {
    /* Use custom styling for dashed border and light background */
    border: 1px dashed var(--secondary-color);
    background: #f0fdfa; /* Very light teal background */
    padding: 0; 
    box-shadow: none; 
    max-width: 900px;
    margin: 0 auto;
    border-radius: 16px;
}

/* NEW: Ensure Sample Articles / MISC Topics header gets a visible background even if slugification differs */
/* @tweakable [Background color for the 'Sample Articles/MISC Topics' category header — covers both expected and runtime-generated class names] */
.sample-articles-misc-topics-theme,
.sample-articlesmisc-topics-theme {
    background: #2d3748; /* Dark slate to contrast with white text */
}

/* @tweakable [Fix: Ensure 'Sample Articles/MISC Topics' category header always uses a dark slate background — covers both slug variations] */
.article-header.sample-articles-misc-topics-theme,
.article-header.sample-articlesmisc-topics-theme {
    /* @tweakable [Background color for Sample Articles / MISC Topics header] */
    background: #2d3748 !important;
    color: #ffffff !important;
}

/* Generation progress bar styles (small, unobtrusive) */
.generation-progress {
    max-width: 700px;
    margin: 0.75rem auto 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-color-light);
}
.generation-progress .progress-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, rgba(0,0,0,0.04), rgba(0,0,0,0.02));
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.03);
    margin-bottom: 0.4rem;
}
.generation-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    width: 0%;
    transition: width 0.3s ease;
}
.generation-progress .progress-text {
    font-size: 0.7rem;
    color: var(--text-color-light);
}