/* ============================================================================
   WEB FONTS — Barlow (Google Fonts)
   Site-wide font matching LegalConnect theme.
   Weights: 400 (regular), 500 (medium), 600 (semibold), 700 (bold), 800 (extrabold)
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@400;600;700&display=swap');

/**
 * Collaborative by Kiki - Main Stylesheet
 *
 * This file contains:
 * - Design system (CSS custom properties)
 * - Shared authentication styles (login gate, user info bar, logout button)
 * - Resource library styles
 * - Transcript audit styles
 *
 * Note: Dashboard-specific component styles (benefits table, contact cards, etc.)
 * are in templates/dashboard-styles.php
 *
 * Design System aligned with NYC Special Education Collaborative 2017 theme
 */

/* ============================================================================
   CSS CUSTOM PROPERTIES (DESIGN SYSTEM)
   ============================================================================ */
:root {
    /* Brand Colors */
    --color-primary: #0569A5;        /* Dark Blue - interactive elements, text, backgrounds */
    --color-bright-blue: #0EA2DA;    /* Bright Blue - decorative borders and accents only */
    --color-secondary: #0569A5;      /* Navy Blue - hover states and accents */
    --color-secondary-dark: #044f80; /* Darker Blue - hover states */
    --color-tertiary: #0078b4;       /* Medium Blue - borders and secondary elements */
    --color-accent: #F06236;         /* Hot Orange - CTAs and highlights (buttons only) */
    --color-accent-dark: #c8440d;    /* Darker Orange - hover/focus states for accent buttons */
    --color-dark-blue: #004d7a;      /* Very Dark Blue - deep accents */
    --color-slate: #2F4B59;          /* Dark Blue-Gray Slate - headers and tier accents */

    /* Text Colors */
    --color-text-primary: #3d4d58;   /* Grey - primary text — 5.8:1 on white */
    --color-text-dark: #2d3748;      /* Darker grey - emphasis text */
    --color-text-medium: #595959;    /* Medium grey — 7:1 on white */
    --color-text-light: #595959;     /* Light grey — min 7:1 contrast on white */
    --color-text-darker: #222222;    /* Very dark text for high contrast */
    --color-text-muted: #595959;     /* Muted grey text — min 7:1 contrast on white */

    /* Background Colors */
    --color-bg-white: #ffffff;       /* White backgrounds */
    --color-bg-light: #f8f9fa;       /* Light grey background */
    --color-bg-lightest: #f5f5f5;    /* Lightest grey background */
    --color-bg-blue-light: #88c4e9;  /* Mist Blue - light accent */
    --color-bg-blue-lightest: #e8f4f8; /* Very light blue for info sections */

    /* Border Colors */
    --color-border: #e0e0e0;         /* Default border — alias for border-light */
    --color-border-light: #e0e0e0;   /* Light borders */
    --color-border-medium: #dddddd;  /* Medium borders */
    --color-border-dark: #cccccc;    /* Darker borders */

    /* Additional UI Colors */
    --color-secondary-hover: #5a6268;  /* Secondary button hover state */
    --color-google-blue: #4285f4;      /* Google brand blue */
    --color-google-blue-hover: #357ae8; /* Google blue hover state */

    /* Status Colors - Info/Note (Material Design Blue) */
    --color-info: #1976d2;           /* Info blue */
    --color-info-dark: #0d47a1;      /* Info dark blue */
    --color-info-bg: #e3f2fd;        /* Info background */

    /* Status Colors - Success */
    --color-success: #4caf50;        /* Success green */
    --color-success-dark: #2e7d32;   /* Success dark green */
    --color-success-bg: #e8f5e9;     /* Success background */

    /* Status Colors - Warning */
    --color-warning: #ffc107;        /* Warning yellow — decorative/borders only */
    --color-warning-dark: #5c4400;   /* Warning text — 6.5:1 on #fff3cd */
    --color-warning-bg: #fff3cd;     /* Warning background */

    /* Status Colors - Error */
    --color-error: #f44336;          /* Error red */
    --color-error-dark: #c62828;     /* Error dark red */
    --color-error-bg: #ffebee;       /* Error background */

    /* Grade Badge Colors */
    --color-badge-elementary: #00A1DB;     /* Elementary background */
    --color-badge-elementary-text: #003d57; /* Elementary text */
    --color-badge-middle: #91999F;         /* Middle background */
    --color-badge-middle-text: #1a1a1a;    /* Middle text */
    --color-badge-high: #F06236;           /* High background */
    --color-badge-high-text: #5c1a00;      /* High text */

    /* Typography */
    --font-family-body: 'Barlow', Helvetica, Arial, sans-serif;
    --font-family-header: 'Barlow', Helvetica, Arial, sans-serif;

    /* Font Sizes */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Transitions */
    --transition-fast: 0.2s;
    --transition-base: 0.3s;
}

/* ============================================================================
   BRAND COLOR LOCK — re-declare on .collab-app so the theme cannot override
   ============================================================================ */
.collab-app {
    --color-primary: #0569A5;
    --color-bright-blue: #0EA2DA;
    --color-secondary: #0569A5;
    --color-secondary-dark: #044f80;
    --color-tertiary: #0078b4;
    --color-accent: #F06236;
    --color-accent-dark: #c8440d;
    --color-dark-blue: #004d7a;
    --color-slate: #2F4B59;
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */
/* Global focus styles for keyboard navigation */
*:focus {
    outline: 3px solid #0569A5;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 3px solid #0569A5;
    outline-offset: 2px;
}

.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;
}

/* ============================================================================
   THEME ISOLATION — scoped to .collab-app wrapper
   ============================================================================ */

/* WordPress/Gutenberg global styles override text-align with high specificity.
   Force centering on elements that must be centered regardless of theme. */
.collab-app .audit-hero,
.collab-app .audit-intro__footer,
.collab-app .audit-card-cta,
.collab-app .audit-add-row,
.collab-app .cmp-btn-group,
.collab-app .member-login-box,
.collab-app .collab-auth-gate__inner,
.collab-app .collab-loading {
    text-align: center !important;
}

.collab-app h1,
.collab-app h2,
.collab-app h3,
.collab-app h4,
.collab-app h5,
.collab-app h6 {
    color: #0569A5;
    font-family: var(--font-family-header);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    margin-top: 0;
}

.collab-app h1 { font-size: 1.75rem; }
.collab-app h2 { font-size: 1.375rem; }
.collab-app h3 { font-size: 1.125rem; }
.collab-app h4 { font-size: 1rem; }
.collab-app h5,
.collab-app h6 { font-size: 0.9375rem; }

.collab-app p {
    margin-top: 0;
}

.collab-app a {
    color: #0569A5;
    text-decoration: none;
}

.collab-app a:hover,
.collab-app a:focus {
    text-decoration: underline;
}

.collab-app button {
    font-family: inherit;
    cursor: pointer;
}

.collab-app input,
.collab-app select,
.collab-app textarea {
    font-family: inherit;
    font-size: inherit;
}

.collab-app ul,
.collab-app ol {
    margin-top: 0;
    padding-left: 1.5em;
}

/* ============================================================================
   GENERAL PLUGIN STYLES
   ============================================================================ */
.collab-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    font-family: var(--font-family-body);
    line-height: 1.3;
}

.collab-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* ============================================================================
   BUTTON SYSTEM (BEM)
   ============================================================================ */
.collab-button {
    background-color: #0569A5;
    color: #ffffff;
    padding: 9px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: var(--font-family-body);
    transition: background-color var(--transition-base), border-color var(--transition-base), color var(--transition-base), box-shadow var(--transition-base);
    display: inline-block;
    text-align: center;
    text-decoration: none;
    line-height: 1.4;
}

.collab-button:hover,
.collab-button:focus {
    background-color: #044f80;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Button Variants */
.collab-button--secondary {
    background-color: #595959;
}

.collab-button--secondary:hover,
.collab-button--secondary:focus {
    background-color: #5a6268;
}

.collab-button--primary {
    background-color: #0569A5;
}

.collab-button--primary:hover,
.collab-button--primary:focus {
    background-color: #044f80;
}

.collab-button--outline {
    background-color: transparent;
    border: 2px solid #0569A5;
    color: #0569A5;
}

.collab-button--outline:hover,
.collab-button--outline:focus {
    background-color: #0569A5;
    color: #ffffff;
}

.collab-button--delete,
.collab-button--danger {
    background-color: var(--color-error-dark);
}

.collab-button--delete:hover,
.collab-button--delete:focus,
.collab-button--danger:hover,
.collab-button--danger:focus {
    background-color: var(--color-error-dark);
    filter: brightness(0.85);
}

/* Button Sizes */
.collab-button--small {
    padding: 5px 12px;
    font-size: var(--font-size-sm);
}

.collab-button--large {
    padding: 12px 28px;
    font-size: var(--font-size-lg);
}

/* Button States */
.collab-button:disabled,
.collab-button--disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Legacy class support (deprecated - use BEM modifiers) */
.collab-button-secondary {
    background-color: #595959;
}

.collab-button-secondary:hover,
.collab-button-secondary:focus {
    background-color: #5a6268;
}

/* ============================================================================
   ALERT/MESSAGE SYSTEM (BEM)
   ============================================================================ */
.collab-alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border-left: 4px solid;
    position: relative;
    line-height: 1.3;
}

.collab-app .collab-alert p {
    margin: 0;
}

.collab-app .collab-alert p:not(:last-child) {
    margin-bottom: 8px;
}

/* Alert Types */
.collab-alert--info {
    background-color: #e3f2fd;
    border-color: #0d47a1;
    color: #0d47a1;
}

.collab-alert--success {
    background-color: var(--color-success-bg);
    border-color: var(--color-success-dark);
    color: var(--color-success-dark);
}

.collab-alert--warning {
    background-color: var(--color-warning-bg);
    border-color: var(--color-warning-dark);
    color: var(--color-warning-dark);
}

.collab-alert--error {
    background-color: var(--color-error-bg);
    border-color: var(--color-error);
    color: var(--color-error-dark);
}

/* Dismissible Alerts */
.collab-alert--dismissible {
    padding-right: 50px;
}

.collab-alert__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    color: inherit;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.collab-alert__close:hover,
.collab-alert__close:focus {
    opacity: 1;
}

/* ============================================================================
   LOADING SPINNER SYSTEM
   ============================================================================ */
.collab-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
}

.collab-loading--inline {
    display: inline-flex;
    padding: 0;
}

.collab-loading__message {
    font-size: var(--font-size-base);
    color: #595959;
}

.collab-spinner {
    border: 3px solid #e0e0e0;
    border-top-color: #0EA2DA;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: collab-spin 0.8s linear infinite;
}

.collab-spinner--small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.collab-spinner--large {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

@keyframes collab-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================================
   AUTHENTICATION COMPONENTS
   ============================================================================ */

/* Auth Gate */
.collab-auth-gate {
    background: #ffffff;
    border: 2px solid #0569A5;
    border-radius: 12px;
    padding: 48px 32px;
    max-width: 500px;
    margin: 40px auto;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 102, 164, 0.15);
}

.collab-app .collab-auth-gate h2 {
    font-family: var(--font-family-body);
    font-size: var(--font-size-2xl);
    color: #2d3748;
    margin: 0 0 16px 0;
}

.collab-app .collab-auth-gate > p {
    font-size: var(--font-size-md);
    color: #3d4d58;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.collab-auth-gate__note {
    font-size: var(--font-size-base);
    color: #595959;
    margin: 8px 0 24px 0;
}

.collab-app .collab-auth-gate__note a {
    color: #0569A5;
    text-decoration: underline;
}

.collab-app .collab-auth-gate__note a:hover {
    color: #0569A5;
}

.collab-google-signin {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.collab-auth-gate__error {
    margin-top: 20px;
}

.collab-auth-gate__error-message {
    font-weight: normal;
}

.collab-auth-gate__loading {
    margin-top: 20px;
}

/* User Info Bar */
.collab-user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #0066A6;
    border: none;
    border-radius: 8px;
    margin-bottom: var(--spacing-2xl);
    gap: 16px;
    flex-wrap: wrap;
}

.collab-user-info__text {
    flex: 1;
}

.collab-app .collab-user-info__text h2 {
    font-family: var(--font-family-body);
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.collab-app .collab-user-info__text p {
    font-size: 15px;
    color: #ffffff;
    margin: 0;
}

.collab-user-info__logout-form {
    margin: 0;
}

@media (max-width: 768px) {
    .collab-user-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .collab-auth-gate {
        padding: 24px;
        margin: 20px auto;
    }
}

/* ============================================================================
   MEMBERSHIP DASHBOARD STYLES
   ============================================================================ */

.member-section {
    background: #ffffff;
    border: none;
    border-radius: 0;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: none;
}

.member-section-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: #0569A5;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #E2E6E9;
    font-family: var(--font-family-body);
    text-align: center !important;
}

.member-section-title--spaced {
    margin-top: 32px !important;
}

.member-info-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px 20px;
    margin-bottom: 0;
}

.collab-app .member-info-grid dt {
    font-weight: 600;
    color: #3d4d58;
    font-size: var(--font-size-base);
}

.collab-app .member-info-grid dt::after {
    content: ":";
}

.collab-app .member-info-grid dd {
    color: #3d4d58;
    font-size: var(--font-size-base);
    margin: 0;
}

/* Legacy support for span elements */
.member-info-label {
    font-weight: 600;
    color: #3d4d58;
    font-size: var(--font-size-base);
}

.member-info-value {
    color: #3d4d58;
    font-size: var(--font-size-base);
}

.member-update-link {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 12px 16px;
    margin-top: 16px;
}

.collab-app .member-update-link p {
    margin: 0;
    font-size: var(--font-size-base);
    color: #595959;
}

.collab-app .member-update-link a {
    color: #0066A6;
    text-decoration: underline;
    transition: color 0.2s;
}

.collab-app .member-update-link a:hover,
.collab-app .member-update-link a:focus {
    color: #044f80;
    text-decoration-thickness: 2px;
}

.member-membership-badge {
    background: #0569A5;
    border: 2px solid #0569A5;
    border-radius: 8px;
    padding: 12px 20px;
    margin: 0 auto 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    align-items: center;
    width: fit-content;
}

.member-membership-badge-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    align-items: center;
}

.member-membership-badge-content div {
    font-size: var(--font-size-sm);
    color: #fff;
    margin: 0;
}

.collab-app .member-membership-badge-content strong {
    font-weight: 600;
    color: #fff;
}

.member-note {
    background: #e3f2fd;
    border: 2px solid #1976d2;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    font-size: var(--font-size-base);
    color: #0d47a1;
}

.collab-app .member-note strong {
    font-weight: 600;
}

.collab-app .member-note a {
    color: #0d47a1;
    text-decoration: underline;
    transition: color 0.2s;
}

.collab-app .member-note a:hover,
.collab-app .member-note a:focus {
    color: #0d47a1;
    text-decoration-thickness: 2px;
}

/* Notes inside .member-section get no extra margin — the section padding is enough */
.member-section .member-note { margin: 0; }

/* Paragraph spacing inside note boxes */
.collab-app .member-note p { margin: 0 0 16px 0; }
.collab-app .member-note p:last-child { margin-bottom: 0; }

/* Subtle grey notification variant — e.g. "updated hourly" bar */
.member-note--subtle {
    background: #f8f9fa;
    border: none;
    border-left: 4px solid #0EA2DA;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 24px 0;
    font-size: var(--font-size-sm);
    color: #3d4d58;
}
.member-note--subtle p { margin: 0; }

/* Inline sub-note below a data table — e.g. seat usage disclaimer */
.member-info-note {
    margin-top: 16px;
    font-size: var(--font-size-base);
    color: #3d4d58;
    line-height: 1.3;
}
.collab-app .member-info-note p { margin: 0 0 8px 0; }
.collab-app .member-info-note p:last-child { margin-bottom: 0; }

.member-table-asterisk {
    color: #0569A5;
    font-weight: 600;
}

.member-table-footnote {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: var(--color-text-muted, #6b7280);
}

.member-benefits-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.member-benefits-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.member-benefits-table thead {
    background: #0569A5;
    color: #ffffff;
}

.collab-app .member-benefits-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: var(--font-size-sm);
    border: 1px solid #004d7a;
}

.collab-app .member-benefits-table th:not(:first-child) {
    text-align: center;
}

.member-benefits-table tbody tr {
    transition: background 0.2s;
    background: #ffffff;
}


.member-benefits-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.member-benefits-table tbody tr:hover {
    background: #e8f4f8;
}

.collab-app .member-benefits-table td {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    color: #222222;
    font-size: var(--font-size-base);
    font-weight: 400;
}

.collab-app .member-benefits-table tbody th {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    color: #222222;
    font-size: var(--font-size-base);
    text-align: left;
    font-weight: 600;
}

.collab-app .member-benefits-table td:not(:first-child) {
    text-align: center;
}

.member-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.collab-app .member-benefits-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    line-height: 1.3;
    color: #3d4d58;
    font-size: var(--font-size-base);
}

.collab-app .member-benefits-list li:last-child {
    border-bottom: none;
}

.collab-app .member-benefits-list strong {
    font-weight: 600;
    color: #0569A5;
    font-size: var(--font-size-base);
}

.collab-app .member-benefits-list a {
    color: #0569A5;
    text-decoration: underline;
    transition: color 0.2s;
}

.collab-app .member-benefits-list a:hover,
.collab-app .member-benefits-list a:focus {
    color: #0569A5;
    text-decoration-thickness: 2px;
}

.member-error {
    background: #e3f2fd;
    border: 2px solid #1976d2;
    border-radius: 8px;
    padding: 16px;
    color: #0d47a1;
    font-size: var(--font-size-base);
}

.collab-app .member-error p {
    margin: 0;
}

/* Member Contact Cards */
.member-contacts-heading {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: #0569A5;
    margin: 0 0 16px 0;
}

.member-contacts-section { margin: 24px 0; }

.member-contacts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.member-contact-card {
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    width: fit-content;
    border-left: 3px solid #0EA2DA;
}

.collab-app .member-contact-card h4 {
    font-weight: 600;
    color: #0569A5;
    margin: 0 0 8px 0;
    font-size: var(--font-size-sm);
}

.collab-app .member-contact-card dl {
    margin: 0;
}

.collab-app .member-contact-card dt {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.collab-app .member-contact-card dd {
    font-size: var(--font-size-sm);
    color: #3d4d58;
    margin: 0 0 4px 0;
}

.collab-app .member-contact-card dd:last-child {
    margin-bottom: 0;
}

.collab-app .member-contact-card a {
    color: #0569A5;
    text-decoration: underline;
}

.collab-app .member-contact-card a:hover,
.collab-app .member-contact-card a:focus {
    color: #0569A5;
    text-decoration-thickness: 2px;
}

.member-contact-no-data {
    font-size: var(--font-size-sm);
    color: #595959;
    font-style: italic;
    margin: 0;
}

/* Legacy Authentication Styles (for backwards compatibility) */
.member-login-gate {
    background: #e8f4f8;
    border: none;
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px;
    margin: 40px auto;
    text-align: center;
}


/* Responsive Styles for Dashboard Components */
@media (max-width: 768px) {
    .member-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .member-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Reformat table as stacked cards on mobile */
    .member-benefits-table-wrapper {
        overflow-x: visible;
        margin: 0;
        padding: 0;
    }

    .member-benefits-table,
    .member-benefits-table thead,
    .member-benefits-table tbody,
    .member-benefits-table tr,
    .member-benefits-table th,
    .member-benefits-table td {
        display: block;
    }

    /* Hide the column header row — labels come from data-label */
    .member-benefits-table thead {
        display: none;
    }

    .member-benefits-table tbody tr {
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: var(--radius-md);
        margin-bottom: 10px;
        padding: 12px 14px;
    }

    .member-benefits-table tbody tr:nth-child(even) {
        background: #ffffff;
    }

    /* Row header = benefit name */
    .member-benefits-table tbody th[scope="row"] {
        font-weight: 600;
        color: #0569A5;
        font-size: var(--font-size-sm);
        padding: 0 0 8px 0;
        border: none;
    }

    /* Data cells shown as label: value */
    .member-benefits-table td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        border: none;
        font-size: var(--font-size-sm);
        color: #222222;
        border-top: 1px solid #f8f9fa;
    }

    .member-benefits-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #3d4d58;
        flex-shrink: 0;
        margin-right: 12px;
    }

    /* Benefit cards: smaller min so two can fit on a tablet */
    .member-benefit-cards {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    /* Event cards: full width on mobile */
    .member-events-list {
        grid-template-columns: 1fr;
    }

    /* Membership badge: full width on small screens */
    .member-membership-badge {
        width: 100%;
        justify-content: center;
    }

    /* Contact cards: full width */
    .member-contact-card {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Benefit cards: single column on phones */
    .member-benefit-cards {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   RESOURCE LIBRARY STYLES
   ============================================================================ */
.free-resources-section {
    margin-bottom: 30px;
}

.resource-library-grouped {
    margin-top: 20px;
}

.rl-section-block {
    margin-top: 40px;
    margin-bottom: 32px;
}

.rl-section-heading {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #3d4d58;
    margin-bottom: 32px;
}

.rl-section-note {
    font-size: 14px;
    color: #3d4d58;
    margin-top: 8px;
}

.rl-empty-state {
    text-align: center;
    padding: 40px;
}

.topic-section {
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.collab-app .topic-header {
    margin: 0;
    padding: 15px 20px;
    background: #0569A5 !important;
    color: white !important;
    cursor: pointer;
    font-size: var(--font-size-xl);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    user-select: none;
}

.collab-app .topic-header span {
    color: white !important;
}

.collab-app .topic-header:hover,
.collab-app .topic-header:focus {
    background: #0569A5 !important;
    color: white !important;
}

.topic-content {
    padding: 15px 20px;
}

.topic-content.collapsed {
    display: none;
}

.subtopic-section {
    margin-bottom: 15px;
}

.collab-app .subtopic-header {
    margin: 15px 0 10px;
    padding: 12px 20px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #0EA2DA;
    user-select: none;
    color: #0569A5;
}

.collab-app .subtopic-header:hover,
.collab-app .subtopic-header:focus {
    background: #e0e0e0;
}

.subtopic-content {
    padding: 5px 0;
}

.subtopic-content.collapsed {
    display: none;
}

/* Topic Sections - Nested folder indentation */
.nested-level-1 { margin-left: 20px; }
.nested-level-2 { margin-left: 40px; }
.nested-level-3 { margin-left: 60px; }
.nested-level-4 { margin-left: 80px; }
.nested-level-5 { margin-left: 100px; }

@media (max-width: 480px) {
    .nested-level-1 { margin-left: 10px; }
    .nested-level-2 { margin-left: 18px; }
    .nested-level-3 { margin-left: 26px; }
    .nested-level-4 { margin-left: 34px; }
    .nested-level-5 { margin-left: 42px; }
}

/* Resource Tiles - File display cards */
.resource-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin: 15px 0;
}

.free-resources-section .resource-tiles {
    grid-template-columns: repeat(4, 1fr);
}

.free-resources-section .resource-tile-icon {
    width: 64px;
    height: 64px;
}

.resource-tile {
    background: #ffffff;
    border: 2px solid #0078b4;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.resource-tile:hover,
.resource-tile:focus-within {
    box-shadow: 0 3px 8px rgba(0, 157, 220, 0.4);
    transform: translateY(-2px);
    border-color: #0569A5;
}

.resource-tile-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #222222;
    padding: 12px 10px 10px 10px;
    height: 100%;
    align-items: center;
    justify-content: space-between;
}

.resource-tile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.resource-tile-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-bottom: 0;
    filter: brightness(0) saturate(100%) invert(25%) sepia(98%) saturate(1347%) hue-rotate(178deg) brightness(91%) contrast(101%);
}

.resource-tile-title-wrapper {
    flex: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.resource-tile-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #3d4d58;
    text-align: center;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.resource-grade-badges {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
    flex-shrink: 0;
    margin-top: auto;
}

.grade-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.grade-badge-elementary {
    background: var(--color-badge-elementary);
    color: var(--color-badge-elementary-text);
}

.grade-badge-middle {
    background: var(--color-badge-middle);
    color: var(--color-badge-middle-text);
}

.grade-badge-high {
    background: var(--color-badge-high);
    color: var(--color-badge-high-text);
}

.toggle-icon {
    font-size: 14px;
    transition: transform 0.3s;
}

.collab-app .topic-header .toggle-icon {
    color: white;
}

/* ============================================================================
   RESOURCE LIBRARY FILTER PANEL (matching calendar filter style)
   ============================================================================ */

.collab-resource-filters {
    position: relative;
    z-index: 100;
}


.collab-resource-filters__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #0569A5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.collab-resource-filters__toggle:hover {
    background: #044f80;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.collab-resource-filters__toggle:focus-visible {
    outline: 3px solid #0569A5;
    outline-offset: 2px;
}

.collab-resource-filters__toggle-icon {
    font-size: 16px;
}

.collab-resource-filters__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.collab-resource-filters__count:empty {
    display: none;
}

.collab-resource-filters__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.collab-resource-filters__panel[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.collab-resource-filters__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
}

.collab-resource-filters__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.collab-resource-filters__clear {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: var(--color-text-medium, #666);
    cursor: pointer;
    transition: all 0.2s ease;
}

.collab-resource-filters__clear:hover {
    background: #f5f5f5;
    border-color: #bdbdbd;
}

.collab-resource-filters__groups {
    padding: 16px 20px;
}

.collab-resource-filters__group {
    margin-bottom: 20px;
}

.collab-resource-filters__group:last-child {
    margin-bottom: 0;
}

.collab-resource-filters__group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    user-select: none;
}

.collab-resource-filters__group-title::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    flex-shrink: 0;
    margin-left: 8px;
    opacity: 0.5;
    transition: transform 0.2s;
}

.collab-resource-filters__group-title[aria-expanded="true"]::after {
    transform: rotate(-135deg);
}

.collab-resource-filters__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.collab-resource-filters__options[hidden] {
    display: none !important;
}

.collab-resource-filters__topic-group {
    display: flex;
    flex-direction: column;
    padding: 4px 8px;
    border-radius: 4px;
}

.collab-resource-filters__topic-group:nth-child(odd) {
    background: rgba(0, 0, 0, 0.03);
}

.collab-resource-filters__option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.collab-resource-filters__options > .collab-resource-filters__option:nth-child(odd) {
    background: rgba(0, 0, 0, 0.03);
}

.collab-app .collab-resource-filters__option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #0569A5;
    flex-shrink: 0;
}

.collab-resource-filters__option-label {
    font-size: 14px;
    color: #2d3748;
    flex: 1;
}

.collab-resource-filters__subtopic-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    color: #0569A5;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.collab-resource-filters__subtopic-toggle[aria-expanded="true"] .toggle-arrow {
    display: inline-block;
    transform: rotate(180deg);
}

.collab-resource-filters__subtopics {
    margin-left: 28px;
    margin-top: 8px;
    padding-left: 10px;
    border-left: 2px solid #e0e0e0;
    display: none;
}

.collab-resource-filters__subtopics[aria-hidden="false"] {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.collab-resource-filters__option--subtopic {
    font-size: 14px;
}

.collab-resource-filters__option--subtopic .collab-resource-filters__option-label {
    font-size: 14px;
    color: var(--color-text-medium, #666);
}

.collab-resource-filters__empty {
    padding: 10px 0;
    text-align: center;
    color: var(--color-text-medium, #666);
    font-size: 14px;
    font-style: italic;
}

.collab-resource-filters__actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.collab-resource-filters__apply {
    width: 100%;
    padding: 12px 16px;
    background: #0569A5;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.collab-resource-filters__apply:hover {
    background: #044f80;
}

.collab-resource-filters__apply:focus-visible {
    outline: 3px solid #0569A5;
    outline-offset: 2px;
}

/* Mobile responsive adjustments for resource filters */
@media (max-width: 768px) {
    .collab-resource-filters {
        position: relative;
    }

    .collab-resource-filters__panel {
        position: fixed;
        top: auto;
        bottom: 70px;
        left: 20px;
        right: 20px;
        width: auto;
        max-height: 60vh;
    }
}

/* Legacy Filter System - keeping for backward compatibility */
.resource-filters-sticky {
    position: sticky;
    top: 20px;
    z-index: 100;
    margin-bottom: 30px;
}

.filter-bordered {
    border: 2px solid #0EA2DA;
}

.filter-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.filter-right-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-count {
    font-size: 14px;
    color: #3d4d58;
    white-space: nowrap;
}

.collab-app .resource-filters-sticky h3 {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
    color: #0569A5;
}

.filter-clear-btn {
    font-size: 13px !important;
    padding: 6px 12px !important;
    white-space: nowrap;
    background-color: #ffffff !important;
    color: #0569A5 !important;
    border: 1px solid #0078b4 !important;
}

.filter-clear-btn:hover,
.filter-clear-btn:focus {
    background-color: #0569A5 !important;
    color: #ffffff !important;
}

.filter-toggle-btn {
    background: #f8f9fa;
    border: 1px solid #dddddd;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 10px 14px;
    color: #0569A5;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    min-width: 44px;
    min-height: 44px;
}

.filter-toggle-btn:hover,
.filter-toggle-btn:focus {
    color: #0569A5;
    background: #e8f4f8;
    border-color: #0569A5;
}

.filter-toggle-btn .toggle-icon {
    transition: transform 0.3s;
}

.filter-toggle-btn[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

#filter-content.collapsed {
    display: none;
}

#filter-content {
    margin-top: 15px;
}

.filter-section {
    margin-bottom: 12px;
    border: none;
    padding: 0;
}

.filter-section legend {
    padding: 0;
    margin: 0;
}

.collab-app .filter-section h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #3d4d58;
}

/* Filter Topics - Multi-column grid with collapsible subtopics */
.filter-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px 15px;
}

.filter-topic-group {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.filter-topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.filter-topic-header .filter-checkbox-label {
    flex: 1;
}

.filter-toggle {
    cursor: pointer;
    font-size: 14px;
    color: #0569A5;
    padding: 4px 6px;
    user-select: none;
    transition: transform 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.filter-toggle:hover,
.filter-toggle:focus {
    color: #0569A5;
}

.filter-subtopics {
    margin-left: 16px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-subtopics.collapsed {
    display: none;
}

.filter-subtopic-item {
    font-size: 13px;
}

/* Filter Grade Bands - Card layout matching topics */
.filter-grades-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px 15px;
}

.filter-grades-row .filter-checkbox-label {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.filter-grades-row .filter-checkbox-label:hover {
    border-color: #0569A5;
    background: #e8f4f8;
}

/* Filter Checkboxes - Clickable labels */
.filter-checkbox-label {
    display: flex;
    align-items: center;
    font-size: 13px;
    user-select: none;
    line-height: 1.3;
}

.collab-app .filter-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.collab-app .filter-checkbox-label span {
    cursor: default;
    color: #3d4d58;
}

.filter-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

/* ============================================================================
   LEGACY STYLES (Consider removing if unused)
   ============================================================================ */
.dashboard-header {
    border-bottom: 2px solid #0EA2DA;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.collab-app .dashboard-header h1 {
    margin: 0;
    color: #0569A5;
}

.dashboard-welcome {
    font-size: 16px;
    color: #595959;
    margin-top: 5px;
}

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

.dashboard-widget {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0EA2DA;
}

.collab-app .dashboard-widget h3 {
    margin-top: 0;
    color: #0569A5;
}

.google-login-button {
    background-color: #4285f4;
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.google-login-button:hover {
    background-color: #357ae8;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */
@media (max-width: 768px) {
    .resource-library {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .collab-container {
        padding: 16px;
    }
}

/* ============================================================================
   DASHBOARD TABS
   ============================================================================ */

.member-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.member-tabs::-webkit-scrollbar {
    display: none;
}

.member-tab {
    background: #e8f4f8;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 4px;
    margin-bottom: -2px;
    padding: 10px 20px;
    font-size: var(--font-size-sm);
    font-family: var(--font-family-body);
    font-weight: 500;
    color: #595959;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color var(--transition-fast), background var(--transition-fast);
}

@media (max-width: 480px) {
    .member-tab {
        padding: 10px 14px;
        font-size: var(--font-size-xs);
        min-height: 44px;
    }
}

.member-tab:hover {
    background: #ffffff;
    color: #0569A5;
}

.member-tab--active {
    background: #F06236 !important;
    border-color: #F06236 !important;
    color: #2F4B59 !important;
    font-weight: 600;
}

.member-tab-panels {
    min-height: 400px;
}

.member-tab-panel {
    display: none;
}

.member-tab-panel--active {
    display: block;
}

/* Accordion toggle — hidden on desktop, shown on mobile by media query */
.member-accordion-toggle {
    display: none;
}

@media (max-width: 639px) {
    /* Hide tab nav, show accordion */
    .member-tabs {
        display: none;
    }

    .member-tab-panels {
        min-height: 0;
    }

    /* All panels visible in accordion mode */
    .member-tab-panel {
        display: block;
        border: 1px solid #e0e0e0;
        border-radius: var(--radius-md);
        margin-bottom: 8px;
        overflow: hidden;
    }

    /* Collapsed state hides the body */
    .member-tab-panel.member-accordion-collapsed .member-accordion-body {
        display: none;
    }

    .member-accordion-body {
        padding: 12px 16px 16px;
    }

    /* Inside accordion the panel is already a card; remove double-card look */
    .member-accordion-body .member-section {
        border: none;
        box-shadow: none;
        padding: 0;
        margin-bottom: 16px;
    }

    /* Accordion toggle button */
    .member-accordion-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 16px;
        background: #e8f4f8;
        border: none;
        border-radius: 0;
        font-size: var(--font-size-sm);
        font-family: var(--font-family-body);
        font-weight: 600;
        color: #0569A5;
        cursor: pointer;
        text-align: left;
    }

    .member-accordion-toggle[aria-expanded="true"] {
        background: #0569A5;
        color: #fff;
    }

    .member-accordion-toggle__icon::after {
        content: '▾';
        font-size: 16px;
        transition: transform 0.2s;
        display: inline-block;
    }

    .member-accordion-toggle[aria-expanded="true"] .member-accordion-toggle__icon::after {
        transform: rotate(-180deg);
    }
}

/* ============================================================================
   DASHBOARD EVENT CARDS
   ============================================================================ */

.member-events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    background: #f0f4f8;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.member-events-loading {
    grid-column: 1 / -1;
    color: #595959;
    font-size: var(--font-size-sm);
    padding: var(--spacing-md) 0;
}

.member-events-empty {
    grid-column: 1 / -1;
    color: #595959;
    font-size: var(--font-size-sm);
}

.collab-app .member-events-empty a {
    color: #0569A5;
    text-decoration: underline;
}

.member-event-card {
    background: #ffffff;
    border: none;
    border-radius: 0;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    box-shadow: none;
}

.member-event-card__header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.member-event-card__badge {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 8px;
    border-radius: 20px;
    background: #e8f4f8;
    color: #0569A5;
    white-space: nowrap;
    flex-shrink: 0;
}

.member-event-card__name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #222222;
    margin: 0;
    line-height: 1.4;
}

.member-event-card__meta {
    font-size: var(--font-size-sm);
    color: #595959;
    margin: 0;
}

.member-event-card__venue {
    font-size: var(--font-size-sm);
    color: #595959;
    display: block;
}

.member-event-card__register {
    margin-top: auto;
    padding-top: var(--spacing-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #0569A5;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.member-event-card__register:hover,
.member-event-card__register:focus {
    color: #004d7a;
}

.member-event-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: var(--spacing-sm);
}

.member-event-card__action {
    font-size: var(--font-size-sm) !important;
    padding: 6px 14px !important;
    white-space: nowrap;
}

.member-events-browse {
    margin-top: var(--spacing-lg);
    text-align: center;
}


/* ============================================================================
   DASHBOARD BENEFIT CARDS
   ============================================================================ */

.member-benefit-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    background: #f0f4f8;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.member-benefit-card {
    background: #ffffff;
    border: none;
    border-radius: 0;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.member-benefit-card__title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #0569A5;
    margin: 0;
    line-height: 1.3;
}

.member-benefit-card__desc {
    font-size: var(--font-size-sm);
    color: #3d4d58;
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

.member-benefit-card__link {
    margin-top: auto;
}

/* Email links keep text style; button links get cmp-btn styles */
a.member-benefit-card__link[href^="mailto"] {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #0569A5;
    text-decoration: underline;
    text-underline-offset: 2px;
}

a.member-benefit-card__link[href^="mailto"]:hover,
a.member-benefit-card__link[href^="mailto"]:focus {
    color: #004d7a;
}

/* ============================================================================
   SHARED AUTHENTICATION / DASHBOARD STYLES
   ============================================================================ */

/* Dashboard Container */
.member-dashboard {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: var(--font-family-body);
    font-size: 16px;
}

/* Dashboard Header */
.member-dashboard-header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e0e0e0;
}

.collab-app .member-dashboard-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #3d4d58;
    margin: 0 0 8px 0;
    font-family: var(--font-family-body);
}

.collab-app .member-dashboard-header p {
    font-size: 16px;
    color: #3d4d58;
    margin: 0;
}

/* Login Gate */
.collab-app .member-login-gate h2 {
    font-size: 24px;
    font-weight: 600;
    color: #3d4d58;
    margin: 0 0 16px 0;
}

.collab-app .member-login-gate p {
    font-size: 16px;
    color: #3d4d58;
    margin: 0 0 32px 0;
    line-height: 1.3;
}

/* Google Sign-In Button Container */
.member-google-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

/* Login Error Message */
.member-login-error {
    background: var(--color-error-bg);
    border: 2px solid var(--color-error);
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0 0 0;
    color: var(--color-error-dark);
    font-size: 14px;
    display: none;
}

.member-login-error.visible {
    display: block;
}

/* Login Loading State */
.member-login-loading {
    text-align: center;
    padding: 24px;
    color: #595959;
    font-style: italic;
    display: none;
}

/* User Info Bar (logged in state) */
.member-user-info {
    background: #0066A6;
    border: none;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: var(--spacing-2xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.member-user-info-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-user-info-actions .collab-resource-filters {
    position: relative;
}

.member-user-info-actions .collab-resource-filters__panel {
    right: 0;
    left: auto;
}

.collab-app .member-user-info-text h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.collab-app .member-user-info-text p {
    font-size: 15px;
    color: #ffffff;
    margin: 0;
}

/* Logout Button */
.collab-app .member-logout-btn,
.member-dashboard .member-logout-btn {
    padding: 8px 20px !important;
    background: #ffffff !important;
    border: 1px solid #ffffff !important;
    border-radius: 6px !important;
    color: #595959 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
    display: inline-block;
}

.collab-app .member-logout-btn:hover,
.collab-app .member-logout-btn:focus,
.member-dashboard .member-logout-btn:hover,
.member-dashboard .member-logout-btn:focus {
    background: #f0f0f0 !important;
    border-color: #f0f0f0 !important;
    color: #2F4B59 !important;
    transform: translateY(-2px);
}

/* Responsive Design for Auth Components */
@media (max-width: 768px) {
    .member-dashboard {
        padding: 0 16px;
    }

    .member-login-gate {
        padding: 32px 24px;
    }

    .member-dashboard-header h1 {
        font-size: 24px;
    }

    .member-dashboard-header p {
        font-size: 15px;
    }

    .member-user-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Reduced Motion for Auth Components */
@media (prefers-reduced-motion: reduce) {
    .member-logout-btn:hover,
    .member-logout-btn:focus {
        transform: none;
    }
}

/* ============================================================================
   TRANSCRIPT AUDIT STYLES
   ============================================================================ */

/* Container and Card */
.audit-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* Introduction panel */
.audit-hero {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
}

.audit-hero__logo {
    max-width: 480px !important;
    width: 100% !important;
    height: auto !important;
}

.audit-intro {
    background: #e8f4f8;
    border: 1px solid #0078b4;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.audit-intro__heading {
    margin: 0 0 var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: #0569A5;
    line-height: 1.3;
    text-align: center;
}

.audit-intro__lead {
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin: 0 0 var(--spacing-md);
    color: #2d3748;
}

.audit-intro__subheading {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 var(--spacing-xs);
}

.audit-intro__list {
    margin: 0 0 var(--spacing-md);
    padding-left: var(--spacing-lg);
    color: #2d3748;
    font-size: var(--font-size-base);
}

.audit-intro__list li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.5;
}

.audit-intro__tip {
    margin: 0 0 var(--spacing-md);
    font-size: var(--font-size-sm);
    color: #3d4d58;
    background: #e8f4f8;
    border-left: 3px solid #0EA2DA;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.audit-intro__note {
    margin: var(--spacing-lg) 0 0;
    font-size: var(--font-size-sm);
    color: #595959;
    font-style: italic;
}

.audit-intro__nysaa {
    margin: var(--spacing-sm) 0 var(--spacing-lg);
    font-size: var(--font-size-sm);
    color: #3d4d58;
    border-top: 1px solid #e0e0e0;
    padding-top: var(--spacing-sm);
    line-height: 1.5;
}

.audit-intro__footer {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid #e0e0e0;
    text-align: center;
}


.audit-card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Header */
.audit-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid #0EA2DA;
}

.audit-title {
    font-family: var(--font-family-body);
    font-size: var(--font-size-3xl);
    color: #0569A5;
    margin: 0 0 var(--spacing-sm) 0;
}

.audit-subtitle {
    font-family: var(--font-family-body);
    font-size: var(--font-size-lg);
    color: #595959;
    margin: 0;
}

/* Instructions */
.audit-instructions {
    background-color: #e8f4f8;
    border-left: 4px solid #1976d2;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
    border-radius: var(--radius-md);
}

.collab-app .audit-instructions h2 {
    font-family: var(--font-family-body);
    font-size: var(--font-size-lg);
    color: #0569A5;
    margin: 0 0 var(--spacing-md) 0;
}

.collab-app .audit-instructions ol {
    margin: 0;
    padding-left: var(--spacing-xl);
    color: #3d4d58;
    line-height: 1.3;
    font-size: var(--font-size-base);
}

.collab-app .audit-instructions li {
    margin-bottom: var(--spacing-xs);
}

/* Sections */
.audit-section {
    margin-bottom: var(--spacing-2xl);
}

.audit-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid #e0e0e0;
}

.collab-app .audit-section-header h2 {
    font-family: var(--font-family-header);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #0569A5;
    letter-spacing: 0;
    margin: 0;
}

/* Tables */
.audit-table-wrapper {
    border-radius: var(--radius-md);
    border: 1px solid #004d7a;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.audit-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background-color: #ffffff;
}

.collab-app .audit-table thead {
    background-color: #0569A5 !important;
    color: #ffffff !important;
}

.collab-app .audit-table th {
    font-family: var(--font-family-body);
    font-size: var(--font-size-sm);
    padding: var(--spacing-sm) var(--spacing-xs);
    text-align: center;
    font-weight: 600;
    border: 1px solid #004d7a;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background-color: #0569A5 !important;
    color: #ffffff !important;
}

.audit-table tbody tr {
    border-bottom: 1px solid #004d7a;
    transition: background-color var(--transition-base);
}

.audit-table tbody tr:hover {
    background-color: #f5f5f5;
}

.collab-app .audit-table td {
    padding: var(--spacing-xs);
    vertical-align: middle;
    text-align: center;
    border: 1px solid #004d7a;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Incomplete row highlight */
tr.row-incomplete td {
    background: var(--color-error-bg) !important;
    border-color: var(--color-error-dark) !important;
}

tr.row-incomplete td:first-child {
    border-left: 4px solid var(--color-error-dark) !important;
}

/* Table-level validation error message */
.table-validation-error {
    color: #c0392b;
    font-size: 13px;
    font-weight: 600;
    margin: var(--spacing-sm) 0;
    padding: var(--spacing-sm) var(--spacing-md);
    background: #fff0ee;
    border: 1px solid #f5c6c2;
    border-radius: 6px;
}

/* Percentage-based column widths for fixed layout */
.collab-app .audit-table th:nth-child(1),
.collab-app .audit-table td:nth-child(1) {
    width: 12%; /* School Year */
}

.collab-app .audit-table th:nth-child(2),
.collab-app .audit-table td:nth-child(2) {
    width: 25%; /* Class Name / Exam */
}

.collab-app .audit-table th:nth-child(3),
.collab-app .audit-table td:nth-child(3) {
    width: 18%; /* Type / Taken */
}

.collab-app .audit-table th:nth-child(4),
.collab-app .audit-table td:nth-child(4) {
    width: 10%; /* Credits / Grade */
}

.collab-app .audit-table th:nth-child(5),
.collab-app .audit-table td:nth-child(5) {
    width: 12%; /* Pass/Fail */
}

.collab-app .audit-table th:nth-child(6),
.collab-app .audit-table td:nth-child(6) {
    width: 13%; /* Actions */
}

/* Regents table column widths */
#regentsTable th:nth-child(1),
#regentsTable td:nth-child(1) { width: 50%; } /* Exam */
#regentsTable th:nth-child(2),
#regentsTable td:nth-child(2) { width: 12%; } /* Grade */
#regentsTable th:nth-child(3),
#regentsTable td:nth-child(3) { width: 18%; } /* Pass/Fail */
#regentsTable th:nth-child(4),
#regentsTable td:nth-child(4) { width: 18%; } /* Actions */

/* Form Inputs */
.collab-app .audit-input,
.collab-app .audit-select {
    width: 100%;
    max-width: 100%;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid #dddddd;
    border-radius: var(--radius-sm);
    font-family: var(--font-family-body);
    font-size: 16px; /* 16px prevents iOS Safari auto-zoom on focus */
    color: #3d4d58;
    background-color: #ffffff;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    box-sizing: border-box;
}

.collab-app .audit-input:focus,
.collab-app .audit-select:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 157, 220, 0.2);
}

.collab-app .audit-input:disabled,
.collab-app .audit-select:disabled {
    background-color: #f5f5f5;
    color: #595959;
    cursor: not-allowed;
}

/* Buttons */
.audit-button {
    font-family: var(--font-family-body);
    font-size: var(--font-size-base);
    padding: var(--spacing-sm) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 600;
}

.audit-button-primary {
    background-color: #0569A5;
    color: #ffffff;
}

.audit-button-primary:hover {
    background-color: #0569A5;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.audit-button-primary:active {
    transform: translateY(0);
}

.audit-button-secondary {
    background-color: #f8f9fa;
    color: #3d4d58;
    border: 1px solid #dddddd;
}

.audit-button-secondary:hover {
    background-color: #e0e0e0;
    border-color: #cccccc;
}

.audit-button-small {
    font-size: var(--font-size-base);
    padding: var(--spacing-xs) var(--spacing-md);
}

.audit-button-large {
    font-size: var(--font-size-lg);
    padding: 14px 32px;
}

.regent-exempt-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
    cursor: pointer;
    white-space: nowrap;
}

.regent-exempt-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.audit-button-delete {
    background: #F06236;
    border: 1px solid #F06236;
    color: #ffffff;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-base), transform var(--transition-base);
    white-space: nowrap;
}

.audit-button-delete:hover,
.audit-button-delete:focus {
    background-color: #d4400f;
    border-color: #d4400f;
    transform: translateY(-1px);
}

/* Add row buttons (Add Class, Add Regent) */
#addClassBtn,
#addRegentBtn {
    background: #0569A5;
    border-color: #0569A5;
    color: #ffffff;
}

#addClassBtn:hover,
#addClassBtn:focus,
#addRegentBtn:hover,
#addRegentBtn:focus {
    background: #0569A5;
    border-color: #0569A5;
}

/* Action Buttons */
.audit-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin: var(--spacing-2xl) 0;
}

/* Loading */
.audit-loading {
    text-align: center;
    padding: var(--spacing-2xl);
}

.audit-spinner {
    border: 4px solid #e0e0e0;
    border-top: 4px solid #0EA2DA;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    margin: 0 auto var(--spacing-md);
    animation: audit-spin 1s linear infinite;
}

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

.collab-app .audit-loading p {
    color: #595959;
    font-size: var(--font-size-lg);
}

/* Results */
.audit-results {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-2xl);
    background-color: #f5f5f5;
    border-radius: var(--radius-lg);
    border: 2px solid #0EA2DA;
}

.audit-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid #e0e0e0;
}

.collab-app .audit-results-header h2 {
    font-family: var(--font-family-body);
    font-size: var(--font-size-lg);
    color: #0569A5;
    margin: 0;
}

.audit-results-header__logo {
    height: 48px;
    width: auto;
}

.audit-results-header .audit-button {
    background: #0569A5;
    color: #ffffff;
    border-color: #0569A5;
}

.audit-results-header .audit-button:hover,
.audit-results-header .audit-button:focus {
    background: #0569A5;
    border-color: #0569A5;
}

.audit-results-content {
    line-height: 1.5;
}

.audit-results-content p {
    margin: 0 0 var(--spacing-sm);
    font-size: var(--font-size-base);
    color: #3d4d58;
}

.audit-results-content ul {
    margin: var(--spacing-xs) 0 var(--spacing-md) var(--spacing-lg);
    padding: 0;
    list-style-type: disc;
}

.audit-results-content li {
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-base);
    color: #3d4d58;
}

/* Diploma Section */
.audit-diploma-section {
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.audit-diploma-heading {
    font-family: var(--font-family-body);
    font-size: var(--font-size-base);
    font-weight: 700;
    color: #0569A5;
    margin: 0 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid #e0e0e0;
}

.collab-app .audit-diploma-section h4 {
    font-family: var(--font-family-body);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #2d3748;
    margin: var(--spacing-md) 0 var(--spacing-xs) 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}


/* Success Message */
.audit-success-message {
    color: var(--color-success-dark);
    font-weight: 600;
    font-size: var(--font-size-base);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--color-success-bg);
    border-left: 4px solid var(--color-success);
    border-radius: var(--radius-sm);
    margin: 0;
}

/* Credits Table Row States */
.audit-credits-table {
    width: 100%;
    margin-top: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.audit-credits-table td:nth-child(2),
.audit-credits-table td:nth-child(3),
.audit-credits-table td:nth-child(4),
.audit-credits-table th:nth-child(2),
.audit-credits-table th:nth-child(3),
.audit-credits-table th:nth-child(4) {
    text-align: center;
    width: 80px;
}

.audit-credits-row--met td {
    color: #3d4d58;
}

.audit-credits-row--met td:nth-child(4) {
    color: var(--color-success-dark);
    font-weight: 600;
}

.audit-credits-row--missing td {
    background-color: var(--color-warning-bg);
}

.audit-credits-row--missing td:nth-child(4) {
    color: var(--color-warning-dark);
    font-weight: 700;
}

.audit-credits-row--waived td {
    color: #595959;
    font-style: italic;
}

.audit-credits-waived-label {
    font-size: var(--font-size-xs);
    color: #595959;
}

/* Mismatches Section */
.audit-mismatches-section {
    background-color: var(--color-warning-bg);
    border: 2px solid var(--color-warning);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.collab-app .audit-mismatches-section h3 {
    font-family: var(--font-family-body);
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--color-warning-dark);
    margin: 0 0 var(--spacing-md) 0;
}

.collab-app .audit-mismatches-section ul {
    margin: var(--spacing-xs) 0 0 var(--spacing-lg);
    padding: 0;
    list-style-type: disc;
}

.collab-app .audit-mismatches-section li {
    margin-bottom: var(--spacing-xs);
    color: var(--color-warning-dark);
    font-weight: 500;
}

/* Result section cards — colored variants */
.audit-result-card {
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid #dddddd;
    background: #ffffff;
}

.audit-result-card--info {
    background: #e3f2fd;
    border-color: #1976d2;
}

.audit-result-card--success {
    background: var(--color-success-bg);
    border-color: var(--color-success);
}

.audit-result-card--warning {
    background: var(--color-warning-bg);
    border-color: var(--color-warning);
}

.audit-result-card--error {
    background: var(--color-error-bg);
    border-color: var(--color-error);
}

.audit-result-card--blue {
    background: #e8f4f8;
    border-color: #0078b4;
}

/* Section heading inside a result card — h3 */
.collab-app .audit-result-card h3 {
    font-size: var(--font-size-base);
    font-weight: 700;
    margin: 0 0 var(--spacing-sm);
    color: #2d3748;
}

.audit-result-card--info h3    { color: #0d47a1; }
.audit-result-card--warning h3 { color: var(--color-warning-dark); }
.audit-result-card--error h3   { color: var(--color-error-dark); }
.audit-result-card--blue h3    { color: #0569A5; }

/* Sub-heading h4 inside result cards */
.collab-app .audit-result-card h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #2d3748;
    margin: var(--spacing-md) 0 var(--spacing-xs);
}

/* Muted note text — replaces inline font-size:13px */
.audit-note {
    font-size: var(--font-size-sm);
    color: #595959;
    margin: 0 0 var(--spacing-sm);
}

.audit-note--xs {
    font-size: var(--font-size-xs);
    color: #595959;
    margin: 0;
}

/* Status badge pill */
.audit-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-xl);
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: #fff;
    vertical-align: middle;
}

.audit-badge--success { background: var(--color-success-dark); }
.audit-badge--warning { background: var(--color-warning-dark); }
.audit-badge--error   { background: var(--color-error-dark); }
.audit-badge--muted   { background: #595959; }

/* NYSSB criteria table */
.audit-nyssb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-md);
}

.audit-nyssb-table th {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    font-size: var(--font-size-xs);
    color: #595959;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.audit-nyssb-table td {
    padding: 6px 10px;
    vertical-align: top;
}

.audit-nyssb-table td:last-child {
    font-size: var(--font-size-xs);
    color: #595959;
}

.audit-nyssb-table tr.confirmed {
    background: var(--color-success-bg);
}

.audit-nyssb-table .nyssb-icon {
    font-weight: 600;
    text-align: center;
}

.audit-nyssb-table .nyssb-icon--confirmed { color: var(--color-success-dark); }
.audit-nyssb-table .nyssb-icon--pending   { color: #595959; }

/* Inline callout bar (combined concern, etc.) */
.audit-callout {
    padding: var(--spacing-sm) var(--spacing-md);
    border-left: 3px solid var(--color-error);
    background: var(--color-error-bg);
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--color-error-dark);
    margin: var(--spacing-sm) 0 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Error Message */
.audit-error-message {
    background-color: var(--color-error-bg);
    border: 2px solid var(--color-error);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.audit-error-heading {
    font-family: var(--font-family-body);
    font-size: var(--font-size-base);
    color: var(--color-error-dark);
    margin: 0 0 var(--spacing-sm) 0;
}

.audit-error-details {
    color: #2d3748;
    font-size: var(--font-size-base);
    margin: 0 0 var(--spacing-sm) 0;
}

.audit-error-help {
    color: #595959;
    font-size: var(--font-size-base);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .audit-container {
        padding: var(--spacing-md);
    }

    .audit-card {
        padding: var(--spacing-lg);
    }

    .audit-title {
        font-size: var(--font-size-2xl);
    }

    .audit-subtitle {
        font-size: var(--font-size-base);
    }

    .audit-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .audit-table-wrapper {
        font-size: var(--font-size-base);
    }

    .audit-table th,
    .audit-table td {
        padding: var(--spacing-xs);
    }

    .audit-actions {
        flex-direction: column;
    }

    .audit-button {
        width: 100%;
    }

    .audit-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .audit-results-header .audit-button {
        width: 100%;
    }
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .resource-tile:hover,
    .resource-tile:focus-within {
        transform: none;
    }

    .audit-button-primary:hover {
        transform: none;
    }

    .audit-spinner {
        animation: none;
    }
}

/* ============================================================================
   MLL/ELL IDENTIFICATION TOOL - NYSITELL INTERACTIVE GUIDE
   ============================================================================ */

/* Container */
.ellevation-tree {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    font-family: var(--font-family-body);
    color: #3d4d58;
    line-height: 1.3;
    font-size: var(--font-size-base);
}

/* Page Header */
.ell-page-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid #e0e0e0;
}

.collab-app .ell-page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #3d4d58;
    margin: 0 0 var(--spacing-xs) 0;
    font-family: var(--font-family-body);
}

.collab-app .ell-page-header p {
    font-size: 16px;
    color: #3d4d58;
    margin: 0;
}

/* Sticky Header */
.ell-sticky-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid #0EA2DA;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    z-index: 100;
    margin-bottom: var(--spacing-lg);
}

.ell-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
}

/* Progress Bar */
.ell-progress-container {
    flex: 1;
}

.ell-progress {
    width: 100%;
    height: 20px;
    background-color: #f8f9fa;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid #dddddd;
}

.ell-progress-fill {
    height: 100%;
    background: #0569A5;
    transition: width 0.3s ease;
    width: 0%;
}

.ell-progress-text {
    text-align: center;
    margin-top: 4px;
    font-weight: 600;
    color: #2d3748;
    font-size: var(--font-size-base);
}

/* Steps */
.ell-step {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.collab-app .ell-step h2 {
    font-family: var(--font-family-body);
    color: #2d3748;
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.ell-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #0569A5;
    color: #ffffff;
    border-radius: 50%;
    font-weight: 700;
    font-size: var(--font-size-md);
    flex-shrink: 0;
}

/* Guidelines Boxes */
.ell-guidelines {
    background: var(--color-warning-bg);
    border-left: 3px solid var(--color-warning);
    padding: var(--spacing-sm) var(--spacing-md);
    margin: var(--spacing-md) 0;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
}

.ell-guidelines--blue {
    background: #e3f2fd;
    border-left-color: #0d47a1;
}

.collab-app .ell-guidelines strong {
    color: #2d3748;
    display: inline;
    font-size: var(--font-size-base);
}

.collab-app .ell-guidelines p {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-base);
}

.collab-app .ell-guidelines p:last-child {
    margin-bottom: 0;
}

.collab-app .ell-guidelines ul {
    margin: var(--spacing-xs) 0 0 var(--spacing-md);
    padding: 0;
}

.collab-app .ell-guidelines li {
    margin-bottom: 4px;
    font-size: var(--font-size-base);
}

/* Icons */
.ell-icon-warning,
.ell-icon-info {
    vertical-align: middle;
    margin-right: 6px;
    font-size: var(--font-size-xl);
}

.ell-icon-warning {
    color: var(--color-warning-dark);
}

.ell-icon-info {
    color: #0569A5;
}

.ell-icon-success {
    color: var(--color-success-dark);
    vertical-align: middle;
    margin-right: 4px;
    font-size: 18px;
}

.ell-icon-success-large {
    font-size: 32px;
    color: var(--color-success-dark);
    display: block;
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

/* Question and Section Boxes */
.ell-question-box,
.ell-section-box {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.ell-question-box legend,
.collab-app .ell-section-box p strong {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.ell-section-box--success {
    background: var(--color-success-bg);
    border-left: 3px solid var(--color-success);
}

.collab-app .ell-section-box--success h3 {
    color: var(--color-success-dark);
    margin: 0 0 var(--spacing-sm) 0;
    font-size: var(--font-size-md);
}

.collab-app .ell-section-box--success p {
    color: #2d3748;
    font-size: var(--font-size-base);
}

/* Radio Buttons */
.ell-radio-label {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    margin: var(--spacing-xs) 0;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: var(--font-size-base);
}

.ell-radio-label:hover {
    border-color: #0569A5;
    background: #f5f5f5;
}

.collab-app .ell-radio-label input[type="radio"] {
    margin-right: var(--spacing-sm);
}

.ell-radio-sublabel {
    display: block;
    margin-left: 20px;
    margin-top: 4px;
    color: #595959;
    font-size: var(--font-size-base);
}

/* Proficiency Level Labels */
.ell-proficiency-label {
    display: block;
    padding: var(--spacing-md);
    margin: var(--spacing-sm) 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.ell-proficiency-label--commanding {
    background-color: var(--color-success-bg);
    border-color: var(--color-success-dark);
}

.ell-proficiency-label--commanding:hover {
    background-color: #c8e6c9;
}

.ell-proficiency-label--mll {
    background-color: var(--color-warning-bg);
    border-color: var(--color-warning-dark);
}

.ell-proficiency-label--mll:hover {
    background-color: #ffe8a1;
}

.ell-proficiency-sublabel {
    display: inline-block;
    margin-left: 25px;
    font-size: var(--font-size-base);
}

.ell-proficiency-label--commanding .ell-proficiency-sublabel {
    color: var(--color-success-dark);
}

.ell-proficiency-label--mll .ell-proficiency-sublabel {
    color: var(--color-warning-dark);
}

.ell-proficiency-link {
    display: inline-block;
    margin-left: 25px;
    font-size: var(--font-size-base);
}

/* Checkboxes */
.ell-checkbox-label {
    display: block;
    padding: var(--spacing-xs) 0;
    margin: var(--spacing-xs) 0;
    cursor: pointer;
    font-size: var(--font-size-base);
}

.collab-app .ell-checkbox-label input[type="checkbox"] {
    margin-right: var(--spacing-sm);
}

.ell-checkbox-sublabel {
    display: block;
    margin-left: 20px;
    margin-top: 2px;
    color: #595959;
    font-size: var(--font-size-base);
}

/* Collapsible Elements */
.ell-collapsible-wrapper {
    margin: var(--spacing-md) 0;
}

.ell-collapsible {
    background-color: #0569A5;
    color: white;
    cursor: pointer;
    padding: var(--spacing-sm) var(--spacing-md);
    width: 100%;
    border: 2px solid #0569A5;
    text-align: left;
    outline: none;
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ell-collapsible:hover {
    background-color: #0088c4;
    border-color: #0088c4;
}

.ell-collapsible:after {
    content: '▼';
    font-size: var(--font-size-base);
    transition: transform 0.2s ease;
    color: white;
}

.ell-collapsible.active {
    background-color: #0088c4;
    border-color: #0088c4;
}

.ell-collapsible.active:after {
    transform: rotate(180deg);
}

.ell-collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #ffffff;
    border: 0 solid #e0e0e0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* Show borders when content is expanded */
.ell-collapsible.active + .ell-collapsible-content {
    border-width: 0 2px 2px 2px;
    border-color: #0569A5;
}

.ell-collapsible-inner {
    padding: var(--spacing-md);
    font-size: var(--font-size-base);
}

.ell-nested-collapsible {
    margin-left: 48px;
    margin-right: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.ell-nested-collapsible .ell-collapsible {
    font-size: var(--font-size-base);
    padding: var(--spacing-sm) var(--spacing-md);
}

.ell-nested-collapsible .ell-collapsible-content {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 32px;
}

/* Extra padding for non-nested collapsible content */
.collab-app .ell-collapsible-content > p,
.collab-app .ell-collapsible-content > ul {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-md);
}

/* Select Dropdown */
.ell-select {
    width: 100%;
    padding: 8px var(--spacing-sm);
    border: 1px solid #dddddd;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-family: var(--font-family-body);
    background-color: #ffffff;
    margin-top: var(--spacing-xs);
}

/* Sample Questions List */
.ell-sample-questions {
    margin: var(--spacing-sm) 0;
    padding-left: 20px;
    font-size: var(--font-size-base);
}

.collab-app .ell-sample-questions li {
    margin-bottom: 6px;
}

/* Language Code List */
.ell-language-list {
    margin: var(--spacing-xs) 0;
    padding-left: 20px;
    font-size: var(--font-size-base);
    list-style-type: none;
}

.collab-app .ell-language-list li {
    margin-bottom: 4px;
    font-family: monospace;
    font-size: var(--font-size-base);
}

/* Scrollable Language List Container */
.ell-scrollable-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    background: #ffffff;
    margin: var(--spacing-xs) 0;
}

/* Scrollbar styling */
.ell-scrollable-list::-webkit-scrollbar {
    width: 8px;
}

.ell-scrollable-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.ell-scrollable-list::-webkit-scrollbar-thumb {
    background: #dddddd;
    border-radius: var(--radius-sm);
}

.ell-scrollable-list::-webkit-scrollbar-thumb:hover {
    background: #0569A5;
}

/* Buttons */
.ell-continue-btn {
    margin-top: var(--spacing-md);
}

.ellevation-tree .collab-button {
    font-size: var(--font-size-base);
    padding: 8px 16px;
}

/* Stop Message */
.ell-stop-message {
    background: var(--color-error-bg);
    border: 2px solid var(--color-error);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.collab-app .ell-stop-message p {
    color: var(--color-error-dark);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

/* Completion Messages */
.ell-complete-message {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--color-success-bg);
    border: 1px solid var(--color-success);
    border-left: 3px solid var(--color-success);
    border-radius: var(--radius-sm);
    text-align: center;
}

.collab-app .ell-complete-message h2,
.collab-app .ell-complete-message h3 {
    color: var(--color-success-dark);
    margin: var(--spacing-sm) 0;
    font-size: var(--font-size-md);
}

.collab-app .ell-complete-message p {
    font-size: var(--font-size-base);
    margin: var(--spacing-sm) 0;
}

/* Footer */
.ell-footer {
    text-align: center;
    padding: var(--spacing-md) 0;
    color: #595959;
    font-size: var(--font-size-base);
    border-top: 1px solid #e0e0e0;
    margin-top: var(--spacing-lg);
}

/* Hidden utility class */
.ellevation-tree .hidden {
    display: none !important;
}

/* Screen reader only content */
.ell-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;
}

/* Enhanced focus indicators */
.collab-app .ellevation-tree button:focus,
.collab-app .ellevation-tree a:focus,
.collab-app .ellevation-tree input:focus,
.collab-app .ellevation-tree select:focus {
    outline: 2px solid #0569A5;
    outline-offset: 2px;
}

.collab-app .ellevation-tree input[type="radio"]:focus,
.collab-app .ellevation-tree input[type="checkbox"]:focus {
    outline: 2px solid #0569A5;
    outline-offset: 1px;
}

/* Ensure legends are visible and properly styled */
.ellevation-tree fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.ellevation-tree legend {
    padding: 0;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: var(--spacing-sm);
}

/* Material Icons Support */
.ellevation-tree .material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

/* Improve color contrast for sublabels */
.ell-radio-sublabel,
.ell-checkbox-sublabel {
    color: #595959;
}

/* Better contrast for proficiency sublabels */
.ell-proficiency-label--mll .ell-proficiency-sublabel {
    color: #664d03;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ellevation-tree {
        padding: var(--spacing-md);
    }

    .ell-header-content {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .ell-progress-container {
        width: 100%;
        max-width: 100%;
    }

    .ell-step {
        padding: var(--spacing-md);
    }

    .ell-step h2 {
        font-size: var(--font-size-xl);
        flex-direction: column;
        align-items: flex-start;
    }

    .ell-nested-collapsible {
        margin-left: 0;
        max-width: 100%;
    }

    .ell-radio-label,
    .ell-proficiency-label,
    .ell-checkbox-label {
        padding: var(--spacing-sm);
    }
}

@media print {
    .ell-sticky-header {
        position: static;
    }

    .ell-collapsible-content {
        max-height: none !important;
        display: block !important;
    }
}

/* ==========================================================================
   CALENDAR COMPONENT
   ========================================================================== */

/**
 * Calendar Welcome Text
 * Optional introductory text above the calendar
 */
.collab-calendar-welcome {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-bg-muted);
    border-left: 4px solid #0EA2DA;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    line-height: 1.3;
    color: #3d4d58;
}

.collab-app .collab-calendar-welcome p:last-child {
    margin-bottom: 0;
}

/**
 * Calendar Wrapper
 * Container for the entire calendar application
 * Width is dynamic - expands to fill available space
 */
.collab-calendar-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

/* Skip link — visible only on keyboard focus */
.collab-calendar-skip-link {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
    padding: 8px 16px;
    background: #0569A5;
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.collab-calendar-skip-link:focus {
    left: var(--spacing-lg);
    top: var(--spacing-lg);
    width: auto;
    height: auto;
    overflow: visible;
}

/**
 * Calendar Main Container
 */
.collab-calendar {
    width: 100%;
    background: var(--color-bg-primary);
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

/**
 * Calendar Header
 * Contains navigation, dropdowns, and Today button
 */
.collab-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-xl);
    background: #F5F5F5;
    color: #2d3748;
}

.collab-calendar__nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #ffffff;
    border: 2px solid transparent;
    border-radius: 0;
    color: #0569A5;
    font-size: var(--font-size-2xl);
    cursor: pointer;
    transition: background-color var(--transition-fast),
                border-color var(--transition-fast),
                color var(--transition-fast);
}

.collab-calendar__nav-btn:hover {
    background: #e3f2fd;
    color: #0569A5;
}

.collab-calendar__nav-btn:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 157, 220, 0.3);
}

.collab-calendar__nav-btn:focus-visible {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 157, 220, 0.3);
}

.collab-calendar__nav-btn:active {
    background: #bbdefb;
}

.collab-calendar__footer-nav {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-xl);
    background: #F5F5F5;
    border-top: 1px solid #e0e0e0;
}

.collab-calendar__footer-nav .collab-calendar__nav-btn {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
}

/**
 * Calendar Dropdowns
 */
.collab-calendar__selectors {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.collab-calendar__select {
    padding: var(--spacing-sm) var(--spacing-md);
    padding-right: var(--spacing-xl);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--font-size-lg);
    font-weight: 600;
    font-family: var(--font-family-body);
    color: #2d3748;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23455560' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color var(--transition-fast),
                box-shadow var(--transition-fast);
}

.collab-calendar__select:hover {
    border-color: #0569A5;
}

.collab-calendar__select:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 102, 164, 0.2);
}

.collab-calendar__select--month {
    min-width: 140px;
}

.collab-calendar__select--year {
    min-width: 90px;
}

/**
 * Today Button in Header
 */
.collab-calendar__today-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: #CBE2F5;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: var(--font-family-body);
    color: #044f80;
    cursor: pointer;
    transition: background-color var(--transition-fast),
                border-color var(--transition-fast),
                transform var(--transition-fast);
}

.collab-calendar__today-btn:hover {
    background: #ffffff;
    border-color: #BCC3C8;
    transform: scale(1.02);
}

.collab-calendar__today-btn:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 102, 164, 0.2);
}

.collab-calendar__today-btn:active {
    transform: scale(0.98);
}

/**
 * Calendar Grid - 5 columns for weekdays only
 */
.collab-calendar__grid {
    width: 100%;
    padding: var(--spacing-lg);
    box-sizing: border-box;
    background: #f0f4f8;
    border-radius: 4px;
}

/**
 * Weekday Headers - Monday through Friday only
 */
.collab-calendar__weekdays {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.collab-calendar__weekday {
    padding: var(--spacing-md);
    text-align: center;
    font-size: var(--font-size-base);
    font-weight: 700;
    color: #2F4B59;
    background: #8CC3EA;
    border: none;
    border-radius: 4px;
}

/**
 * Calendar Days Container - whitespace gaps between cells
 */
.collab-calendar__days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

/**
 * Calendar Day Cell
 */
.collab-calendar__day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100px;
    padding: var(--spacing-sm);
    padding-top: var(--spacing-md);
    background: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: #3d4d58;
    cursor: pointer;
    transition: background-color var(--transition-fast),
                border-color var(--transition-fast),
                color var(--transition-fast);
}

.collab-calendar__day:hover:not(.collab-calendar__day--empty) {
    background: #e3f2fd;
    border-color: #0569A5;
}

.collab-calendar__day:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 102, 164, 0.2);
    z-index: 1;
}

.collab-calendar__day:focus-visible {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 102, 164, 0.2);
    z-index: 1;
}

/**
 * Empty Day Cell
 */
.collab-calendar__day--empty {
    background: var(--color-bg-muted);
    border-color: #e0e0e0;
    cursor: default;
    pointer-events: none;
}

/**
 * Today's Date - Blue highlight
 */
.collab-calendar__day--today {
    background: #CBE2F5;
    border-color: #044f80;
    border-width: 2px;
    color: #044f80;
    font-weight: 700;
}

.collab-calendar__day--today:hover {
    background: #b8d4ed;
    border-color: #044f80;
}

.collab-calendar__day--today:focus,
.collab-calendar__day--today:focus-visible {
    border-color: #004d7a;
    box-shadow: 0 0 0 3px rgba(0, 157, 220, 0.3);
}

/**
 * Overflow Days (next month's days to complete grid)
 * Using --color-text-medium for better contrast (WCAG AA)
 */
.collab-calendar__day--overflow {
    background: var(--color-bg-muted);
    border-color: #e0e0e0;
    color: #3d4d58;
    cursor: default;
    pointer-events: none;
}

/**
 * Day Number
 */
.collab-calendar__day-number {
    line-height: 1;
    font-weight: 700;
}

/**
 * Calendar Responsive Adjustments
 */
@media (max-width: 768px) {
    .collab-calendar-wrapper {
        padding: var(--spacing-md);
    }

    .collab-calendar__header {
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }

    .collab-calendar__selectors {
        flex-wrap: wrap;
        justify-content: center;
    }

    .collab-calendar__select {
        font-size: var(--font-size-base);
        padding: var(--spacing-xs) var(--spacing-md);
        padding-right: var(--spacing-lg);
    }

    .collab-calendar__select--month {
        min-width: 110px;
    }

    .collab-calendar__grid {
        padding: var(--spacing-md);
    }

    .collab-calendar__day {
        min-height: 80px;
        font-size: var(--font-size-lg);
    }

    .collab-calendar__weekday {
        padding: var(--spacing-sm);
        font-size: var(--font-size-base);
    }
}

@media (max-width: 480px) {
    .collab-calendar__header {
        flex-wrap: wrap;
        padding: var(--spacing-sm);
    }

    /* Maintain 44px minimum for touch targets */
    .collab-calendar__nav-btn {
        width: 44px;
        height: 44px;
        font-size: var(--font-size-xl);
    }

    .collab-calendar__selectors {
        width: 100%;
        order: 3;
        justify-content: center;
        margin-top: var(--spacing-xs);
    }

    .collab-calendar__grid {
        padding: var(--spacing-sm);
    }

    .collab-calendar__days {
        gap: 4px;
    }

    .collab-calendar__weekdays {
        gap: 4px;
    }

    .collab-calendar__day {
        min-height: 60px;
        font-size: var(--font-size-base);
    }

    .collab-calendar__weekday {
        padding: var(--spacing-xs);
        font-size: var(--font-size-base);
    }
}

@media (max-width: 400px) {
    /* Very small phones: cells too narrow for event text — show dot indicators */
    .collab-calendar__event {
        padding: 0;
        min-height: 8px;
        height: 8px;
        border-radius: 50%;
        width: 8px;
        margin: 2px auto 0;
        overflow: hidden;
    }

    .collab-calendar__event-name,
    .collab-calendar__event-tags,
    .collab-calendar-grade-badges {
        display: none;
    }

    .collab-calendar__day {
        min-height: 48px;
        align-items: center;
        padding: var(--spacing-xs);
    }
}

/**
 * Calendar Reduced Motion
 */
@media (prefers-reduced-motion: reduce) {
    .collab-calendar__day,
    .collab-calendar__nav-btn,
    .collab-calendar__today-btn,
    .collab-calendar__select {
        transition: none;
    }
}

/**
 * Calendar Events
 * Box style with full title visible and space for tags
 * Minimum font size 14px for readability
 */
.collab-calendar__event {
    display: block;
    width: 100%;
    margin-top: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: #e3f2fd;
    border: 1px solid #E2E6E9;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: var(--font-family-body);
    color: #2F4B59;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast),
                transform var(--transition-fast),
                box-shadow var(--transition-fast);
    /* Allow text to wrap for full title visibility */
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    /* Ensure minimum touch target */
    min-height: 44px;
}

.collab-calendar__event:hover {
    background: #2F4B59;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.collab-calendar__event:focus {
    outline: none;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #0569A5;
    background: #e3f2fd;
}

.collab-calendar__event:active {
    background: #bbdefb;
    transform: translateY(0);
}

/* Series events use same style */
.collab-calendar__event--series {
    background: #e3f2fd;
}

/* Past events - gray styling with accessible contrast */
.collab-calendar__event--past {
    background: #e8e8e8;
    border-color: #9e9e9e;
    color: #2d3748;
}

.collab-calendar__event--past:hover {
    background: #d0d0d0;
}

.collab-calendar__event--past:focus {
    box-shadow: 0 0 0 2px white, 0 0 0 4px #9e9e9e;
    background: #e0e0e0;
}

.collab-calendar__event--past:active {
    background: #d0d0d0;
}

.collab-calendar__event-name {
    display: block;
    /* Allow full title to show */
    white-space: normal;
    word-wrap: break-word;
}

/* Grade badges in calendar events */
.collab-calendar-grade-badges {
    display: inline-flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-left: 6px;
    vertical-align: middle;
}

.collab-calendar-grade-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.collab-calendar-grade-badge.grade-badge-elementary {
    background: var(--color-badge-elementary);
    color: var(--color-badge-elementary-text);
}

.collab-calendar-grade-badge.grade-badge-middle {
    background: var(--color-badge-middle);
    color: var(--color-badge-middle-text);
}

.collab-calendar-grade-badge.grade-badge-high {
    background: var(--color-badge-high);
    color: var(--color-badge-high-text);
}

/* Space for future tags */
.collab-calendar__event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: var(--spacing-xs);
}

/**
 * Calendar Event Modal
 */
.collab-calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.collab-calendar-modal--active {
    display: flex;
}

.collab-calendar-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.collab-calendar-modal__content {
    position: relative;
    z-index: 2;
    width: calc(100% - 40px);
    max-width: 1200px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.collab-calendar-modal__close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    color: #595959;
    cursor: pointer;
    transition: color var(--transition-fast),
                border-color var(--transition-fast),
                background-color var(--transition-fast);
}

.collab-calendar-modal__close:hover {
    color: #2d3748;
    background: var(--color-bg-muted);
}

.collab-calendar-modal__close:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 157, 220, 0.3);
}

.collab-calendar-modal__body {
    padding: var(--spacing-xl);
    overflow-y: auto;
}

.collab-calendar-modal__title {
    margin: 0 0 var(--spacing-lg);
    padding-right: var(--spacing-xl);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
}

.collab-calendar-modal__meta {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--color-bg-muted);
    border-radius: var(--radius-md);
}

/**
 * Calendar Modal Action Buttons
 */
.collab-calendar-modal__actions {
    margin-bottom: var(--spacing-lg);
}

.collab-calendar-modal__actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.collab-calendar-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: 44px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--font-size-lg);
    font-weight: 600;
    font-family: var(--font-family-body);
    cursor: pointer;
    transition: background-color var(--transition-fast),
                border-color var(--transition-fast),
                color var(--transition-fast),
                transform var(--transition-fast);
}

.collab-calendar-modal__btn:hover {
    transform: translateY(-1px);
}

.collab-calendar-modal__btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 157, 220, 0.3);
}

.collab-calendar-modal__btn:active {
    transform: translateY(0);
}

.collab-calendar-modal__btn--primary {
    background: #0569A5;
    color: white;
}

.collab-calendar-modal__btn--primary:hover {
    background: #0569A5;
}

.collab-calendar-modal__btn--secondary {
    background: #ffffff;
    border-color: #0569A5;
    color: #0569A5;
}

.collab-calendar-modal__btn--secondary:hover {
    background: #e3f2fd;
    border-color: #0569A5;
    color: #0569A5;
}

/* Disabled button state for past events */
.collab-calendar-modal__btn:disabled,
.collab-calendar-modal__btn--disabled {
    background: #e0e0e0;
    border-color: #bdbdbd;
    color: #9e9e9e;
    cursor: not-allowed;
}

.collab-calendar-modal__btn:disabled:hover,
.collab-calendar-modal__btn--disabled:hover {
    transform: none;
    background: #e0e0e0;
}

/* Tooltip wrapper for disabled buttons */
.collab-calendar-modal__btn-wrapper {
    position: relative;
    display: inline-block;
}

.collab-calendar-modal__btn-wrapper--disabled {
    cursor: not-allowed;
}

.collab-calendar-modal__btn-wrapper--disabled .collab-calendar-modal__btn {
    pointer-events: none;
}

.collab-calendar-modal__btn-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 8px;
    transition: opacity 0.2s, visibility 0.2s;
}

.collab-calendar-modal__btn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.collab-calendar-modal__btn-wrapper--disabled:hover .collab-calendar-modal__btn-tooltip,
.collab-calendar-modal__btn-wrapper--disabled:focus-within .collab-calendar-modal__btn-tooltip {
    visibility: visible;
    opacity: 1;
}

@media (hover: none) {
    /* Touch devices: show tooltip inline below the button instead of as a floating tooltip */
    .collab-calendar-modal__btn-tooltip {
        visibility: visible;
        opacity: 1;
        position: static;
        transform: none;
        background: none;
        color: #595959;
        font-size: var(--font-size-sm);
        padding: 4px 0 0;
        border-radius: 0;
        margin-bottom: 0;
        white-space: normal;
        display: block;
    }
    .collab-calendar-modal__btn-tooltip::after {
        display: none;
    }
}

.collab-calendar-modal__meta-item {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-lg);
    color: #3d4d58;
    line-height: 1.3;
}

.collab-calendar-modal__meta-item:last-child {
    margin-bottom: 0;
}

.collab-app .collab-calendar-modal__meta-item strong {
    color: #2d3748;
}

.collab-app .collab-calendar-modal__meta-item a {
    color: #0569A5;
    text-decoration: none;
}

.collab-app .collab-calendar-modal__meta-item a:hover {
    text-decoration: underline;
}

.collab-calendar-modal__meta-hint {
    font-size: var(--font-size-base);
    font-style: italic;
    margin-bottom: var(--spacing-sm);
}

.collab-app .collab-calendar-modal__meta-hint a {
    color: #0569A5;
    text-decoration: none;
}

.collab-app .collab-calendar-modal__meta-hint a:hover {
    text-decoration: underline;
}

.collab-calendar-modal__description {
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: #3d4d58;
}

.collab-app .collab-calendar-modal__description p {
    margin: 0 0 var(--spacing-xs);
}

.collab-app .collab-calendar-modal__description p:last-child {
    margin-bottom: 0;
}

.collab-calendar-modal__series {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid #e0e0e0;
}

.collab-app .collab-calendar-modal__series p {
    margin: 0 0 var(--spacing-sm);
    font-size: var(--font-size-lg);
    color: #3d4d58;
}

.collab-calendar-modal__loading {
    font-style: italic;
    color: #595959;
}

.collab-calendar-modal__parts-list {
    list-style: none;
    margin: var(--spacing-sm) 0 0;
    padding: 0;
}

.collab-calendar-modal__part {
    margin-bottom: var(--spacing-xs);
}

.collab-calendar-modal__part--current {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    min-height: 44px;
    background: #e3f2fd;
    border-radius: var(--radius-md);
    border-left: 4px solid #0EA2DA;
}

.collab-calendar-modal__part--current .collab-calendar-modal__part-name {
    font-size: var(--font-size-lg);
}

.collab-calendar-modal__part--current .collab-calendar-modal__part-date {
    font-size: var(--font-size-base);
}

.collab-calendar-modal__part-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
    padding: var(--spacing-md);
    min-height: 44px;
    background: var(--color-bg-muted);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-family-body);
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast),
                border-color var(--transition-fast);
}

.collab-calendar-modal__part-link:hover {
    background: #e3f2fd;
    border-color: #0569A5;
}

.collab-calendar-modal__part-link:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 157, 220, 0.3);
}

.collab-calendar-modal__part-name {
    flex: 1;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: #2d3748;
}

.collab-calendar-modal__part-date {
    font-size: var(--font-size-base);
    color: #595959;
}

.collab-calendar-modal__part-viewing {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: #0569A5;
}

/**
 * Calendar Modal Responsive
 */
@media (max-width: 600px) {
    .collab-calendar-modal {
        padding: var(--spacing-sm);
    }

    .collab-calendar-modal__body {
        padding: var(--spacing-lg);
    }

    .collab-calendar-modal__title {
        font-size: var(--font-size-xl);
    }
}

/**
 * Calendar Print Styles
 */
@media print {
    .collab-calendar__header {
        background: #2d3748;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .collab-calendar__nav-btn,
    .collab-calendar__today-btn {
        display: none;
    }

    .collab-calendar__day--today,
    .collab-calendar__day--selected {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .collab-calendar-modal {
        display: none !important;
    }
}

/* ============================================================================
   CALENDAR FILTER PANEL
   ============================================================================ */

.collab-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    padding: 10px 0;
    margin-bottom: 8px;
}

.collab-calendar-filters {
    position: relative;
}

.collab-calendar-filters__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    color: #0569A5;
    border: 1.5px solid #0569A5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collab-calendar-filters__toggle:hover,
.collab-calendar-filters__toggle[aria-expanded="true"] {
    background: #0569A5;
    color: white;
}

.collab-calendar-filters__toggle:focus-visible {
    outline: 3px solid #0569A5;
    outline-offset: 2px;
}

.collab-calendar-filters__toggle-icon {
    font-size: 16px;
}

.collab-calendar-filters__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #0569A5;
    color: white;
    border-radius: 10px;
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.collab-calendar-filters__count:empty {
    display: none;
}

.collab-calendar-filters__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(320px, calc(100vw - 40px));
    max-height: 70vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.collab-calendar-filters__panel[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.collab-calendar-filters__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
}

.collab-calendar-filters__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.collab-calendar-filters__clear {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: var(--color-text-medium, #666);
    cursor: pointer;
    transition: all 0.2s ease;
}

.collab-calendar-filters__clear:hover {
    background: #f5f5f5;
    border-color: #bdbdbd;
}

.collab-calendar-filters__clear:focus-visible {
    outline: 3px solid #0569A5;
    outline-offset: 2px;
}

.collab-calendar-filters__groups {
    padding: 16px 20px;
}

.collab-calendar-filters__group {
    margin-bottom: 20px;
}

.collab-calendar-filters__group:last-child {
    margin-bottom: 0;
}

.collab-calendar-filters__group--toggle {
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.collab-calendar-filters__option--toggle {
    font-weight: 600;
}

.collab-calendar-filters__option--toggle .collab-calendar-filters__option-label {
    font-weight: 600;
    color: #0569A5;
}

.collab-calendar-filters__group-title {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.collab-calendar-filters__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.collab-calendar-filters__option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.collab-app .collab-calendar-filters__option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #0569A5;
}

.collab-calendar-filters__option-label {
    font-size: 14px;
    color: #2d3748;
}

.collab-calendar-filters__option-count {
    margin-left: auto;
    font-size: var(--font-size-xs);
    color: var(--color-text-light, #999);
}

.collab-calendar-filters__empty {
    padding: 20px;
    text-align: center;
    color: var(--color-text-medium, #666);
    font-size: 14px;
}

/* ============================================================================
   CALENDAR VIEW TOGGLE
   ============================================================================ */

.collab-calendar-views {
    display: flex;
    gap: 8px;
}

.collab-calendar-views__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-medium, #666);
    cursor: pointer;
    transition: all 0.2s ease;
}

.collab-calendar-views__btn:hover {
    background: #e3f0f8;
    border-color: #0569A5;
    color: #0569A5;
}

.collab-calendar-views__btn:focus-visible {
    outline: 3px solid #0569A5;
    outline-offset: 2px;
}

.collab-calendar-views__btn--active {
    background: #0569A5;
    border-color: #0569A5;
    color: white;
}

.collab-calendar-views__btn--active:hover {
    background: #044f80;
    border-color: #004a7d;
}

/* ============================================================================
   SHARED CALENDAR HEADER
   Shared navigation that works for both calendar and list views
   ============================================================================ */

.collab-calendar__header--shared {
    border-radius: var(--radius-lg);
    margin-bottom: 0;
}

/* ============================================================================
   CALENDAR LIST VIEW
   ============================================================================ */

.collab-calendar-list {
    background: var(--color-bg-primary, white);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--color-text-medium, #666);
    border-top: none;
}

.collab-calendar-list__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md, 16px);
    padding: var(--spacing-lg, 20px) var(--spacing-xl, 24px);
    background: linear-gradient(135deg, #0569A5 0%, #044f80 100%);
    color: white;
}

.collab-calendar-list__content {
    padding: 0;
}

.collab-calendar-list__empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-text-medium, #666);
    font-size: 15px;
}

.collab-calendar-list__group {
    border-bottom: 1px solid var(--color-text-medium, #666);
}

.collab-calendar-list__group:last-child {
    border-bottom: none;
}

.collab-calendar-list__date-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #e3f2fd;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: #2d3748;
}

.collab-calendar-list__date-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #0569A5;
    color: white;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
}

.collab-calendar-list__date-header--today {
    background: #e3f2fd;
}

.collab-calendar-list__date-header--today .collab-calendar-list__date-day {
    background: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 157, 220, 0.3);
}

.collab-calendar-list__date-header--past .collab-calendar-list__date-day {
    background: var(--color-text-medium, #666);
}

.collab-calendar-list__date-info {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0;
}

.collab-calendar-list__date-text {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}

.collab-calendar-list__events {
    padding: 0;
}

.collab-calendar-list__event {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.15s ease;
    background: var(--color-bg-primary, white);
    width: 100%;
    text-align: left;
    font-family: var(--font-family-body);
    color: inherit;
    border-left: none;
    border-right: none;
    border-top: none;
    border-radius: 0;
}

.collab-calendar-list__event:focus-visible {
    outline: 3px solid #0569A5;
    outline-offset: -3px;
}

.collab-calendar-list__event:last-child {
    border-bottom: none;
}

.collab-calendar-list__event:hover {
    background: #e3f2fd;
}

.collab-calendar-list__event--past {
    background: var(--color-bg-muted, #f5f5f5);
}

.collab-calendar-list__event--past:hover {
    background: #eeeeee;
}

.collab-calendar-list__event-time {
    flex-shrink: 0;
    min-width: 140px;
    font-size: 14px;
    font-weight: 600;
    color: #0569A5;
}

.collab-calendar-list__event--past .collab-calendar-list__event-time {
    color: #3d4d58;
}

.collab-calendar-list__event-details {
    flex: 1;
    min-width: 0;
}

.collab-calendar-list__event-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.collab-calendar-list__event-name {
    display: block;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary, #333);
}

.collab-calendar-list__event:hover .collab-calendar-list__event-name {
    color: #0569A5;
}

/* Grade badges in list view - same size as calendar view */
.collab-calendar-list__event .collab-calendar-grade-badges {
    margin-left: 0;
}

.collab-calendar-list__event-venue {
    font-size: 13px;
    color: var(--color-text-medium, #666);
}

.collab-calendar-list__event-grades {
    margin-top: 6px;
}

.collab-calendar-list__event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.collab-calendar-list__event-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #0569A5;
}

.collab-calendar-list__event-tag--series {
    background: #bbdefb;
    color: #0569A5;
}

.collab-calendar-list__event-tag--titleiii {
    background: #c8e6c9;
    color: #2e7d32;
}

/* Responsive adjustments for filters */
@media (max-width: 768px) {
    .collab-calendar-filters {
        position: static;
        margin-bottom: 16px;
    }

    .collab-calendar-filters__panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        z-index: 1000;
    }

    .collab-calendar-views {
        justify-content: center;
    }

    .collab-calendar-list__header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .collab-calendar-list__event {
        flex-direction: column;
        gap: 8px;
    }

    .collab-calendar-list__event-time {
        width: auto;
    }
}

/**
 * Calendar Accessibility Enhancements
 */

/* Weekday abbreviations for mobile */
.collab-calendar__weekday-abbr {
    display: none;
}

@media (max-width: 600px) {
    .collab-calendar__weekday-full {
        display: none;
    }

    .collab-calendar__weekday-abbr {
        display: inline;
    }
}

/* Print styles for calendar */
@media print {
    .collab-calendar-wrapper {
        padding: 0;
    }

    .collab-calendar-filters,
    .collab-calendar-views,
    .collab-calendar__nav-btn,
    .collab-calendar__today-btn,
    .collab-calendar-skip-link {
        display: none !important;
    }

    .collab-calendar {
        box-shadow: none;
        border: 1px solid #000;
    }

    .collab-calendar__header {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .collab-calendar__select {
        border: 1px solid #000;
        background: #ffffff !important;
    }

    .collab-calendar__weekday {
        background: #e0e0e0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .collab-calendar__day {
        border: 1px solid #000;
        min-height: 60px;
    }

    .collab-calendar__event {
        background: #f5f5f5 !important;
        border: 1px solid #666;
        font-size: 10px;
        padding: 2px 4px;
        min-height: auto;
    }

    .collab-calendar-modal {
        display: none !important;
    }

    /* List view print styles */
    .collab-calendar-list {
        display: block !important;
    }

    .collab-calendar-list__header {
        display: none !important;
    }

    .collab-calendar-list__event {
        border-bottom: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* ============================================================================
   SHARED BUTTON SYSTEM (.cmp-btn)
   Used by: membership page, membership matchmaker, and any future feature.
   ============================================================================ */

.cmp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-family-body);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    text-decoration: none !important;
    line-height: 1.4;
}

.cmp-btn--primary {
    background: #0569A5;
    color: #fff !important;
}
.cmp-btn--primary:hover {
    background: #0569A5;
    color: #fff !important;
}

.cmp-btn--orange {
    background: #F06236;
    color: #fff !important;
}
.cmp-btn--orange:hover {
    background: #d4450f;
    color: #fff !important;
}

.cmp-btn--outline {
    background: transparent;
    border-color: #0569A5;
    color: #004f80 !important;
}
.cmp-btn--outline:hover {
    background: #0569A5;
    color: #fff !important;
}

.cmp-btn:focus-visible {
    outline: 3px solid #004f80;
    outline-offset: 3px;
}

.cmp-btn--primary:focus-visible,
.cmp-btn--orange:focus-visible {
    outline-color: #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 102, 164, 0.6);
}

.cmp-btn--full {
    display: flex;
    width: 100%;
}

.cmp-btn:disabled,
.cmp-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ============================================================================
   MEMBERSHIP MATCHMAKER
   Shortcode: [collab_matchmaker]
   ============================================================================ */

.collab-matchmaker {
    font-family: var(--font-family-body);
    font-size: var(--font-size-base);
    color: #3d4d58;
    max-width: 700px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    padding: 0; /* mm-screen handles inner padding */
}

.mm-screen {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
}

.mm-eyebrow {
    font-family: var(--font-family-body);
    font-size: 22px;
    font-weight: 700;
    color: #2F4B59;
    margin: 0 0 var(--spacing-xs);
}

.mm-intro-logo {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.mm-intro-logo__img {
    max-width: 320px;
    width: 100%;
    height: auto;
}

.mm-intro-heading {
    font-size: 36px;
    font-family: var(--font-family-header);
    font-weight: 800;
    text-align: left;
    line-height: 1.3;
    margin: 0 0 var(--spacing-sm);
}

/* Higher specificity needed to beat .collab-app h1 */
.collab-matchmaker .mm-intro-heading {
    color: #0569A5;
}

.mm-intro-cta {
    text-align: center;
}


.mm-intro-body {
    font-size: 22px;
    font-family: var(--font-family-body);
    font-style: normal;
    font-weight: 400;
    color: #2F4B59;
    line-height: 1.3;
    margin: 0 0 var(--spacing-md);
}

.mm-info-box {
    font-size: var(--font-size-xl);
    font-weight: 400;
    line-height: 1.3;
    background: #fff;
    border: 2px solid #aaa;
    border-radius: var(--radius-md);
    padding: var(--spacing-lg) var(--spacing-xl);
    color: #F06236;
    margin-bottom: var(--spacing-xl);
}

.mm-progress {
    height: 8px;
    background: #e0e0e0;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: var(--spacing-2xl);
}

.mm-progress__fill {
    height: 100%;
    background: #0569A5;
    border-radius: 99px;
    transition: width var(--transition-base) ease;
}

.mm-question-header {
    margin-bottom: var(--spacing-xl);
}

.mm-question-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.mm-question-logo {
    height: 100px;
    width: auto;
}

.mm-question-text {
    font-size: 30px;
    font-weight: 800;
    font-family: var(--font-family-header);
    color: #0569A5;
    line-height: 1.3;
    margin: 0 0 var(--spacing-xs);
    text-transform: none;
    letter-spacing: normal;
}

.mm-subtext {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: #2F4B59;
    margin: var(--spacing-xs) 0 0;
}

/* "Your match" — section heading style, not an eyebrow label */
.mm-match-heading {
    font-family: var(--font-family-header, Helvetica, Arial);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #0569A5;
    margin: 0 0 var(--spacing-sm);
}

/* Ensure both result action buttons are always the same height */
.mm-result-actions .cmp-btn {
    box-sizing: border-box;
    min-height: 48px;
    line-height: 1.3;
    white-space: normal;
    justify-content: center;
}

.mm-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xl);
}

.mm-option {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    text-align: left;
    padding: 18px var(--spacing-md);
    border: 1.5px solid #dddddd;
    border-radius: var(--radius-lg);
    background: #ffffff;
    cursor: pointer;
    font-size: var(--font-size-lg);
    font-family: var(--font-family-body);
    font-weight: 400;
    line-height: 1.3;
    color: #2F4B59;
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.mm-option:hover:not(.is-selected) {
    border-color: #0569A5;
    background: #f8f9fa;
}

.mm-option.is-selected {
    border-color: #0569A5;
    background: #e8f4f8;
    color: #0569A5;
    font-weight: 600;
}

.mm-indicator {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid #dddddd;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.mm-indicator--radio    { border-radius: 50%; }
.mm-indicator--checkbox { border-radius: var(--radius-sm); }

.mm-indicator.is-checked {
    border-color: #0569A5;
    background: #0569A5;
}

.mm-option-label { flex: 1; }

.mm-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.mm-nav .cmp-btn {
    padding: 18px 36px;
    font-size: var(--font-size-xl);
    font-weight: 700;
}


.mm-result-hero {
    display: flex;
    align-items: flex-start;
    margin-top: 20px;
    margin-bottom: 30px;
    position: relative;
}

.mm-result-hero__left {
    flex: 0 0 auto;
    z-index: 1;
    padding-top: 100px;
}

.mm-result-hero__image {
    flex: 0 0 auto;
    margin-top: -34px;
    margin-left: -106px;
    z-index: 2;
    position: relative;
}

.mm-result-art {
    height: 292px;
    width: auto;
}

.mm-tier-badge {
    display: block;
    width: 300px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    font-family: var(--font-family-header, Helvetica, Arial);
    font-size: 48px;
    font-weight: 800;
    background: #0569A5;
    padding: 32px 40px;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-sm);
    box-sizing: border-box;
}

.mm-tier-price {
    font-size: var(--font-size-md);
    color: #595959;
    margin: 0;
}

.mm-tier-price--early-bird {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #2d3748;
    margin-top: var(--spacing-xs);
}

.mm-early-bird-label {
    text-transform: uppercase;
    font-size: var(--font-size-base);
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.mm-tier-price--regular {
    font-size: var(--font-size-base);
    color: #595959;
    margin-top: 2px;
}

.mm-early-bird-deadline {
    font-size: var(--font-size-base);
    color: #595959;
    margin-top: var(--spacing-xs);
    font-style: italic;
}

.mm-result-desc {
    background: #e8f4f8;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
}

.mm-result-desc p {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 400;
    line-height: 1.3;
    color: #2F4B59;
}

.mm-highlights {
    margin-bottom: var(--spacing-xl);
}

.mm-highlights__label {
    font-family: var(--font-family-header);
    font-size: 30px;
    font-weight: 800;
    color: #0569A5;
    margin: 0 0 var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid #e0e0e0;
}

.mm-highlight {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: 10px;
    font-size: var(--font-size-lg);
    font-weight: 400;
    color: #3d4d58;
    line-height: 1.3;
}

.mm-highlight__check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0569A5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.mm-result-actions {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.mm-result-actions .cmp-btn {
    border-radius: var(--radius-lg);
    font-weight: 700;
}

.mm-result-actions .cmp-btn:first-child {
    flex: 4;
}

.mm-result-actions .cmp-btn:last-child {
    flex: 3;
}

.mm-result-footer {
    text-align: center;
    font-size: 12px;
    color: #3d4d58;
    line-height: 1.3;
    margin: 0;
}

.mm-result-footer a {
    color: #F06236;
}

.mm-multi-error {
    font-size: var(--font-size-base);
    color: #c0392b;
    margin: 0 0 var(--spacing-sm);
}

@media (max-width: 520px) {
    .mm-screen {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .mm-intro-heading {
        font-size: var(--font-size-2xl);
    }

    .mm-result-hero {
        flex-direction: column;
        align-items: center;
    }

    .mm-result-hero__left {
        padding-top: 0;
    }

    .mm-result-hero__image {
        margin-left: 0;
        margin-top: var(--spacing-md);
        text-align: center;
    }

    .mm-result-art {
        height: auto;
        width: 100%;
        max-width: 240px;
    }

    .mm-tier-badge {
        width: 100%;
        font-size: var(--font-size-2xl);
        padding: var(--spacing-md) var(--spacing-xl);
        height: auto;
    }

    .mm-nav .cmp-btn {
        flex: 1;
    }
}

/* ============================================================================
   AUDIT APP — CARD HEADER (sign-out bar above each wizard card)
   ============================================================================ */
.audit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid #e0e0e0;
}

.audit-card-header__brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.audit-card-header__logo {
    height: 128px;
    width: auto;
}

.audit-card-header__step {
    font-family: var(--font-family-header);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #0569A5;
    white-space: nowrap;
}

/* ============================================================================
   AUDIT APP — SHARED STRUCTURAL PATTERNS
   ============================================================================ */

/* Nav row at the bottom of each card: back/continue buttons */
.audit-card-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid #e0e0e0;
}

/* Centered CTA at the bottom of the pre-screen card */
.audit-card-cta {
    text-align: center;
    margin-top: var(--spacing-2xl);
}

/* Section description paragraphs */
.audit-section-desc {
    font-size: 15px;
    color: #595959;
    margin-bottom: var(--spacing-md);
}

/* Edit profile button variant */
.edit-profile-btn {
    background: #0569A5;
    border: 1px solid #0569A5;
    color: #fff;
    font-weight: 600;
}

.edit-profile-btn:hover,
.edit-profile-btn:focus {
    background: #004d7a;
    border-color: #004d7a;
}

/* ============================================================================
   AUDIT APP — PROFILE SUMMARY BAR
   ============================================================================ */
.audit-profile-bar {
    background: #e8f4f8;
    border: 1px solid #0078b4;
    border-radius: 8px;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.audit-profile-bar__label {
    font-size: 15px;
    font-weight: 600;
    color: #0569A5;
}

.audit-profile-bar__value {
    font-size: 15px;
    color: #3d4d58;
    margin-left: var(--spacing-xs);
}

/* ============================================================================
   AUDIT APP — PROFILE FORM STYLES
   (moved from audit-template.php inline <style> block)
   ============================================================================ */
.audit-profile-question {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.audit-profile-label {
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 15px;
}

.audit-radio-group {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.audit-radio-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    font-weight: normal;
    font-size: 15px;
}

.audit-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0569A5;
}

.audit-profile-followup {
    margin-left: var(--spacing-xl);
    border-left: 3px solid #e0e0e0;
    padding-left: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.audit-profile-sub {
    background: #f5f5f5;
}

.audit-profile-question.has-error {
    border-color: var(--color-error-dark);
    background: #fff8f7;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}

.audit-profile-question.has-error .audit-profile-label {
    color: var(--color-error-dark);
}

#profileValidationError {
    color: var(--color-error-dark);
    font-size: var(--font-size-base);
    font-weight: 600;
    margin: 0 0 var(--spacing-sm) 0;
    padding: var(--spacing-sm) var(--spacing-md);
    background: #fff0ee;
    border: 1px solid #f5c6c2;
    border-radius: 6px;
}

/* ============================================================================
   AUDIT APP — CONTENT PATTERNS
   ============================================================================ */
.member-user-info form,
.audit-card-header form { margin: 0; }

.audit-section--top { margin-top: var(--spacing-xl); }

.audit-reqs-intro {
    font-size: var(--font-size-base);
    font-weight: 400;
    color: #3d4d58;
    line-height: 1.5;
    margin: 0 0 var(--spacing-lg);
}

.audit-reqs-tables {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.audit-reqs-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.collab-app .audit-reqs-heading {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #0569A5;
    margin: 0;
    text-align: center;
}

.audit-reqs-download {
    margin-top: var(--spacing-lg);
    font-size: var(--font-size-sm);
}

.audit-reqs-footnote {
    font-size: var(--font-size-sm);
    color: #595959;
    margin: 6px 0 0;
}

.audit-reqs-detail {
    font-size: 12px;
    color: #595959;
}

.audit-reqs-tables .audit-table td {
    font-size: var(--font-size-sm);
}

.audit-reqs-tables .audit-table th:nth-child(1),
.audit-reqs-tables .audit-table td:nth-child(1) {
    width: 22%;
}

.audit-reqs-tables .audit-table th:nth-child(2),
.audit-reqs-tables .audit-table td:nth-child(2) {
    width: 26%;
}

.audit-reqs-tables .audit-table th:nth-child(3),
.audit-reqs-tables .audit-table td:nth-child(3) {
    width: 26%;
}

.audit-reqs-tables .audit-table th:nth-child(4),
.audit-reqs-tables .audit-table td:nth-child(4) {
    width: 26%;
}

.audit-reqs-tables .audit-reqs-total td {
    background-color: #dbeeff;
    color: #004d7a;
    font-size: var(--font-size-sm);
}

.audit-section-intro {
    font-family: var(--font-family-header);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: #F06236;
    letter-spacing: 0;
    margin: 0 0 var(--spacing-xl) 0;
}

.audit-add-row {
    margin-top: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    text-align: center;
}

.audit-hint {
    font-size: 14px;
    color: #595959;
    margin: var(--spacing-xl) 0 var(--spacing-md);
    border-top: 1px solid #e0e0e0;
    padding-top: var(--spacing-md);
}

.audit-section-sub {
    color: #595959;
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
}

.audit-info-box {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.audit-info-box__body {
    margin: 0 0 var(--spacing-sm) 0;
    color: #3d4d58;
    font-size: 14px;
}

.audit-info-box__footer {
    margin: 0;
    font-size: 14px;
}

.audit-select-label {
    font-weight: 600;
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 14px;
}

.audit-select--narrow {
    max-width: 420px;
    margin-top: var(--spacing-xs);
}

.audit-checklist-heading {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.audit-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.audit-checklist__item {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid #e0e0e0;
}

.audit-checklist__item:last-child { border-bottom: none; }

.audit-checklist__label {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.audit-checklist__label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Inline contextual note — shown by JS when a condition applies */
.audit-cdos-note {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: #e8f4f8;
    border: 1px solid #0078b4;
    border-radius: 6px;
    font-size: 14px;
    color: #0569A5;
}

.audit-options-list {
    color: #595959;
    font-size: 14px;
    margin: 0 0 var(--spacing-md) var(--spacing-lg);
    padding: 0;
    line-height: 1.8;
}

/* ============================================================================
   MEMBERSHIP PAGE
   (moved from includes/membership-page.php inline <style> block)
   ============================================================================ */
/* ── MEMBERSHIP PAGE SCOPED STYLES ──────────────────────────── */
.collab-membership-page {
    font-family: var(--font-family-body, system-ui, -apple-system, sans-serif);
    font-size: 16px;
    line-height: 1.3;
    color: var(--color-text-primary, #455560);
}

/* ── SECTIONS ───────────────────────────────────────────────── */
.cmp-section {
    padding: 40px 0;
}
.cmp-section--alt {
    background: var(--color-bg-light, #f8f9fa);
    border-radius: var(--radius-lg, 8px);
    padding-left: 20px;
    padding-right: 20px;
}
.cmp-section-label {
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: #004f80;
    text-align: center;
    margin-bottom: 6px;
}
.cmp-section-heading {
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: var(--color-text-primary, #455560);
    margin: 0 0 10px;
    line-height: 1.2;
}
.cmp-section-sub {
    text-align: center;
    color: #555;
    max-width: 580px;
    margin: 0 auto 28px;
    font-size: 15px;
}
.cmp-divider {
    width: 40px;
    height: 3px;
    background: #0569A5;
    margin: 0 auto 28px;
    border-radius: 2px;
}

/* ── VALUE HOOK ─────────────────────────────────────────────── */
.cmp-hook {
    padding: 28px 0 0;
    text-align: center;
}
.cmp-hook__text {
    font-size: 15px;
    color: #555; /* #555 on white = 7.4:1 — passes AAA */
    line-height: 1.65;
    margin: 0 auto;
    max-width: 680px;
}

/* ── PAGE NAV (sticky floating menu bar) ────────────────────── */
.cmp-page-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    background: #fff;
    border-bottom: 2px solid var(--color-border-light, #e0e0e0);
    padding: 10px 16px;
    margin: 20px -20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
/* Nav links — solid bright blue buttons, light blue on hover */
.cmp-page-nav__link {
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;               /* white text on bright blue */
    text-decoration: none !important;
    padding: 8px 14px;
    border-radius: var(--radius-sm, 4px);
    background: #0569A5;                   /* bright blue fill */
    border: 2px solid #0569A5;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}
.cmp-page-nav__link:hover,
.cmp-page-nav__link[aria-current="true"] {
    background: #b3e4f7;                   /* light blue on hover */
    color: #003d6b !important;             /* dark blue text — readable on light blue */
    border-color: #0569A5;
    box-shadow: 0 2px 8px rgba(0,157,220,0.25);
}
.cmp-page-nav__link:focus-visible {
    outline: 3px solid #F06236;
    outline-offset: 3px;
}
/* CTA "Register Now" stays solid orange — visually distinct */
.cmp-page-nav__link--cta {
    background: var(--color-accent, #f3511b);
    color: #fff !important;
    border-color: var(--color-accent, #f3511b);
    margin-left: 4px;
}
.cmp-page-nav__link--cta:hover {
    background: #fcd5c6;                   /* light orange on hover */
    border-color: #F06236;
    color: #8a2200 !important;             /* dark brown-red text — readable on light orange */
    box-shadow: 0 2px 8px rgba(243,81,27,0.25);
}
.cmp-page-nav__link--cta:focus-visible {
    outline-color: #F06236;
}

/* Body text links — ensure focus + hover are always visible */
.collab-membership-page a:not(.cmp-btn):not(.cmp-page-nav__link) {
    color: #004f80;
    text-decoration: underline;
}
.collab-membership-page a:not(.cmp-btn):not(.cmp-page-nav__link):hover {
    color: #003060;
    text-decoration: underline;
}
.collab-membership-page a:not(.cmp-btn):not(.cmp-page-nav__link):focus-visible {
    outline: 3px solid #F06236;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── PILLARS / FLIP CARDS ───────────────────────────────────── */
.cmp-pillars-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 16px;
}
.cmp-pillar {
    perspective: 1000px;
    min-height: 240px;
}
.cmp-pillar__inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 240px;
    transform-style: preserve-3d;
    transition: transform 0.55s ease;
}
.cmp-pillar.is-flipped .cmp-pillar__inner {
    transform: rotateY(180deg);
}
.cmp-pillar__front,
.cmp-pillar__back {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    min-height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-lg, 8px);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.cmp-pillar__front {
    background: var(--color-bg-white, #fff);
    border: 1px solid var(--color-border-light, #e0e0e0);
    border-top: 3px solid #0EA2DA;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 22px;
    text-align: center;
    cursor: pointer;
}
.cmp-pillar__back {
    background: #004f80;
    color: #fff;
    transform: rotateY(180deg);
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
}
.cmp-pillar__title {
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 16px;
    font-weight: 700;
    color: #004f80;
    line-height: 1.3;
    margin: 0 0 8px;
}
.cmp-pillar__tagline {
    font-size: 14px;
    color: #555;
    margin: 0 0 16px;
    line-height: 1.3;
}
.cmp-pillar__flip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0569A5;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 7px 16px;
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    min-height: 34px;
}
.cmp-pillar__flip-btn:hover { background: #007db4; }
.cmp-pillar__flip-btn:focus-visible {
    outline: 3px solid #F06236;
    outline-offset: 2px;
}
.cmp-pillar__flip-btn--back {
    background: rgba(255,255,255,0.2);
    align-self: flex-end;
    margin-bottom: 10px;
    font-size: 18px;
    padding: 4px 12px;
}
.cmp-pillar__flip-btn--back:hover { background: rgba(255,255,255,0.35); }
.cmp-pillar__list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}
.cmp-pillar__list li {
    padding: 7px 0 7px 20px;
    position: relative;
    font-size: 14px;
    color: rgba(255,255,255,0.92);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    line-height: 1.3;
}
.cmp-pillar__list li:last-child { border-bottom: none; }
.cmp-pillar__list li::before {
    content: '✓';
    position: absolute; left: 0;
    color: #7dd3f8;
    font-weight: 700;
}

/* ── INFO BUTTONS ───────────────────────────────────────────── */
.cmp-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0569A5;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-style: italic;
    font-family: var(--font-family-body);
    border: none;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 5px;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s;
    /* Expand touch target without changing visual size */
    position: relative;
}
.cmp-info-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
}
.cmp-info-btn:hover { background: #004f80; }
.cmp-info-btn:focus-visible {
    outline: 3px solid #F06236;
    outline-offset: 2px;
}
/* Info button inside colored tier headers */
.cmp-info-btn--header {
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.25);
    color: #fff;
    margin: 6px auto 0;
    font-size: 12px;
}
.cmp-info-btn--header:hover { background: rgba(255,255,255,0.45); }

/* ── POPOVER ─────────────────────────────────────────────────── */
.cmp-popover {
    position: absolute;
    background: #fff;
    border: 1px solid #d0e4f0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,80,128,0.18);
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.3;
    color: #2d3748;
    z-index: 300;
    display: none;
    pointer-events: none;
}
.cmp-popover.is-visible { display: block; }

/* Inline hint info icon sample */
.cmp-hint-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0569A5;
    color: #fff;
    font-size: 10px;
    font-style: italic;
    font-family: var(--font-family-body);
    vertical-align: middle;
    line-height: 1;
}

@media (max-width: 520px) {
    .cmp-pillars-grid { grid-template-columns: 1fr; }
}

/* ── QUIZ ───────────────────────────────────────────────────── */
.cmp-quiz {
    background: var(--color-bg-white, #fff);
    border: 1px solid var(--color-border-light, #e0e0e0);
    border-radius: var(--radius-lg, 8px);
    box-shadow: 0 2px 8px rgba(0,102,164,0.1);
    max-width: 720px;
    margin: 0 auto;
    overflow: hidden;
}
.cmp-quiz__header {
    background: #004f80; /* 7.1:1 contrast with white text */
    color: #fff;
    padding: 18px 24px;
}
.cmp-quiz__header h3 {
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 3px;
}
.cmp-quiz__header p {
    font-size: 14px; /* up from 13px */
    opacity: 0.9;
    margin: 0;
}
/* Progress bar — 6px tall for better visibility */
.cmp-quiz__progress {
    height: 6px;
    background: var(--color-border-light, #e0e0e0);
}
.cmp-quiz__progress-fill {
    height: 100%;
    background: #0569A5;
    transition: width 0.35s ease;
}
.cmp-quiz__body {
    padding: 24px;
}
.cmp-quiz__step { display: none; }
.cmp-quiz__step.is-active { display: block; }
.cmp-quiz__q {
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 17px;
    font-weight: 700;
    color: #004f80;
    margin: 0 0 6px;
}
.cmp-quiz__hint {
    font-size: 14px; /* up from 12px */
    color: #555; /* up from #666 — 7.4:1 on white */
    margin: 0 0 16px;
}
.cmp-quiz__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.cmp-quiz__option {
    border: 2px solid var(--color-border-light, #e0e0e0);
    border-radius: var(--radius-md, 6px);
    padding: 14px 14px; /* taller padding for touch target */
    cursor: pointer;
    text-align: center;
    background: var(--color-bg-white, #fff);
    transition: border-color var(--transition-fast, 0.2s), background var(--transition-fast, 0.2s), transform var(--transition-fast, 0.2s);
    min-height: 44px; /* WCAG 2.5.8 minimum target size */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.cmp-quiz__option:hover {
    border-color: #0569A5;
    background: #e8f4f8;
    transform: translateY(-1px);
}
.cmp-quiz__option.is-selected {
    border-color: #004f80;
    background: #e0f0fa;
    box-shadow: inset 0 0 0 2px #004f80; /* double-border effect for clarity */
}
.cmp-quiz__option.is-selected .cmp-quiz__opt-label::before {
    content: '✓ ';
    color: #004f80;
}
.cmp-quiz__option:focus-visible {
    outline: 3px solid #F06236; /* orange stands out against both white and blue */
    outline-offset: 2px;
}
.cmp-quiz__opt-label {
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: #004f80;
}
.cmp-quiz__opt-desc {
    font-size: 13px; /* up from 11px */
    color: #555;
    margin-top: 4px;
}
.cmp-quiz__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}
.cmp-quiz__step-ind {
    font-size: 13px; /* up from 12px */
    color: #555;
    font-weight: 600;
}

/* Quiz Result */
.cmp-quiz__result { display: none; text-align: center; }
.cmp-quiz__result.is-active { display: block; }
.cmp-quiz__result-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 16px;
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}
.cmp-quiz__result-heading {
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 18px;
    font-weight: 700;
    color: #004f80;
    margin: 0 0 8px;
}
.cmp-quiz__result-desc {
    color: #555;
    font-size: 15px; /* up from 14px */
    max-width: 460px;
    margin: 0 auto 20px;
}
.cmp-quiz__result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── COMPARISON TABLE ───────────────────────────────────────── */
.cmp-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--color-border-light, #e0e0e0);
    border-radius: var(--radius-lg, 8px);
}
.cmp-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 14px; /* up from 13px */
}
.cmp-table th,
.cmp-table td {
    padding: 11px 14px;
    text-align: center;
    border-bottom: 1px solid var(--color-border-light, #e0e0e0);
    border-right: 1px solid var(--color-border-light, #e0e0e0);
    vertical-align: middle;
}
.cmp-table th:last-child,
.cmp-table td:last-child {
    border-right: none;
}
.cmp-table td:first-child {
    text-align: left;
    color: var(--color-text-primary, #455560);
    background: var(--color-bg-white, #fff);
    width: 38%;
}

/* Tier header cells */
.cmp-table thead tr:first-child th {
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    padding: 14px 12px 12px;
}
.cmp-table thead tr:first-child th:first-child {
    background: #004f80;
    color: #fff;
    font-size: 14px;
}
.cmp-table .th-price {
    display: block;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 3px;
}

/* Table tier header backgrounds and pointer cursor */
.cmp-table thead th[data-col] { cursor: pointer; }
.cmp-table thead th[data-col="1"] { background: #0569A5; }
.cmp-table thead th[data-col="2"] { background: #0569A5; }
.cmp-table thead th[data-col="3"] { background: #0569A5; }
.cmp-table thead th[data-col="4"] { background: #2F4B59; }

/* Table tier headers — keyboard focusable + hover feedback */
.cmp-table thead th[data-col]:hover {
    filter: brightness(1.12);
    cursor: pointer;
}
.cmp-table thead th[data-col]:focus-visible {
    outline: 3px solid #F06236;
    outline-offset: -3px;
}

/* Click-to-highlight — body cells get light blue, header keeps its color */
.cmp-table td.col-highlight {
    background: #dbeeff !important;
    border-left: 2px solid #0EA2DA;
    border-right: 2px solid #0EA2DA;
}
/* Header cell: darken its own bg color and add a thick white ring inside
   so the tier name (white text) stays fully legible */
.cmp-table thead tr:first-child th.col-highlight {
    filter: brightness(0.78);            /* darkens the header's inline bg color */
    outline: 4px solid #fff;
    outline-offset: -5px;
    border-left: 2px solid #0EA2DA;
    border-right: 2px solid #0EA2DA;
}
/* Dark blue text on light blue body cells — #003060 on #dbeeff ≈ 8:1 */
.cmp-table td.col-highlight .cell-check,
.cmp-table td.col-highlight .cell-val,
.cmp-table td.col-highlight .cell-unl { color: #003060 !important; }
.cmp-table td.col-highlight .cell-none { color: #4a6a8a !important; }
.cmp-table td.col-highlight .cell-part { color: #003060 !important; }
.cmp-table .row-price td.col-highlight { color: #003060 !important; }

/* Scrollable region focus ring */
.cmp-table-scroll:focus-visible {
    outline: 3px solid #004f80;
    outline-offset: 2px;
}

/* Table hint */
.cmp-table-hint {
    font-size: 13px; /* up from 12px */
    color: #555;
    text-align: right;
    margin-bottom: 8px;
    font-style: italic;
}

/* Category rows */
.cmp-table .row-cat td {
    background: #dbeeff !important;
    color: #003d6b !important;
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 14px;
    font-weight: 700;
    padding: 8px 14px;
    border-bottom-color: #0569A5;
}

/* Alternating rows */
.cmp-table tbody tr:not(.row-cat):nth-child(even) td {
    background: var(--color-bg-light, #f8f9fa);
}
.cmp-table tbody tr:not(.row-cat) td:first-child {
    background: var(--color-bg-white, #fff);
}
.cmp-table tbody tr:not(.row-cat):nth-child(even) td:first-child {
    background: var(--color-bg-light, #f8f9fa);
}
.cmp-table tbody tr:not(.row-cat):hover td {
    background: #f0f8ff;
}

/* Cell value types — all bumped to 13px+ for readability */
.cell-check { color: #007aad; font-size: 17px; font-weight: 700; } /* #007aad on white = 4.7:1 */
.cell-none  { color: #888; font-size: 15px; }                       /* #888 on white = 3.5:1 — decorative dash */
.cell-val   { color: #004f80; font-weight: 700; font-size: 13px; }  /* 7.1:1 on white */
.cell-unl   { color: #004f80; font-weight: 700; font-size: 13px; }
.cell-part  { color: #c43d0a; font-weight: 600; font-size: 13px; }  /* #c43d0a on white = 5.3:1 */
.cell-new   {
    display: inline-block;
    background: #c43d0a;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 8px;
    vertical-align: middle;
    margin-left: 4px;
}

/* Price row — darker text for contrast on light blue bg */
.cmp-table .row-price td {
    background: #dbeeff !important;
    font-weight: 700;
    font-size: 15px;
    color: #003d6b; /* 5.9:1 on #dbeeff */
}
.cmp-table .row-price td:first-child {
    font-family: var(--font-family-body, system-ui, sans-serif);
    font-size: 14px;
    color: #444;
    font-weight: 700;
    background: #dbeeff !important;
}

/* Shared Register Now button */
.cmp-tier-register {
    text-align: center;
    margin-top: 20px;
}

/* ── REDUCED MOTION ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cmp-pillar__inner,
    .cmp-quiz__progress-fill,
    .cmp-quiz__option,
    .cmp-btn,
    .cmp-page-nav__link,
    .cmp-pillar__flip-btn,
    .cmp-info-btn {
        transition: none !important;
        transform: none !important;
    }
    /* On reduced motion: show back content statically without flip */
    .cmp-pillar.is-flipped .cmp-pillar__front { display: none; }
    .cmp-pillar__back { transform: none; position: relative; display: none; }
    .cmp-pillar.is-flipped .cmp-pillar__back { display: flex; }
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .cmp-section { padding: 28px 0; }
    .cmp-section-heading { font-size: 20px; }
    .cmp-quiz__body { padding: 16px; }
    .cmp-quiz__options { grid-template-columns: 1fr 1fr; }
}

/* ============================================================================
   REGISTRATION FORM FIELDS
   ============================================================================ */

.collab-reg__field {
    margin-bottom: var(--spacing-lg);
}

.collab-reg__field:last-child {
    margin-bottom: 0;
}

.collab-reg__label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--font-size-base);
    font-weight: 600;
    color: #2d3748;
}

.collab-reg__label-hint {
    font-weight: 400;
    color: #595959;
    font-size: var(--font-size-sm);
}

.collab-reg__required {
    color: #F06236;
    margin-left: 2px;
}

.collab-reg__input,
.collab-reg__select {
    display: block;
    width: 100%;
    padding: 10px var(--spacing-md);
    min-height: 44px;
    background: #fff;
    border: 2px solid #dddddd;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: var(--font-family-body);
    color: #2d3748;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}

.collab-reg__input:focus,
.collab-reg__select:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 151, 208, 0.2);
}

.collab-reg__input:disabled,
.collab-reg__select:disabled {
    background: #f8f9fa;
    color: #595959;
    cursor: not-allowed;
    opacity: 0.7;
}

.collab-reg__input--error,
.collab-reg__select--error {
    border-color: #c0392b;
}

.collab-reg__input--error:focus,
.collab-reg__select--error:focus {
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.2);
}

.collab-reg__error-msg {
    display: block;
    margin-top: 5px;
    font-size: var(--font-size-sm);
    color: #c0392b;
    font-weight: 500;
}

.collab-reg__hint {
    display: block;
    margin-top: 5px;
    font-size: var(--font-size-sm);
    color: #595959;
}

.collab-reg__hint--intro {
    font-size: var(--font-size-sm);
    color: #595959;
    margin-bottom: var(--spacing-lg);
}

.collab-reg__conditional-field {
    margin-top: var(--spacing-md);
}

/* Checkbox fields */
.collab-reg__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    font-size: var(--font-size-base);
    color: #2d3748;
    cursor: pointer;
    line-height: 1.5;
}

.collab-reg__checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0569A5;
}

/* Warning / alert box */
.collab-reg__warning {
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    background: #fff8e1;
    border: 2px solid #f59e0b;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: #78350f;
    line-height: 1.6;
}

.collab-reg__warning > strong:first-child {
    display: block;
    margin-bottom: 6px;
    font-size: var(--font-size-lg);
}

/* Loading state for dropdowns */
.collab-reg__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl) 0;
    font-size: var(--font-size-base);
    color: #595959;
    text-align: center;
}

.collab-reg__loading[hidden] {
    display: none;
}

/* Section divider */
.collab-reg__section-title {
    margin: var(--spacing-xl) 0 var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid #e0e0e0;
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #2d3748;
}

.collab-reg__section-title:first-child {
    margin-top: 0;
}

/* Eligibility page */
.collab-reg__eligibility-status {
    margin-bottom: var(--spacing-lg);
}

.collab-reg__membership-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 999px;
    font-size: var(--font-size-base);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.collab-reg__membership-badge--none    { background: #f1f1f1; color: #595959; }
.collab-reg__membership-badge--select  { background: #e8f4f8; color: #0569A5; }
.collab-reg__membership-badge--core    { background: #e3f2fd; color: #1565c0; }
.collab-reg__membership-badge--enhanced{ background: #e8f5e9; color: #2e7d32; }
.collab-reg__membership-badge--premier { background: #fff8e1; color: #7a4000; }

.collab-reg__cost-card {
    padding: var(--spacing-lg);
    background: #e8f4f8;
    border: 2px solid #0569A5;
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.collab-reg__cost-label {
    margin: 0 0 var(--spacing-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #595959;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.collab-reg__cost-value {
    margin: 0 0 var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
}

.collab-reg__cost-value--free {
    color: #2e7d32;
}

.collab-reg__cost-note {
    margin: var(--spacing-md) 0 0;
    padding: var(--spacing-md) var(--spacing-lg);
    background: #e8f4f8;
    border-left: 4px solid #0EA2DA;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: #2d3748;
    line-height: 1.6;
}

.collab-reg__warning--block {
    border-color: #c0392b;
    background: #fdf3f2;
    color: #7b241c;
}

.collab-reg__warning--caution {
    border-color: #d97706;
    background: #fffbeb;
    color: #92400e;
}

.collab-reg__safety-group {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--color-border);
}

.collab-reg__safety-group:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.collab-reg__safety-question {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-sm);
}

.collab-reg__safety-hint {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.collab-reg__safety-btn-group {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.collab-reg__safety-answer-btn {
    padding: 10px 28px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.collab-reg__safety-answer-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.collab-reg__safety-answer-btn--selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #ffffff;
}

.collab-reg__safety-ack-btn {
    display: inline-block;
    margin-top: var(--spacing-md);
    padding: 12px 24px;
    background: #92400e;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
}

.collab-reg__safety-ack-btn:hover {
    background: #78350f;
}

.collab-reg__safety-confirmed {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    padding: 10px 16px;
    background: #f0fdf4;
    border: 2px solid #16a34a;
    border-radius: var(--radius-md);
    color: #166534;
    font-size: var(--font-size-base);
    font-weight: 600;
}

.collab-reg__safety-confirmed-icon {
    font-size: 18px;
    line-height: 1;
}

/* Deep-link loading overlay — shown immediately on ?register= page load */
#collabDeepLinkLoading {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
}

.collab-deeplink-loading__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl);
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 240px;
    text-align: center;
}

.collab-deeplink-loading__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border-light, #e0e0e0);
    border-top-color: #0569A5;
    border-radius: 50%;
    animation: collabSpin 0.8s linear infinite;
}

@keyframes collabSpin {
    to { transform: rotate(360deg); }
}

.collab-deeplink-loading__text {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--color-text-muted, #666);
    font-weight: 500;
}

/* Series parts */
.collab-reg__series-part {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    background: #f8f9fa;
}

.collab-reg__series-part:last-child {
    margin-bottom: 0;
}

.collab-reg__series-part-header {
    margin-bottom: var(--spacing-sm);
}

.collab-reg__series-part-name {
    margin: 0 0 6px;
    font-size: var(--font-size-base);
    font-weight: 700;
    color: #2d3748;
}

.collab-reg__series-part-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: #595959;
}

.collab-reg__series-part-meta span::before {
    content: "·";
    margin-right: var(--spacing-sm);
}

.collab-reg__series-part-meta span:first-child::before {
    content: none;
}

.collab-reg__series-part-desc {
    margin: var(--spacing-sm) 0 var(--spacing-md);
    font-size: var(--font-size-sm);
    color: #3d4d58;
    line-height: 1.6;
}

.collab-reg__series-part-attend {
    border: none;
    padding: 0;
    margin: 0;
}

.collab-reg__series-part-attend-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #2d3748;
}

.collab-reg__series-part-options {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.collab-reg__radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-base);
    color: #2d3748;
    cursor: pointer;
}

.collab-reg__radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0569A5;
}

/* ============================================================================
   REGISTRATION MODAL
   ============================================================================ */

.collab-reg-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: none;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}

.collab-reg-modal--active {
    display: flex;
}

.collab-reg-modal__overlay {
    display: none;
}

.collab-reg-modal__content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.collab-reg-modal__header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    flex-shrink: 0;
}

.collab-reg-modal__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--spacing-sm) var(--spacing-md);
    min-height: 44px;
    background: transparent;
    border: 2px solid #dddddd;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: var(--font-family-body);
    color: #595959;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
    flex-shrink: 0;
}

.collab-reg-modal__back:hover {
    border-color: #0569A5;
    color: #0569A5;
    background: #e8f4f8;
}

.collab-reg-modal__back:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 151, 208, 0.3);
}

.collab-reg-modal__header-title {
    flex: 1;
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collab-reg-modal__close {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    color: #595959;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
    flex-shrink: 0;
}

.collab-reg-modal__close:hover {
    color: #2d3748;
    background: var(--color-bg-muted);
}

.collab-reg-modal__close:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 151, 208, 0.3);
}

/* Progress indicator */
.collab-reg-modal__progress {
    padding: var(--spacing-md) var(--spacing-xl);
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.collab-reg-modal__progress-steps {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

.collab-reg-modal__progress-step {
    display: flex;
    align-items: center;
    flex: 1;
}

.collab-reg-modal__progress-step-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.collab-reg-modal__progress-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #dddddd;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: #595959;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.collab-reg-modal__progress-step--active .collab-reg-modal__progress-step-dot {
    background: #0569A5;
    border-color: #0569A5;
    color: #fff;
}

.collab-reg-modal__progress-step--complete .collab-reg-modal__progress-step-dot {
    background: #0569A5;
    border-color: #0569A5;
    color: #fff;
}

.collab-reg-modal__progress-step-name {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: #595959;
    text-align: center;
    white-space: nowrap;
}

.collab-reg-modal__progress-step--active .collab-reg-modal__progress-step-name {
    color: #0569A5;
}

.collab-reg-modal__progress-step--complete .collab-reg-modal__progress-step-name {
    color: #0569A5;
}

.collab-reg-modal__progress-connector {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin-bottom: 18px;
    transition: background var(--transition-fast);
}

.collab-reg-modal__progress-connector--complete {
    background: #0569A5;
}

/* Body / pages */
.collab-reg-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xl);
}

.collab-reg-modal__body > * {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.collab-reg-modal__page-inner {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.collab-reg-modal__page {
    display: none;
}

.collab-reg-modal__page--active {
    display: block;
}

.collab-reg-modal__page-title {
    margin: 0 0 var(--spacing-lg);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: #2d3748;
}

/* Placeholder content */
.collab-reg-modal__placeholder {
    padding: var(--spacing-xl);
    background: #f8f9fa;
    border-radius: var(--radius-md);
    border: 2px dashed #dddddd;
    color: #595959;
    font-size: var(--font-size-base);
    text-align: center;
}

/* Footer navigation */
.collab-reg-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    flex-shrink: 0;
}

.collab-reg-modal__footer-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: 44px;
    background: transparent;
    border: 2px solid #dddddd;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: var(--font-family-body);
    color: #595959;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.collab-reg-modal__footer-back:hover {
    border-color: #0569A5;
    color: #0569A5;
    background: #e8f4f8;
}

.collab-reg-modal__footer-back:focus {
    outline: none;
    border-color: #0569A5;
    box-shadow: 0 0 0 3px rgba(0, 151, 208, 0.3);
}

.collab-reg-modal__footer-back[hidden] {
    visibility: hidden;
    pointer-events: none;
}

.collab-reg-modal__footer-next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: 44px;
    background: #0569A5;
    border: 2px solid #0569A5;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: var(--font-family-body);
    color: #fff;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.collab-reg-modal__footer-next:hover {
    background: #0569A5;
    border-color: #0569A5;
}

.collab-reg-modal__footer-next:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 151, 208, 0.3);
}

.collab-reg-modal__footer-next:disabled {
    background: #b0bec5;
    border-color: #b0bec5;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}

.collab-reg-modal__footer-next:disabled:hover {
    background: #b0bec5;
    border-color: #b0bec5;
}

/* Confirmation and error states */
.collab-reg__confirmation {
    padding: var(--spacing-xl) 0;
    max-width: 560px;
    margin: 0 auto;
}

.collab-reg__error-state {
    padding: var(--spacing-xl) 0;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.collab-reg__confirmation-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 var(--spacing-lg);
}

.collab-reg__confirmation-body {
    text-align: left;
    margin-bottom: var(--spacing-lg);
}

.collab-reg__confirmation-body p {
    font-size: var(--font-size-base);
    color: #3d4d58;
    line-height: 1.6;
    margin: 0 0 var(--spacing-md);
}

.collab-reg__confirmation-body p:last-child {
    margin-bottom: 0;
}

.collab-reg__confirmation-note {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin: var(--spacing-md) 0 0;
}

.collab-reg__confirmation-note--waitlist {
    background: var(--color-warning-bg);
    border-left: 4px solid var(--color-warning-dark);
    color: var(--color-warning-dark);
}

.collab-reg__confirmation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-xl);
}

.collab-reg__error-state-text {
    font-size: var(--font-size-base);
    color: #595959;
    margin: 0 0 var(--spacing-lg);
    line-height: 1.5;
}

.collab-reg__error-state-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 var(--spacing-sm);
}

.collab-reg__error-state-help {
    font-size: var(--font-size-sm);
    color: #595959;
    margin-top: var(--spacing-md);
    line-height: 1.5;
}

/* Action buttons in confirmation/error states */
.collab-reg-modal__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-xl);
    min-height: 44px;
    margin-top: var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    font-family: var(--font-family-body);
    cursor: pointer;
    border: 2px solid transparent;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.collab-reg-modal__nav-btn--primary {
    background: #0569A5;
    border-color: #0569A5;
    color: #fff;
}

.collab-reg-modal__nav-btn--primary:hover {
    background: #0569A5;
    border-color: #0569A5;
}

.collab-reg-modal__nav-btn--secondary {
    background: transparent;
    border-color: #dddddd;
    color: #2d3748;
}

.collab-reg-modal__nav-btn--secondary:hover {
    border-color: #0569A5;
    color: #0569A5;
    background: #e8f4f8;
}

/* Responsive */
@media (max-width: 768px) {
    .collab-reg-modal__progress-step-name {
        display: none;
    }
}

@media (max-width: 600px) {
    .collab-reg-modal__content {
        height: 100%;
    }

    .collab-reg-modal__header-title {
        font-size: var(--font-size-base);
    }
}

/* Personal info page */
.collab-reg__field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

@media (max-width: 540px) {
    .collab-reg__field-row {
        grid-template-columns: 1fr;
    }
}

.collab-reg__checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    padding: var(--spacing-sm) 0;
}

@media (max-width: 540px) {
    .collab-reg__checkboxes {
        grid-template-columns: 1fr;
    }
}

.collab-reg__textarea {
    resize: vertical;
    min-height: 80px;
}

.collab-reg__radio-group {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    padding: var(--spacing-sm) 0;
}

/* Review page */
.collab-reg__review-row {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.collab-reg__review-label {
    flex: 0 0 140px;
    font-weight: 600;
    color: var(--color-text-secondary, #6b7280);
    font-size: var(--font-size-sm);
}
.collab-reg__review-value {
    flex: 1;
    font-size: var(--font-size-sm);
    color: var(--color-text, #111827);
}

@media (max-width: 480px) {
    .collab-reg__review-row {
        flex-direction: column;
        gap: 2px;
    }
    .collab-reg__review-label {
        flex: none;
    }
}

/* Payment page */
.collab-reg__radio-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    cursor: pointer;
    font-size: var(--font-size-base);
}
.collab-reg__radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0569A5;
}
.collab-reg__stripe-element {
    border: 1px solid var(--color-border, #d1d5db);
    border-radius: 6px;
    padding: var(--spacing-xs) var(--spacing-md);
    background: #fff;
}

.collab-reg__popup-note {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--color-text-muted, #6b7280);
}

/* ============================================================================
   PLUGIN PAGE TITLE — replaces the WordPress page title
   ============================================================================ */
.collab-page-title {
    font-family: var(--font-family-header);
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #0569A5;
    letter-spacing: 0;
    margin: 0 0 var(--spacing-lg) 0;
}

/* ============================================================================
   HIDE PAGE TITLE on plugin pages (WP-generated title)
   ============================================================================ */
.collab-hide-page-title .entry-title,
.collab-hide-page-title .page-title,
.collab-hide-page-title h1.entry-title,
.collab-hide-page-title h1.page-title,
.collab-hide-page-title .wp-block-post-title {
    display: none;
}

/* ─── Book Recommendations ──────────────────────────────────────────────────── */

.collab-books {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Full-width breakout from block theme constrained layout.
       left:50% moves the element's origin to the center of the parent;
       translateX(-50%) pulls it back by half its own width (50vw).
       Since the parent is centered, these cancel out to viewport edge.
       This beats margin-left:auto !important from the theme because
       transform moves the rendered box without affecting flow margins. */
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box;
    padding-left: var(--spacing-xl, 32px);
    padding-right: var(--spacing-xl, 32px);
}

/* Table of contents */
.collab-books__toc {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--spacing-sm, 12px);
    padding: var(--spacing-md, 16px) var(--spacing-xl, 32px) var(--spacing-md, 16px);
    background: var(--color-bg-light, #f0f4f8);
    border-bottom: 1px solid var(--color-border, #dde3e9);
    margin-bottom: var(--spacing-md, 16px);
}

.collab-books__toc-label {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: #3d4d58;
    white-space: nowrap;
}

.collab-books__toc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.collab-books__toc-link {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: #0569A5;
    text-decoration: none;
    padding: 3px 12px;
    border: 1px solid #0569A5;
    border-radius: 20px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.collab-books__toc-link:hover {
    background: #0569A5;
    color: #fff;
    text-decoration: none;
}

/* Age filter bar */
.collab-books__age-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm, 12px);
    padding: var(--spacing-md, 16px) 0;
    background: var(--color-bg-white, #fff);
    margin-bottom: var(--spacing-md, 16px);
}

.collab-books__age-label {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: #3d4d58;
}

.collab-books__age-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs, 8px);
}

.collab-books__age-input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #0569A5;
    border-radius: var(--radius-sm, 4px);
    font-size: var(--font-size-base);
    font-family: var(--font-family-body);
}

.collab-books__age-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 151, 208, 0.2);
}

.collab-books__age-clear {
    background: none;
    border: none;
    color: #0569A5;
    font-size: var(--font-size-sm);
    cursor: pointer;
    padding: 10px 12px;
    min-height: 44px;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
}

/* Individual shelf */
.collab-books__shelf {
    padding: var(--spacing-lg, 24px) var(--spacing-xl, 32px);
    border: none;
    border-radius: var(--radius-md, 8px);
    background: var(--color-bg-white, #fff);
    margin-bottom: var(--spacing-lg, 24px);
}

.collab-books__shelf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-sm, 12px);
    margin-bottom: var(--spacing-md, 16px);
}

.collab-books__shelf-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: #0569A5;
    margin: 0;
}

.collab-books__tag-filter-wrap {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs, 8px);
}

.collab-books__tag-filter-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #3d4d58;
    white-space: nowrap;
}

.collab-books__tag-select {
    font-size: var(--font-size-sm);
    font-family: var(--font-family-body);
    padding: 6px 28px 6px 10px;
    border: 1px solid #0569A5;
    border-radius: 20px;
    color: #0569A5;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%230569A5'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    min-width: 160px;
}

.collab-books__tag-select:focus {
    outline: 3px solid #0569A5;
}

/* Row */
.collab-books__scroll-container {
    position: relative;
    max-width: 1016px;
    margin: 0 auto;
}

.collab-books__scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #0569A5;
    background: white;
    color: #0569A5;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.collab-books__scroll-btn:hover {
    background: #0569A5;
    color: white;
}

.collab-books__scroll-btn--prev {
    left: -20px;
}

.collab-books__scroll-btn--next {
    right: -20px;
}

.collab-books__scroll-btn.is-hidden {
    display: none;
}

.collab-books__row-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--spacing-sm, 12px);
    scrollbar-width: none;
}

.collab-books__row-wrapper::-webkit-scrollbar {
    display: none;
}

.collab-books__row {
    display: flex;
    gap: var(--spacing-md, 16px);
    width: max-content;
    padding: var(--spacing-xs, 8px) 2px var(--spacing-sm, 12px);
}

/* Card */
.collab-books__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 156px;
    cursor: pointer;
    flex-shrink: 0;
}

.collab-books__card:focus {
    outline: 3px solid #0569A5;
    border-radius: var(--radius-sm, 4px);
}

.collab-books__cover-wrap {
    position: relative;
    width: 156px;
    height: 228px;
    border-radius: var(--radius-sm, 4px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.collab-books__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.2s ease;
}

.collab-books__cover--placeholder {
    width: 100%;
    height: 100%;
    background: #0569A5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
}

.collab-books__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xs, 8px);
    opacity: 0;
    transition: opacity 0.2s ease;
    text-align: center;
}

.collab-books__cover-wrap:hover .collab-books__overlay,
.collab-books__card:focus .collab-books__overlay {
    opacity: 1;
}

.collab-books__cover-wrap:hover .collab-books__cover {
    filter: brightness(0.45);
}

.collab-books__overlay-title {
    color: #fff;
    font-size: var(--font-size-sm);
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
}

.collab-books__overlay-author {
    color: rgba(255,255,255,0.82);
    font-size: 12px;
    margin: 0;
    line-height: 1.3;
}

/* Badges overlaid on the bottom of the cover */
.collab-books__badges {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    z-index: 2;
    pointer-events: none;
}

.collab-books__age-badge {
    font-size: 10px;
    font-weight: 600;
    color: #0569A5;
    background: #dbeeff;
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}

.collab-books__tag-badge {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #0569A5;
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.collab-books-empty {
    color: #595959;
    font-style: italic;
    padding: var(--spacing-xl, 32px);
}

/* =============================================================
   ALDS Chatbot Embed
   ============================================================= */
.alds-chatbot__embed-wrap {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid #dddddd;
    margin-top: var(--spacing-lg);
}

.alds-chatbot__iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ============================================================================
   MEDIUM FEED — [collab_medium_feed]
   ============================================================================ */

.collab-medium-feed {
    font-family: var(--font-family-body);
    padding: var(--spacing-xl) 0;
}

.collab-medium-feed__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    width: 100%;
}

/* Card */
.collab-medium-feed__card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #ffffff;
    border: 1px solid #BCC3C8;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.collab-medium-feed__card:hover {
    box-shadow: 0 4px 16px rgba(5, 105, 165, 0.12);
    transform: translateY(-2px);
}

/* Image */
.collab-medium-feed__image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.collab-medium-feed__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.collab-medium-feed__card:hover .collab-medium-feed__image {
    transform: scale(1.03);
}

/* Body */
.collab-medium-feed__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    gap: var(--spacing-sm);
}

/* Title */
.collab-medium-feed__title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: #2d3748;
}

.collab-medium-feed__title a {
    color: inherit;
    text-decoration: none;
}

.collab-medium-feed__title a:hover {
    color: #0569A5;
    text-decoration: underline;
}

.collab-medium-feed__title a:focus-visible {
    outline: 3px solid #F06236;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Excerpt */
.collab-medium-feed__excerpt {
    font-size: var(--font-size-sm);
    color: #595959;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* Meta footer */
.collab-medium-feed__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: auto;
    padding-top: var(--spacing-sm);
    border-top: 1px solid #BCC3C8;
    font-size: var(--font-size-xs);
    color: #595959;
}

.collab-medium-feed__date {
    color: #595959;
}

.collab-medium-feed__read-more {
    margin-left: auto;
    color: #00A1DB;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.collab-medium-feed__read-more:hover {
    color: #044f80;
    text-decoration: underline;
}

.collab-medium-feed__read-more:focus-visible {
    outline: 3px solid #F06236;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Footer CTA */
.collab-medium-feed__footer {
    text-align: center;
    margin-top: var(--spacing-md);
}

/* Error state */
.collab-medium-feed__error {
    color: #595959;
    font-style: italic;
    padding: var(--spacing-md);
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .collab-medium-feed__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .collab-medium-feed__grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   MOSAIC — Educator Voices from the Field
   ============================================================================ */

/* Hero */
.collab-mosaic .mosaic-hero {
    background-color: #0569A5;
    color: #fff;
    padding: var(--spacing-xl) var(--spacing-lg);
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.collab-mosaic .mosaic-hero__eyebrow {
    font-family: var(--font-family-body);
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 var(--spacing-xs) 0;
}

.collab-mosaic .mosaic-hero__title {
    font-family: var(--font-family-header);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 var(--spacing-sm) 0;
    color: #fff;
}

.collab-mosaic .mosaic-hero__subtitle {
    font-family: var(--font-family-body);
    font-size: var(--font-size-lg);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* Strip image */
.collab-mosaic .mosaic-strip {
    display: block;
    height: 40px;
    overflow: hidden;
    background-position: center top;
    background-size: auto 160px;
    background-repeat: repeat-x;
}

/* Volume pills */
.collab-mosaic .mosaic-volumes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 2rem;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
}

.collab-mosaic .mosaic-volumes__pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 20px;
    border: none;
    border-radius: 20px;
    background: var(--color-bg-blue-light, #a1c9e2);
    cursor: pointer;
    font-family: var(--font-family-body);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: #2d3748;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.collab-mosaic .mosaic-volumes__pill:hover {
    background: #0569A5;
    color: #fff;
}

.collab-mosaic .mosaic-volumes__pill.is-active {
    background: #0569A5;
    color: #fff;
}

.collab-mosaic .mosaic-volumes__pill:focus-visible {
    outline: 3px solid #F06236;
    outline-offset: 2px;
}

.collab-mosaic .mosaic-volumes__label,
.collab-mosaic .mosaic-volumes__year {
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    opacity: 1;
}

/* Panels */
.collab-mosaic .mosaic-panel {
    display: none;
    padding: 0 var(--spacing-lg) var(--spacing-xl);
}

.collab-mosaic .mosaic-panel.is-active {
    display: block;
}

/* Card grid */
.collab-mosaic .mosaic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

/* Cards */
.collab-mosaic .mosaic-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, transform 0.15s;
}

a.mosaic-card:hover {
    box-shadow: 0 4px 16px rgba(5, 105, 165, 0.15);
    transform: translateY(-2px);
}

a.mosaic-card:focus-visible {
    outline: 3px solid #F06236;
    outline-offset: 2px;
    border-radius: 8px;
}

.collab-mosaic .mosaic-card__content {
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.collab-mosaic .mosaic-card__title {
    font-family: var(--font-family-header);
    font-size: var(--font-size-md);
    font-weight: 600;
    line-height: 1.45;
    color: #0569A5;
    margin: 0 0 10px;
    text-align: center;
    width: 100%;
}

.collab-mosaic .mosaic-card__divider {
    border: none;
    border-top: 1.5px solid #F06236;
    width: 100%;
    margin: 0 0 10px;
    flex-shrink: 0;
    align-self: unset;
    height: auto;
    background: none;
    border-radius: 0;
}

.collab-mosaic .mosaic-card__author {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: flex-start;
}

.collab-mosaic .mosaic-card__avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8f9fa;
    border: 1.5px solid #0569A5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collab-mosaic .mosaic-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.collab-mosaic .mosaic-card__avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.collab-mosaic .mosaic-card__avatar-fallback svg {
    width: 100%;
    height: 100%;
    display: block;
}

.collab-mosaic .mosaic-card__byline {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.collab-mosaic .mosaic-card__name {
    font-family: var(--font-family-body);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #2d3748;
}

.collab-mosaic .mosaic-card__role {
    font-family: var(--font-family-body);
    font-size: var(--font-size-xs);
    color: #595959;
    line-height: 1.4;
}

.collab-mosaic .mosaic-card__read-link {
    font-family: var(--font-family-body);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #F06236;
    margin-top: var(--spacing-sm);
    display: block;
}

/* Empty state */
.collab-mosaic .mosaic-empty {
    padding: var(--spacing-xl) var(--spacing-lg);
    text-align: center;
    color: #595959;
    font-family: var(--font-family-body);
}

/* Responsive */
@media (max-width: 700px) {
    .collab-mosaic .mosaic-hero__title {
        font-size: 2rem;
    }

    .collab-mosaic .mosaic-hero {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .collab-mosaic .mosaic-grid {
        grid-template-columns: 1fr;
    }

    .collab-mosaic .mosaic-panel {
        padding: 0 var(--spacing-md) var(--spacing-lg);
    }

    .collab-mosaic .mosaic-volumes {
        padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
    }
}
