/*
 * REFACTORED STYLE SYSTEM
 * Using composition-based classes with CSS custom properties
 * 
 * Structure:
 * 1. CSS Custom Properties (Variables)
 * 2. Reset & Base Styles
 * 3. Typography Utilities
 * 4. Layout Utilities
 * 5. Base Components
 * 6. Modifier Classes
 * 7. Domain-Specific Classes (with composition comments)
 */

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
    /* Colors - Primary */
    --color-primary: #0066cc;
    --color-primary-hover: #0052a3;
    
    /* Colors - Neutral */
    --color-text-primary: #111;
    --color-text-secondary: #555;
    --color-text-muted: #888;
    --color-text-dark: #2c3e50;
    --color-text-darker: #2d2a26;
    
    /* Colors - Backgrounds */
    --color-bg-white: #fff;
    --color-bg-light: #fafafa;
    --color-bg-subtle: #f8f9fa;
    --color-bg-warm: #faf9f7;
    --color-bg-gradient: linear-gradient(to right, #e8f4f4, #f8f2e8);
    --color-bg-gradient-card: linear-gradient(145deg, #fdfcfa 0%, #f5f4f0 100%);
    --color-bg-gradient-dark: linear-gradient(135deg, #2c3e50, #34495e);
    --color-bg-gated: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    
    /* Colors - Borders */
    --color-border: #e0e0e0;
    --color-border-light: #e1e1e1;
    --color-border-lighter: #eee;
    --color-border-dashed: #dee2e6;
    
    /* Colors - Accent */
    --color-accent-info: #0066cc;
    --color-accent-warning: #ffc107;
    --color-accent-warning-dark: #e68900;
    --color-accent-warning-text: #8a6914;
    --color-accent-warning-bg: #fff8e1;
    --color-accent-success: #22c55e;
    --color-accent-muted: #d0d0d0;
    --color-accent-orange: #f59e0b;
    
    /* Colors - Tags */
    --color-tag-default: #ecf0f1;
    --color-tag-making-of-bg: #e8f4f8;
    --color-tag-making-of-text: #2980b9;
    --color-tag-philosophy-bg: #fdf2e9;
    --color-tag-philosophy-text: #e67e22;
    
    /* Colors - Brand */
    --color-discord: #5865F2;
    --color-discord-idle: #4A5568;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 2px 12px rgba(0, 0, 0, 0.06);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
    --font-mono: 'SF Mono', Monaco, 'Consolas', monospace;
    
    /* Container */
    --container-max: 1200px;
    --container-narrow: 1200px;
}


/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--color-text-secondary);
    background: var(--color-bg-gradient);
}

ul, ol {
    padding-left: 40px;
}

blockquote {
    background: #f5f0eb;
    border-left: 8px solid #c9a882;
    padding: 20px 25px;
    margin: 10px 0;
    color: #4a4035;
    border-radius: var(--radius-sm);
}

table {
    border-collapse: collapse;
    width: auto;
    margin-bottom: 10px;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

thead {
    background-color: #f5f5f5;
    font-weight: 600;
}

tr:hover {
    background-color: var(--color-bg-light);
}


/* ==========================================================================
   3. TYPOGRAPHY UTILITIES
   ========================================================================== */

/* Heading spacing */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.25em;
    margin-top: 1em;
}

h1:first-child, h2:first-child, h3:first-child,
h4:first-child, h5:first-child, h6:first-child {
    margin-top: 0;
}

h1+h1, h1+h2, h1+h3, h1+h4, h1+h5, h1+h6,
h2+h1, h2+h2, h2+h3, h2+h4, h2+h5, h2+h6,
h3+h1, h3+h2, h3+h3, h3+h4, h3+h5, h3+h6,
h4+h1, h4+h2, h4+h3, h4+h4, h4+h5, h4+h6,
h5+h1, h5+h2, h5+h3, h5+h4, h5+h5, h5+h6,
h6+h1, h6+h2, h6+h3, h6+h4, h6+h5, h6+h6 {
    margin-top: 0.6em;
}

p+p {
    margin-top: 0.7em;
}

/* Typography utility classes */
.text-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.text-label-sm {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

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

.text-summary {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.text-small {
    font-size: 0.85rem;
}

.text-primary {
    color: var(--color-primary);
}

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


/* ==========================================================================
   4. LAYOUT UTILITIES
   ========================================================================== */

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

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

/* Grid utilities */
.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.grid-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--grid-min-width, 320px), 1fr));
    gap: var(--grid-gap, 1.25rem);
}

.grid-auto-fit-sm {
    --grid-min-width: 260px;
    --grid-gap: 1rem;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-grow {
    flex-grow: 1;
}

.mt-auto {
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2-1,
    .grid-equal {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 700px) {
    .grid-equal {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   5. BASE COMPONENTS
   ========================================================================== */

/* ----- Card Base ----- */
.card-base {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.card-base-sm {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

/* ----- Box Base (for sidebar boxes, info boxes) ----- */
.box-base {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 25px;
}

/* ----- Link Styles ----- */
.link-primary {
    color: var(--color-primary);
    text-decoration: none;
}

.link-primary:hover {
    text-decoration: underline;
}

.link-dark {
    color: var(--color-text-dark);
    text-decoration: none;
}

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

/* ----- CTA Link ----- */
.cta {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.cta:hover {
    text-decoration: underline;
}

/* ----- Button Base ----- */
.btn {
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.6rem 1.25rem;
    transition: background-color 0.2s;
}

.btn-primary {
    background: var(--color-text-darker);
    color: var(--color-bg-white);
}

.btn-primary:hover {
    background: #3d3a36;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-blue {
    background: #3498db;
    color: white;
}

.btn-blue:hover {
    background: #2980b9;
}


/* ==========================================================================
   6. MODIFIER CLASSES
   ========================================================================== */

/* ----- Accent Borders ----- */
.accent-top-primary {
    border-top: 3px solid var(--color-accent-info);
}

.accent-left-info {
    border-left: 4px solid var(--color-accent-info);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.accent-left-warning {
    border-left: 4px solid var(--color-accent-warning);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.accent-left-muted {
    border-left: 3px solid var(--color-accent-muted);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ----- State Modifiers ----- */
.is-coming-soon {
    background: var(--color-bg-light);
    border-style: dashed;
}

.is-coming-soon h3 {
    color: #666;
}

.is-coming-soon .summary,
.is-coming-soon .text-summary {
    color: var(--color-text-muted);
}

.is-gated {
    background: var(--color-bg-gated);
    position: relative;
}

.is-gated::after {
    content: "Subscriber";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background: #e8e8e8;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.is-external {
    border-left: 3px solid var(--color-accent-muted);
}

.is-disabled {
    background: #ddd;
}

.is-disabled .tag {
    background: #ccc;
    cursor: default;
    pointer-events: none;
}

.is-disabled a {
    cursor: default;
    pointer-events: none;
}

/* ----- Hover Effects ----- */
.hover-lift {
    transition: box-shadow 0.2s ease;
}

.hover-lift:hover {
    box-shadow: var(--shadow-lg);
}

.hover-subtle {
    transition: box-shadow 0.2s ease;
}

.hover-subtle:hover {
    box-shadow: var(--shadow-hover);
}

/* ----- Warning/Info Background ----- */
.bg-warning {
    background: var(--color-accent-warning-bg);
}

.bg-warning h3 {
    color: var(--color-accent-warning-dark);
}

.bg-warning p {
    color: var(--color-accent-warning-text);
    font-size: 14px;
}


/* ==========================================================================
   7. DOMAIN-SPECIFIC CLASSES
   Each class shows what it's composed from
   ========================================================================== */

/* ----- Header / Navigation ----- */

/* header element styling */
header {
    background: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border-light);
    padding: 20px 0;
}

/*
 * .header
 * Composition: card-base (sticky variant)
 */
.header {
    background: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-title {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-darker);
}

.header-title .target {
    font-size: 0.9rem;
    color: #666;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
}

.logo a {
    color: var(--color-text-dark);
    text-decoration: none;
}

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

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

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

.nav .login {
    color: var(--color-primary);
    cursor: pointer;
}

nav a {
    color: #666;
    font-weight: 500;
    margin-left: 30px;
    text-decoration: none;
}

nav a:hover {
    color: var(--color-text-dark);
}

this-page {
    color: #666;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px; /* adjusts gap between text and line */
}

/* This is where we need it! */
.nav a.this-page {
    color: #666;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Section indicator in header (breadcrumb style) */
.logo-divider {
    color: #ccc;
    font-weight: 400;
    margin: 0 0.25rem;
}

.logo-section {
    color: #666;
    font-weight: 500;
}


.back-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: #333;
}

.help-link {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
}

.help-link:hover {
    color: var(--color-text-secondary);
    text-decoration: underline;
}

/* Hamburger Menu */
.hamburger {
    cursor: pointer;
    display: inline-block;
    padding: 5px;
}

.hamburger div {
    background: #333;
    height: 3px;
    margin: 5px 0;
    transition: 0.3s;
    width: 25px;
}

.nav-menu {
    background: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border-light);
    display: none;
    left: 0;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 100;
}

.nav-menu.active {
    display: block;
}

.nav-menu a {
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    display: block;
    padding: 15px 20px;
    text-decoration: none;
}

.nav-menu a:hover {
    background: var(--color-bg-subtle);
}

.nav-menu a:last-child {
    border-bottom: none;
}


/* ----- Footer ----- */

/* footer element */
footer {
    border-top: 1px solid var(--color-border-light);
    color: #666;
    font-size: 14px;
    margin-top: 60px;
    padding: 30px 0;
    text-align: center;
}

/*
 * .footer
 * Composition: card-base (footer variant)
 */
.footer {
    text-align: left;
    background: var(--color-bg-white);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-3xl);
    padding: var(--space-xl);
}

.footer-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.footer h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

.footer p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

.footer a {
    color: var(--color-primary);
}

.footer .copyright {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-top: var(--space-lg);
}

.footer-iframe-container {
    margin: 0;
    padding: 0;
    width: 100%;
}

.footer-iframe {
    border: none;
    display: block;
    height: auto;
    width: 100%;
}


/* ----- Blog ----- */

.blog-section {
    margin-top: 0;
}

.blog-section h2 {
    color: var(--color-text-dark);
    font-size: 28px;
    margin-bottom: 30px;
}

/*
 * .blog-post
 * Composition: card-base + flex layout
 */
.blog-post {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 25px;
}

@media (max-width: 768px) {
    .blog-post {
        flex-direction: column;
    }
}

.blog-image {
    align-items: center;
    background: var(--color-bg-subtle);
    border: 2px dashed var(--color-border-dashed);
    border-radius: var(--radius-md);
    color: #6c757d;
    display: flex;
    flex-shrink: 0;
    font-size: 14px;
    justify-content: center;
    text-align: center;
}

@media (max-width: 768px) {
    .blog-image {
        aspect-ratio: 3 / 2;
        height: auto;
        width: 100%;
    }
}

@media (min-width: 769px) {
    .blog-image {
        aspect-ratio: 3 / 2;
        height: auto;
        width: 40%;
    }
}

.blog-image img {
    border-radius: 4px;
    display: block;
    width: 100%;
}

.blog-content {
    flex: 1;
}

.blog-post h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.blog-post h3 a {
    color: var(--color-text-dark);
    text-decoration: none;
}

.blog-post h3 a:hover {
    color: var(--color-primary);
}

.blog-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.blog-excerpt {
    color: var(--color-text-secondary);
}


/* ----- Tags ----- */

.tag {
    background: var(--color-tag-default);
    border-radius: var(--radius-sm);
    font-size: 12px;
    margin-left: 10px;
    padding: 3px 8px;
}

.making-of {
    background: var(--color-tag-making-of-bg);
    color: var(--color-tag-making-of-text);
}

.philosophy {
    background: var(--color-tag-philosophy-bg);
    color: var(--color-tag-philosophy-text);
}


/* ----- Sidebar Boxes ----- */

/*
 * .tools-box
 * Composition: box-base
 */
.tools-box {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 25px;
}

.tools-box h3 {
    color: var(--color-text-dark);
    font-size: 18px;
    margin-bottom: 20px;
}

.tools-box p {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

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

.tool-list li {
    margin-bottom: 12px;
}

.tool-list a {
    color: #3498db;
    font-weight: 500;
    text-decoration: none;
}

.tool-list a:hover {
    color: #2980b9;
}

/*
 * .about-box
 * Composition: box-base
 */
.about-box {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 25px;
}

.about-box h3 {
    color: var(--color-text-dark);
    font-size: 18px;
    margin-bottom: 15px;
}

.about-box p {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.5;
}


/* ----- Generic Card ----- */

/*
 * .card
 * Composition: card-base + flex-column
 */
.card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.card h3 {
    color: var(--color-text-dark);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.card p {
    color: #666;
    font-size: 14px;
}

.card p:last-child {
    margin-top: auto;
}

.card-deck {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-top: 40px;
}


/* ----- States ----- */

.coming-soon {
    color: #7f8c8d;
    font-style: italic;
}

/*
 * .notyet
 * Composition: is-disabled
 */
.notyet {
    background: #ddd;
}

.notyet .tag {
    background: #ccc;
    cursor: default;
    pointer-events: none;
}

.notyet a {
    cursor: default;
    pointer-events: none;
}


/* ----- Discord ----- */

/*
 * .discord-link
 * Composition: btn + brand colors
 */
.discord-link {
    align-items: center;
    background: var(--color-discord-idle);
    border-radius: 4px;
    color: white;
    display: inline-flex;
    font-size: 14px;
    gap: 8px;
    margin-top: 15px;
    padding: 8px 16px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.discord-link:hover {
    background: var(--color-discord);
}

.discord-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/*
 * .discord-info
 * Composition: card-base (large padding)
 */
.discord-info {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    margin-bottom: 30px;
    padding: 40px;
}

.discord-info h2 {
    color: var(--color-text-dark);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.discord-info p {
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.discord-preview {
    background: var(--color-bg-subtle);
    border: 2px dashed var(--color-border-dashed);
    border-radius: var(--radius-lg);
    color: #6c757d;
    margin: 30px 0;
    padding: 40px;
    text-align: center;
}

.discord-button {
    align-items: center;
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    color: var(--color-text-dark);
    display: inline-flex;
    font-size: 1.1rem;
    font-weight: 600;
    gap: 10px;
    padding: 15px 30px;
    text-decoration: none;
    transition: all 0.3s;
}

.discord-button:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}


/* ----- Info Boxes with Left Border ----- */

/*
 * .community-access
 * Composition: box-base + accent-left-warning + bg-warning
 */
.community-access {
    background: var(--color-accent-warning-bg);
    border-left: 4px solid var(--color-accent-warning);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin: 30px 0;
    padding: 20px;
}

.community-access h3 {
    color: var(--color-accent-warning-dark);
    margin-bottom: 10px;
}

.community-access p {
    color: var(--color-accent-warning-text);
    font-size: 14px;
}

/*
 * .future-features
 * Composition: box-base + accent-left-warning + bg-warning
 */
.future-features {
    background: var(--color-accent-warning-bg);
    border-left: 4px solid var(--color-accent-warning);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin-top: 40px;
    padding: 20px;
}

.future-features h3 {
    color: var(--color-accent-warning-dark);
    margin-bottom: 10px;
}

.future-features p {
    color: var(--color-accent-warning-text);
    font-size: 14px;
}

/*
 * .patreon-info
 * Composition: box-base + accent-left-warning + bg-warning
 */
.patreon-info {
    background: var(--color-accent-warning-bg);
    border-left: 4px solid var(--color-accent-warning);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin: 30px 0;
    padding: 20px;
}

.patreon-info h3 {
    color: var(--color-accent-warning-dark);
    margin-bottom: 10px;
}

.patreon-info p {
    color: var(--color-accent-warning-text);
    font-size: 14px;
}

/*
 * .honour-note
 * Composition: card-base-sm + accent-left-muted
 */
.honour-note {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-left: 3px solid #888;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}

.honour-note h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.35rem;
}

.honour-note p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}


/* ----- Tool Interface ----- */

.tool-header {
    margin-bottom: 40px;
    text-align: center;
}

.tool-header h1 {
    color: var(--color-text-dark);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.tool-header p {
    color: #666;
    font-size: 1.1rem;
}

/*
 * .tool-interface
 * Composition: card-base + shadow
 */
.tool-interface {
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
    padding: 30px;
}

.input-section {
    margin-bottom: 30px;
}

.input-section label {
    color: var(--color-text-dark);
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.path-input {
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    font-size: 16px;
    padding: 12px 16px;
    transition: border-color 0.3s;
    width: 100%;
}

.path-input:focus {
    border-color: #3498db;
    outline: none;
}

.help-text {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.generate-btn {
    background: #3498db;
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 12px 24px;
    transition: background 0.3s;
}

.generate-btn:hover {
    background: #2980b9;
}

.output-section {
    margin-top: 30px;
}

.output-section h3 {
    color: var(--color-text-dark);
    margin-bottom: 15px;
}

.preview {
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    margin-bottom: 15px;
    padding: 20px;
}


/* ----- Breadcrumbs ----- */

.breadcrumbs {
    align-items: center;
    display: flex;
    font-family: var(--font-sans);
}

.breadcrumb-item {
    border-radius: 4px;
    color: #3498db;
    padding: 8px 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.breadcrumb-item:hover {
    background: var(--color-tag-default);
    color: #2980b9;
}

.breadcrumb-item:last-child {
    color: var(--color-text-dark);
    font-weight: 500;
}

.breadcrumb-separator {
    color: #bdc3c7;
    font-weight: bold;
    margin: 0 8px;
}


/* ----- Code Output ----- */

.code-output {
    background: var(--color-text-dark);
    border-radius: var(--radius-lg);
    color: var(--color-tag-default);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 20px;
    position: relative;
    white-space: pre-wrap;
}

.copy-btn {
    background: #34495e;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    padding: 6px 12px;
    position: absolute;
    right: 10px;
    top: 10px;
}

.copy-btn:hover {
    background: #4a6741;
}


/* ----- Content Section ----- */

/*
 * .content-section
 * Composition: card-base (large padding, xl radius)
 */
.content-section {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    margin-bottom: 30px;
    padding: 40px;
}

@media (max-width: 768px) {
    .content-section {
        padding: 25px;
    }
}

.content-section h2 {
    color: var(--color-text-dark);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.content-section p {
    color: var(--color-text-secondary);
    margin-bottom: 0;
}


/* ----- Join Section ----- */

/*
 * .join-section
 * Composition: gradient background (dark)
 */
.join-section {
    background: var(--color-bg-gradient-dark);
    color: white;
    margin: 40px 0;
    text-align: center;
}

.join-section h2 {
    color: white;
    margin-bottom: 15px;
}

.join-section p {
    color: var(--color-tag-default);
    margin-bottom: 25px;
}


/* ----- CTA Buttons ----- */

.cta_buttonsx a {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cta_buttonsx a:hover {
    background-color: #0056b3;
}

.cta_buttons a {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 20px;
}

.cta_buttons a:hover {
    text-decoration: underline;
}


/* ----- Hero ----- */

.hero {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-xl) var(--space-xl);
}

.hero-image-container {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-xl) var(--space-md);
}

.hero-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(to right, #e8f5e9, #e3f2fd, #fff3e0);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.6;
    border: 1px solid var(--color-border);
}

@media (max-width: 700px) {
    .hero-image {
        height: 200px;
    }
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

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

.hero-text h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
}

.hero-text .subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.tagline {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-xl) var(--space-xl);
    text-align: center;
}

.tagline h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-text-primary);
}


/* ----- Paths Section ----- */

.paths {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: var(--space-md) var(--space-xl) var(--space-3xl);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 700px) {
    .paths {
        grid-template-columns: 1fr;
    }
}

/*
 * .path-card
 * Composition: card-base + flex-column + hover-lift
 */
.path-card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.path-card:hover {
    box-shadow: var(--shadow-lg);
}

.path-card .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.path-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

.path-card .description {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.path-card .features {
    list-style: none;
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.path-card .features li {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    padding: var(--space-xs) 0;
    padding-left: var(--space-lg);
    position: relative;
}

.path-card .features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-text-muted);
}

.path-card .cta {
    margin-top: auto;
}

/*
 * .path-card.primary
 * Composition: path-card + accent-top-primary
 */
.path-card.primary {
    border-top: 3px solid var(--color-accent-info);
}

.path-card .price-note {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: var(--space-sm);
    margin-bottom: var(--space-md);
}


/* ----- Company Section ----- */

/*
 * .company-section
 * Composition: card-base + container-narrow
 */
.company-section {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-xl);
    max-width: var(--container-narrow);
    margin: var(--space-xl) auto;
}

/*
 * .company-inner
 * Composition: accent-left-muted
 */
.company-inner {
    border-left: 3px solid var(--color-accent-muted);
    padding-left: var(--space-lg);
}

.company-inner h3,
.company-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

.company-inner p,
.company-section p {
    color: var(--color-text-secondary);
    max-width: 700px;
    font-size: 0.95rem;
}

.company-inner a,
.company-section a {
    color: var(--color-primary);
}


/* ----- Product Grid ----- */

.product-grid {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-xl) var(--space-xl);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 700px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/*
 * .product-card
 * Composition: card-base + flex-column + hover-lift
 */
.product-card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
}

.product-body {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card .domain {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.product-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

.product-card .problem {
    font-size: 1rem;
    color: #444;
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.product-card .stats {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat .number {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.stat .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.product-footer {
    margin-top: auto;
    padding-top: var(--space-md);
}


/* ----- AIR Section ----- */

/*
 * .air-section
 * Composition: card-base + accent-left-info
 */
.air-section {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent-info);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.air-section h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

.air-section p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

.air-section .cta {
    font-size: 0.9rem;
}

.main {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 2rem;    
}

.air-main {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-xl);
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: var(--space-xl);
}

@media (max-width: 900px) {
    .air-main {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }
}


/* ----- Track Sections ----- */

.track {
    margin-bottom: var(--space-2xl);
}

.track-header {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.track-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.track-header .track-status {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.track-header .track-status.coming {
    color: #b26a00;
}

.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

/*
 * .track-item
 * Composition: card-base-sm + hover-subtle
 */
.track-item {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    transition: box-shadow 0.2s ease;
}

.track-item:hover {
    box-shadow: var(--shadow-hover);
}

.track-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
}

.track-item h3 a {
    color: inherit;
    text-decoration: none;
}

.track-item h3 a:hover {
    color: var(--color-primary);
}

.track-item .summary {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

.track-item .meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.track-item .meta a {
    color: var(--color-primary);
    text-decoration: none;
}

.track-item .meta a:hover {
    text-decoration: underline;
}

/*
 * .track-item.external
 * Composition: track-item + is-external
 */
.track-item.external {
    border-left: 3px solid var(--color-accent-muted);
}

.track-item .attribution {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: var(--space-sm);
    font-style: italic;
}

.track-item .catalase-adds {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border-lighter);
}

.track-item .catalase-adds .label {
    font-weight: 500;
    color: #333;
}

.track-item .catalase-adds a {
    color: var(--color-primary);
    text-decoration: none;
}

.track-item .catalase-adds a:hover {
    text-decoration: underline;
}

/*
 * .track-item.coming-soon
 * Composition: track-item + is-coming-soon
 */
.track-item.coming-soon {
    background: var(--color-bg-light);
    border-style: dashed;
}

.track-item.coming-soon h3 {
    color: #666;
}

.track-item.coming-soon .summary {
    color: var(--color-text-muted);
}

/*
 * .track-item.gated
 * Composition: track-item + is-gated
 */
.track-item.gated {
    background: var(--color-bg-gated);
    position: relative;
}

.track-item.gated::after {
    content: "Subscriber";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background: #e8e8e8;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}


/* ----- Tools Section ----- */

.tools-section {
    margin-bottom: var(--space-2xl);
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tool-link {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.tool-link .tool-desc {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-left: var(--space-sm);
}


/* ----- Archive Section ----- */

/*
 * .archive-section
 * Composition: card-base
 */
.archive-section {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.archive-section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

.archive-section .intro {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    max-width: 700px;
}

.archive-teaser {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.archive-file {
    background: #f5f5f5;
    border-radius: 4px;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.archive-file .redacted {
    color: #bbb;
}

.archive-file .revealed {
    color: var(--color-text-primary);
}

.archive-section .note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.archive-section .note a {
    color: var(--color-primary);
}


/* ----- How It Works ----- */

/*
 * .how-it-works
 * Composition: card-base-sm
 */
.how-it-works {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-2xl);
}

@media (max-width: 700px) {
    .how-it-works {
        padding: 1.25rem 1.5rem;
    }
}

.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 700px) {
    .how-it-works-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.step {
    text-align: center;
}

.step-number {
    width: 28px;
    height: 28px;
    border: 1.5px solid #bbb;
    color: var(--color-text-muted);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
}

.step h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.35rem;
}

.step p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}


/* ----- Preview Section ----- */

.preview-section {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
    align-items: start;
}

@media (max-width: 700px) {
    .preview-section {
        grid-template-columns: 1fr;
    }
}

.preview-text h2 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
}

.preview-text p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

.preview-text ul {
    list-style: none;
    margin-bottom: 0.75rem;
}

.preview-text li {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    padding: 0.2rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.preview-text li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #aaa;
    font-size: 0.8rem;
}


/* ----- Character Card ----- */

/*
 * .character-card
 * Composition: card-base-sm + gradient background
 */
.character-card {
    background: var(--color-bg-gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    font-family: var(--font-serif);
}

.character-header {
    margin-bottom: var(--space-md);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

.character-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-darker);
}

.character-domain {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.character-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.stat-blobs {
    display: flex;
    gap: 3px;
}

.stat-blob {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-border);
}

.stat-blob.filled {
    background: var(--color-text-darker);
}

.stat-blob.half {
    background: linear-gradient(to right, var(--color-text-darker) 50%, var(--color-border) 50%);
}

.character-note {
    margin-top: var(--space-md);
    padding-top: 0.75rem;
    border-top: 1px solid #e8e8e8;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
    font-family: var(--font-sans);
}


/* ----- Assessments Section ----- */

.assessments-section {
    margin-bottom: var(--space-2xl);
}

.assessments-section h2 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: var(--space-md);
}

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

/*
 * .assessment-card
 * Composition: card-base-sm + flex-column + hover-subtle
 */
.assessment-card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.assessment-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: #ccc;
}

.assessment-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.2rem;
}

.assessment-card h3 a {
    color: inherit;
    text-decoration: none;
}

.assessment-card h3 a:hover {
    color: var(--color-primary);
}

.assessment-card .attribution {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-bottom: var(--space-sm);
}

.assessment-card .summary {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    flex-grow: 1;
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.assessment-card .meta {
    font-size: 0.75rem;
    color: #999;
}

/*
 * .assessment-card.coming-soon
 * Composition: assessment-card + is-coming-soon
 */
.assessment-card.coming-soon {
    background: var(--color-bg-light);
    border-style: dashed;
}

.assessment-card.coming-soon h3 {
    color: #666;
}


/* ----- Phase Indicator ----- */

.phase-indicator {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.phase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
}

.phase-dot.active {
    background: var(--color-text-darker);
}

.phase-dot.complete {
    background: var(--color-accent-success);
}


/* ----- Assessment Panel ----- */

/*
 * .assessment-panel
 * Composition: card-base-sm
 */
.assessment-panel {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.panel-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #444;
}

.panel-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.toggle-switch {
    position: relative;
    width: 32px;
    height: 18px;
    background-color: #ddd;
    border-radius: 9px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toggle-switch.active {
    background-color: var(--color-text-darker);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background-color: var(--color-bg-white);
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch.active::after {
    transform: translateX(14px);
}

.panel-actions {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-bg-warm);
}

.progress-text {
    font-size: 0.85rem;
    color: #666;
}

.next-btn {
    padding: 0.6rem 1.25rem;
    background: var(--color-text-darker);
    color: var(--color-bg-white);
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.next-btn:hover {
    background: #3d3a36;
}

.next-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}


/* ----- Term Columns ----- */

.term-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--color-border-lighter);
}

.term-column {
    border-right: 1px solid var(--color-border-lighter);
}

.term-column:last-child {
    border-right: none;
}

.column-header {
    padding: 0.75rem var(--space-md);
    background: var(--color-bg-warm);
    border-bottom: 1px solid var(--color-border-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.column-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.column-check input {
    width: 14px;
    height: 14px;
    accent-color: var(--color-text-darker);
}

.term-list {
    max-height: 520px;
    overflow-y: auto;
}

.term-item {
    padding: 0.4rem var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.15s;
}

.term-item:hover {
    background-color: var(--color-bg-warm);
}

.term-item.flagged {
    background-color: #fffbeb;
    border-left: 3px solid var(--color-accent-orange);
    padding-left: calc(var(--space-md) - 3px);
}

.term-item input[type="checkbox"] {
    margin-top: 2px;
    width: 14px;
    height: 14px;
    accent-color: var(--color-text-darker);
    flex-shrink: 0;
}

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

.term-name {
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
}

.term-definition {
    font-size: 0.8rem;
    color: #666;
    margin-top: var(--space-xs);
    display: none;
}

.term-item.show-definition .term-definition {
    display: block;
}


/* ----- Inline Answer ----- */

.inline-answer {
    margin-top: var(--space-sm);
    padding: var(--space-sm);
    background: #f0f9ff;
    border-radius: 4px;
    font-size: 0.8rem;
}

.inline-answer-options {
    display: flex;
    gap: 0.75rem;
    margin-top: var(--space-xs);
}

.inline-answer-option {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.inline-answer-option input {
    accent-color: var(--color-text-darker);
}


/* ----- Sidebar ----- */

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

/*
 * .dedicated-box
 * Composition: card-base-sm
 */
.dedicated-box {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.box-header {
    padding: 0.75rem var(--space-md);
    background: var(--color-bg-warm);
    border-bottom: 1px solid var(--color-border-lighter);
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.box-content {
    padding: var(--space-md);
}

.box-empty {
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    color: #aaa;
    font-size: 0.85rem;
}


/* ----- Spot Check ----- */

.spot-check {
    font-size: 0.9rem;
    line-height: 1.6;
}

.spot-check-question {
    color: #333;
    margin-bottom: 0.75rem;
}

.spot-check-context {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: var(--space-sm);
}


/* ----- AIR Says ----- */

/*
 * .air-says
 * Composition: card-base-sm + accent-left-info (thin)
 */
.air-says {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent-info);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.air-says .box-content {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.air-says .air-gentle {
    margin-bottom: 0.75rem;
}

.air-says .air-suggestion {
    font-size: 0.85rem;
    color: var(--color-primary);
}


/* ----- Results Panel ----- */

/*
 * .results-panel
 * Composition: card-base-sm
 */
.results-panel {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    display: none;
}

.results-panel.active {
    display: block;
}

.results-header {
    padding: 1.25rem var(--space-lg);
    border-bottom: 1px solid var(--color-border-lighter);
}

.results-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-darker);
    margin-bottom: var(--space-xs);
}

.results-header p {
    font-size: 0.9rem;
    color: #666;
}

.results-body {
    padding: var(--space-lg);
}


/* ----- Readiness Section ----- */

.readiness-section {
    margin-bottom: var(--space-xl);
}

.readiness-section h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-md);
}

.readiness-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: 0.75rem;
}

.readiness-label {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.readiness-bar {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.bar-block {
    width: 12px;
    height: 16px;
    background: #e8e8e8;
    border-radius: 2px;
}

.bar-block.filled {
    background: var(--color-accent-success);
}

.bar-block.partial {
    background: linear-gradient(to right, var(--color-accent-success) 50%, #e8e8e8 50%);
}

.readiness-item.general .bar-block.filled {
    background: #eab308;
}

.readiness-item.general .bar-block.partial {
    background: linear-gradient(to right, #eab308 50%, #e8e8e8 50%);
}

.readiness-percent {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    width: 36px;
    text-align: right;
}


/* ----- Gap Resources ----- */

.gap-resources {
    margin-top: var(--space-lg);
}

.gap-resources h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-md);
}

.gap-item {
    padding: 0.75rem var(--space-md);
    background: var(--color-bg-warm);
    border-radius: 4px;
    margin-bottom: var(--space-sm);
}

.gap-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: var(--space-xs);
}

.gap-item-desc {
    font-size: 0.8rem;
    color: #666;
}

.gap-item-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}


/* ----- User Menu ----- */

.user-menu {
    position: relative;
    margin-left:30px;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: var(--space-xs) 0;
}

.user-menu-button:hover {
    color: var(--color-text-primary);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--color-text-primary);
    color: var(--color-bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-sm);
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 200px;
    z-index: 100;
}

.user-menu.open .user-menu-dropdown {
    display: block;
}

.user-menu-dropdown .menu-header {
    padding: 0.75rem var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.user-menu-dropdown .menu-header .name {
    font-weight: 500;
    color: var(--color-text-primary);
    font-size: 0.9rem;
}

.user-menu-dropdown .menu-header .email {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.user-menu-dropdown .menu-header .badge {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
}

.user-menu-dropdown a {
    display: block;
    padding: 0.6rem var(--space-md);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.user-menu-dropdown a:hover {
    background: #f5f5f5;
    color: var(--color-text-primary);
}

.user-menu-dropdown .menu-divider {
    border-top: 1px solid var(--color-border);
    margin: var(--space-xs) 0;
}

.user-menu-dropdown .logout {
    color: var(--color-text-muted);
}


/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.blank-space {
    height: 0.5em;
}

.hidden {
    display: none !important;
}

.main-content {
    margin-top: 40px;
}

/* Grid layout helpers */
.top-section {
    display: grid;
    gap: 40px;
    grid-template-columns: 2fr 1fr;
    margin-bottom: 50px;
}

.equi-section {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .top-section,
    .equi-section {
        gap: 30px;
        grid-template-columns: 1fr;
    }
}

/* H3 link styling */
h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

h3 > a:link,
h3 > a:visited {
    text-decoration: none !important;
    color: var(--color-text-dark);
}

h3 > a:hover {
    color: var(--color-primary);
}

h3 a {
    color: var(--color-text-dark);
    text-decoration: none;
}

h3 a:hover {
    color: var(--color-primary);
}

.grid2 {
  display: grid;
  /* Col 1: size of longest element | Col 2: the rest */
  grid-template-columns: max-content 1fr;
  gap: 15px;
  align-items: center; /* Optional: keeps items vertically centered */
}

.stretch-me {
  /* Tells this item to cross both columns */
  grid-column: 1 / -1; 
}

.badge-premium {
  display: inline-block;
  padding: 3px 10px;        /* Slightly tighter padding for a header context */
  background-color: #9f9f9f;
  color: #ffffff;
  
  /* Text Styling */
  font-family: sans-serif;
  font-size: 0.65rem;       /* Scaled down slightly for the superscript look */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1;

  /* Superscript Alignment */
  vertical-align: top;      /* Aligns to the top of the line height */
  margin-top: 2px;         /* Fine-tune this based on your specific font's cap height */
  margin-left: 8px;         /* Adds a little breathing room from the text */
  
  /* Shape */
  border-radius: 4px;
}