/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 * WARNING: DO NOT EDIT THIS FILE!
 * 
 * This file is GENERATED from the mdBook build process.
 * It imports theme/css/main.css which contains all styles.
 * 
 * To make CSS changes:
 * 1. Edit files in theme/css/
 * 2. Run ./build-all.sh or ./dev-server.sh
 * 
 * This file is in .gitignore and should NEVER be committed.
 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */

/* COMPILED CSS - DO NOT EDIT DIRECTLY */
/* This file is auto-generated from theme/css/ modules */
/* Edit source files in theme/css/ and run compile-css.py */

/* Google Fonts for signature styling */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@500&display=swap');

/* ========== BASE/VARIABLES.CSS ========== */
/* CSS Custom Properties for City of Rivergrove Documentation Site
 * Phase 1: Extracted from /custom.css to establish consistent design tokens
 */

:root {
  /* ========== COLORS ========== */
  
  /* Primary Brand Colors */
  --color-primary: #0969da;        /* Primary blue (10 uses) */
  --color-primary-light: #3b82f6;  /* Lighter blue variant */
  --color-primary-dark: #0550ae;   /* Darker blue variant */
  --color-primary-hover: #2563eb;  /* Blue hover state */
  
  /* Secondary Colors */
  --color-secondary: #059669;      /* Green accent */
  --color-secondary-light: #10b981; /* Light green */
  --color-secondary-dark: #065f46; /* Dark green */
  
  /* Warning/Alert Colors */
  --color-warning: #d97706;        /* Orange warning */
  --color-warning-light: #f59e0b;  /* Light orange */
  --color-warning-dark: #92400e;   /* Dark orange */
  
  /* Purple/Violet Colors */
  --color-purple: #8b5cf6;         /* Purple accent */
  --color-purple-light: #9333ea;   /* Light purple */
  --color-purple-dark: #6b21a8;    /* Dark purple */
  --color-violet: #7c3aed;         /* Violet variant */
  --color-violet-dark: #5f3dc4;    /* Dark violet */
  
  /* Text Colors */
  --color-text: #333;              /* Primary text (8 uses) */
  --color-text-light: #666;        /* Secondary text (6 uses) */
  --color-text-muted: #6b7280;     /* Muted text (5 uses) */
  --color-text-dark: #111827;      /* Very dark text */
  --color-text-medium: #374151;    /* Medium gray text */
  --color-text-gray: #4b5563;      /* Gray text */
  --color-text-secondary: #6c757d; /* Bootstrap-style secondary */
  --color-text-tertiary: #495057;  /* Bootstrap-style tertiary */
  --color-text-subtle: #9ca3af;    /* Subtle gray text */
  --color-text-placeholder: #999;  /* Form placeholder text */
  
  /* Background Colors */
  --color-bg-primary: #ffffff;     /* Pure white background */
  --color-bg-light: #f8f9fa;       /* Light gray background (8 uses) */
  --color-bg-lighter: #fefefe;     /* Almost white background */
  --color-bg-gray: #f5f5f5;        /* Light gray background */
  --color-bg-subtle: #f9f9f9;      /* Subtle background */
  --color-bg-muted: #f7f9fa;       /* Muted background */
  --color-bg-neutral: #f3f4f6;     /* Neutral background (3 uses) */
  --color-bg-cool: #f1f3f4;        /* Cool background (3 uses) */
  --color-bg-slate: #f9fafb;       /* Slate background */
  
  /* Blue Backgrounds */
  --color-bg-blue-50: #eff6ff;     /* Very light blue background */
  --color-bg-blue-100: #dbeafe;    /* Light blue background */
  --color-bg-blue-200: #e3f2fd;    /* Form field blue background */
  --color-bg-blue-300: #bbdefb;    /* Form field hover blue */
  --color-bg-blue-400: #f0f3ff;    /* Pale blue background */
  
  /* Primary color variants */
  --color-primary-dark: #0d47a1;   /* Darker blue for borders */
  
  /* Green Backgrounds */
  --color-bg-green-50: #d1fae5;    /* Light green background */
  
  /* Purple/Violet Backgrounds */
  --color-bg-purple-50: #ede9fe;   /* Light purple background */
  
  /* Yellow Backgrounds */
  --color-bg-yellow-50: #fef3c7;   /* Light yellow background */
  
  /* Border Colors */
  --color-border: #e5e7eb;         /* Primary border (8 uses) */
  --color-border-light: #e9ecef;   /* Light border (6 uses) */
  --color-border-medium: #dee2e6;  /* Medium border (4 uses) */
  --color-border-gray: #ddd;       /* Gray border (4 uses) */
  --color-border-muted: #d1d5db;   /* Muted border (3 uses) */
  --color-border-subtle: #adb5bd;  /* Subtle border */
  
  /* Special Colors */
  --color-link: #5e9cce;           /* Custom link color */
  --color-nav-dark: #1f2937;       /* Dark navigation background */
  
  /* ========== SPACING ========== */
  
  /* Base spacing unit (typically 4px or 8px) */
  --space-base: 4px;
  
  /* Spacing scale */
  --space-xs: 2px;                 /* Extra small spacing */
  --space-sm: 4px;                 /* Small spacing */
  --space-md: 8px;                 /* Medium spacing */
  --space-lg: 12px;                /* Large spacing */
  --space-xl: 16px;                /* Extra large spacing */
  --space-2xl: 20px;               /* 2X large spacing */
  --space-3xl: 24px;               /* 3X large spacing */
  --space-4xl: 32px;               /* 4X large spacing */
  
  /* Common spacing values found in the CSS */
  --space-padding-sm: 8px;         /* Small padding */
  --space-padding-md: 16px;        /* Medium padding */
  --space-padding-lg: 20px;        /* Large padding */
  --space-padding-xl: 24px;        /* Extra large padding */
  --space-padding-2xl: 32px;       /* 2X large padding */
  
  /* Margin values */
  --space-margin-sm: 8px;          /* Small margin */
  --space-margin-md: 16px;         /* Medium margin */
  --space-margin-lg: 24px;         /* Large margin */
  --space-margin-xl: 32px;         /* Extra large margin */
  
  /* Layout spacing */
  --space-layout-sm: 280px;        /* Small layout spacing (sidebar) */
  --space-layout-md: 300px;        /* Medium layout spacing */
  --space-gap-sm: 10px;            /* Small gap */
  --space-gap-md: 20px;            /* Medium gap */
  --space-gap-lg: 30px;            /* Large gap */
  
  /* ========== TYPOGRAPHY ========== */
  
  /* Font sizes */
  --font-size-xs: 0.75em;          /* Extra small text */
  --font-size-sm: 0.85em;          /* Small text */
  --font-size-md: 1em;             /* Base text size */
  --font-size-lg: 1.125em;         /* Large text */
  --font-size-xl: 1.25em;          /* Extra large text */
  
  /* Line heights */
  --line-height-tight: 1.2;        /* Tight line height */
  --line-height-normal: 1.4;       /* Normal line height */
  --line-height-relaxed: 1.5;      /* Relaxed line height */
  --line-height-loose: 1.6;        /* Loose line height */
  
  /* Font weights */
  --font-weight-normal: 400;       /* Normal font weight */
  --font-weight-medium: 500;       /* Medium font weight */
  --font-weight-semibold: 600;     /* Semi-bold font weight */
  --font-weight-bold: 700;         /* Bold font weight */
  
  /* ========== BORDERS AND RADIUS ========== */
  
  /* Border radius */
  --border-radius-sm: 4px;         /* Small border radius */
  --border-radius-md: 6px;         /* Medium border radius */
  --border-radius-lg: 8px;         /* Large border radius */
  --border-radius-xl: 12px;        /* Extra large border radius */
  
  /* Border widths */
  --border-width-thin: 1px;        /* Thin border */
  --border-width-medium: 2px;      /* Medium border */
  --border-width-thick: 3px;       /* Thick border */
  
  /* ========== SHADOWS ========== */
  
  /* Box shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);              /* Small shadow */
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);            /* Medium shadow */
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);          /* Large shadow */
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);          /* Extra large shadow */
  
  /* ========== TRANSITIONS ========== */
  
  /* Transition durations */
  --transition-fast: 0.15s;        /* Fast transition */
  --transition-normal: 0.2s;       /* Normal transition */
  --transition-slow: 0.3s;         /* Slow transition */
  
  /* Transition easings */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);      /* Smooth ease in-out */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);           /* Ease out */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);            /* Ease in */
  
  /* ========== Z-INDEX SCALE ========== */
  
  --z-dropdown: 1000;              /* Dropdown menus */
  --z-sticky: 1020;                /* Sticky elements */
  --z-fixed: 1030;                 /* Fixed elements */
  --z-modal-backdrop: 1040;        /* Modal backdrops */
  --z-modal: 1050;                 /* Modals */
  --z-popover: 1060;               /* Popovers */
  --z-tooltip: 1070;               /* Tooltips */
  --z-toast: 1080;                 /* Toast notifications */
}

/* ========== BASE/TYPOGRAPHY.CSS ========== */
/*
 * Typography Styles
 * Base typography and heading styles
 * Phase 4: Extracted from custom.css
 */

/* ========================================
 * HEADING STYLES
 * ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-nav-dark);
    margin-top: 1.5rem;
}

/* Reduce spacing after horizontal rules when followed by headers */
hr {
    margin-bottom: 1.5rem;
}

hr + h1,
hr + h2,
hr + h3,
hr + h4,
hr + h5,
hr + h6 {
    margin-top: 0;
}

/* ========================================
 * BLOCKQUOTE STYLES
 * ======================================== */

blockquote {
    background-color: #f7f9fa;
    border-left-color: #4a5568;
}

/* ========================================
 * TABLE SPACING
 * ======================================== */

/* Regular tables (not in blockquotes) keep their default styling */
table {
    margin-top: 1em;
    margin-bottom: 1em;
}

/* ========================================
 * SPECIAL FORMATTING
 * ======================================== */

/* Section references */
.section-ref {
    padding: 4px 8px;
    background: #f0f3ff;
    border-radius: 4px;
    font-size: 11px;
    color: #5f3dc4;
    font-family: monospace;
}

/* Hide hr when followed by document-note */
hr:has(+ .document-note) {
    display: none;
}

/* ========================================
 * DOCUMENT FIGURES
 * Inline images and captions in documents
 * ======================================== */

.document-figure {
    margin: var(--space-padding-xxl) auto;
    text-align: center;
    max-width: 100%;
    page-break-inside: avoid;
}

.document-figure img {
    max-width: 100%;
    height: auto;
    border: var(--border-width-thin) solid var(--color-border);
    padding: var(--space-padding-md);
    background: var(--color-bg-primary);
    box-shadow: var(--shadow-sm);
}

.document-figure figcaption {
    margin-top: var(--space-padding-lg);
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 0.95em;
}

/* ========== LAYOUT/MDBOOK-OVERRIDES.CSS ========== */
/* 
 * mdBook Override Styles
 * Handles mdBook's default behavior that conflicts with our custom navigation
 */

/* IMMEDIATELY hide mdBook's sidebar to prevent flicker */
#sidebar, 
.sidebar {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    opacity: 0 !important;
}

/* Hide the redundant title in mdBook's header */
.menu-title {
    display: none !important;
}

/* Hide the hamburger menu icon - we don't use mdBook's sidebar */
#sidebar-toggle,
.sidebar-toggle {
    display: none !important;
}

/* Set page wrapper margins immediately to prevent layout shift */
.page-wrapper {
    margin-left: var(--space-layout-md) !important;
    margin-right: var(--space-layout-sm) !important;
    transition: none !important;
    animation: none !important;
}

/* Prevent any slide animations */
.page-wrapper,
#content,
.content,
.chapter,
main {
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

/* Hide mdBook's default navigation arrows */
.nav-chapters {
    display: none !important;
}

/* Also hide the navigation arrows that appear on hover */
.nav-wrapper .nav-chapters {
    display: none !important;
}

/* Hide both left and right navigation buttons */
.chapter .nav-wrapper {
    display: none !important;
}

/* Alternative: if the above doesn't work, target them specifically */
.previous, .next {
    display: none !important;
}

/* ========================================
 * CUSTOM LIST OVERRIDES
 * Override mdBook's default list numbering for legal documents
 * ======================================== */

/* Lists with custom markers */
.custom-list-marker {
    margin-right: 0.5em;
}

/* Definition items */
.definition-item {
    margin: 1em 0;
}

.definition-marker {
    margin-right: 0.5em;
}

/* Roman numeral lists */
.roman-list {
    list-style: none;
    padding-left: var(--space-padding-xxl);
}

.roman-list li {
    margin: 0.5em 0;
}

.roman-marker {
    font-weight: normal;
    margin-right: 0.5em;
}

/* Lists with roman numerals in parentheses - override mdBook numbering */
.roman-parenthetical-list {
    list-style: none;
    counter-reset: none;
    padding-left: var(--space-padding-xxl);
}

.roman-parenthetical-list > li {
    list-style: none;
    position: relative;
}

.roman-parenthetical-list > li::before {
    content: none;
}

/* Special numbered lists (e.g., starting at 1.4) */
.special-start-list {
    list-style: none;
    padding-left: var(--space-padding-xxl);
    counter-reset: none;
}

.special-start-list li {
    margin: 0.5em 0;
    position: relative;
    list-style: none;
}

.special-start-list li::before {
    content: none;
}

.special-list-number {
    margin-right: 0.5em;
    display: inline-block;
    min-width: 2em;
}

/* Custom numbered lists with explicit markers */
ol.custom-numbered-list {
    list-style: none;
    padding-left: 2em;
    counter-reset: none;
}

ol.custom-numbered-list > li {
    list-style: none;
    position: relative;
    margin: 0.5em 0;
}

ol.custom-numbered-list > li::before {
    content: none;
}

ol.custom-numbered-list .custom-list-marker {
    position: absolute;
    left: -2em;
    display: inline-block;
    min-width: 2em;
}

/* Style for roman numeral sublists within numbered items */
.roman-sublist {
    margin-top: 0.5em;
    margin-left: 2em;
    display: block;
}

.roman-sublist-item {
    display: block;
    margin: 0.25em 0;
    position: relative;
    padding-left: 2em;
}

.roman-sublist-item .roman-marker {
    position: absolute;
    left: 0;
    font-weight: normal;
}

/* Unordered lists that contain only roman numerals - remove bullets */
ul.roman-list-no-bullets {
    list-style: none;
    padding-left: 2em;
}

ul.roman-list-no-bullets > li {
    list-style: none;
    position: relative;
    margin: 0.5em 0;
}

ul.roman-list-no-bullets > li::before {
    content: none;
}

/* Unordered lists that contain alpha markers (a), (b), etc. - remove bullets */
ul.alpha-list-no-bullets {
    list-style: none;
    padding-left: 2em;
}

ul.alpha-list-no-bullets > li {
    list-style: none;
    position: relative;
    margin: 0.5em 0;
}

ul.alpha-list-no-bullets > li::before {
    content: none;
}

/* Style the alpha markers in blue */
ul.alpha-list-no-bullets .list-marker-alpha {
    color: var(--color-primary, #0969da);
    font-weight: normal;
}

/* Unordered lists that contain numeric markers (1), (2), etc. - remove bullets */
ul.numeric-list-no-bullets {
    list-style: none;
    padding-left: 2em;
}

ul.numeric-list-no-bullets > li {
    list-style: none;
    position: relative;
    margin: 0.5em 0;
}

ul.numeric-list-no-bullets > li::before {
    content: none;
}

/* Style the numeric markers in blue */
ul.numeric-list-no-bullets .list-marker-numeric {
    color: var(--color-primary, #0969da);
    font-weight: normal;
}

ol.special-start-list li::before {
    content: none;
}

/* Style all ordered list markers in blue */
ol li::marker {
    color: var(--color-primary, #0969da);
}

/* Alphabetical lists (a), (b), (c) */
.alpha-list {
    list-style-type: lower-alpha;
    padding-left: 2em;
}

.alpha-list li {
    margin: 0.5em 0;
}

/* ========== LAYOUT/PAGE-STRUCTURE.CSS ========== */
/*
 * Page Structure and Layout
 * General page layout, spacing, and structural elements
 */

/* Reduce spacing after horizontal rules when followed by headers */
hr {
    margin-bottom: 1.5rem;
}

hr + h1,
hr + h2,
hr + h3,
hr + h4,
hr + h5,
hr + h6 {
    margin-top: 0;
}

/* Also reduce the default top margin for headers in general */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5rem;
}

/* Regular tables (not in blockquotes) keep their default styling */
table {
    margin-top: 1em;
    margin-bottom: 1em;
}

/* Optional: Make blockquotes slightly lighter to reduce the blue tint */
blockquote {
    /* Existing blockquote styles maintained by mdBook */
}

/* ========== LAYOUT/RESPONSIVE.CSS ========== */
/*
 * Responsive Design Styles
 * Media queries and responsive adjustments
 * Phase 4: Extracted from custom.css
 */

/* ========================================
 * TABLET BREAKPOINT (1200px)
 * ======================================== */

@media (max-width: 1200px) {
    /* Right panel adjustments */
    .right-panel {
        width: 250px;
    }
    
    .relationship-items {
        max-height: 200px;
    }
}

/* ========================================
 * MOBILE BREAKPOINT (768px)
 * ======================================== */

@media (max-width: 768px) {
    /* Right panel - always collapsed on mobile */
    .right-panel {
        transform: translateX(100%);
    }
    
    .right-panel.collapsed {
        transform: translateX(100%);
    }
    
    /* Navigation adjustments */
    .nav-header {
        padding: var(--space-padding-sm);
    }
    
    .nav-controls {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-margin-sm);
    }
    
    .nav-view-toggle {
        width: 100%;
    }
    
    /* Document cards responsive */
    .simple-cards {
        grid-template-columns: 1fr;
    }
    
    /* Form controls */
    .nav-section-selector {
        width: 100%;
    }
    
    .sort-toggle {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
 * SMALL MOBILE BREAKPOINT (480px)
 * ======================================== */

@media (max-width: 480px) {
    /* Further reduce padding on very small screens */
    .nav-header {
        padding: var(--space-padding-xs);
    }
    
    /* Stack all controls vertically */
    .nav-view {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Full width buttons */
    .nav-btn {
        width: 100%;
    }
    
    /* Smaller text for space efficiency */
    .doc-title {
        font-size: 12px;
    }
    
    .doc-number {
        font-size: 10px;
        min-width: 50px;
    }
}

/* ========================================
 * PRINT STYLES
 * ======================================== */

@media print {
    /* Hide navigation elements */
    .sidebar,
    .nav-header,
    .nav-controls,
    .nav-stats,
    .right-panel,
    #sidebar-resize-handle,
    .sidebar-resize-handle {
        display: none;
    }
    
    /* Document notes print styling */
    .document-note {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .document-note::after {
        content: none; /* Hide emoji in print */
    }
    
    /* Ensure content takes full width */
    .content {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* Page break control */
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    table, blockquote, pre {
        page-break-inside: avoid;
    }
    
    /* Remove backgrounds and shadows */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Ensure links are visible */
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    /* High contrast for printing */
    body {
        color: #000;
        background: #fff;
    }
}

/* ========================================
 * HIGH DPI DISPLAYS
 * ======================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Thinner borders for retina displays */
    .nav-btn,
    .section-dropdown-btn,
    .doc-link {
        border-width: 0.5px;
    }
}

/* ========================================
 * LANDSCAPE ORIENTATION
 * ======================================== */

@media (orientation: landscape) and (max-height: 600px) {
    /* Reduce vertical spacing in landscape mode */
    .nav-header {
        padding: var(--space-padding-xs) var(--space-padding-sm);
    }
    
    .nav-stats {
        padding: 4px 8px;
    }
    
    /* Smaller controls */
    .nav-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* ========================================
 * DARK MODE SUPPORT
 * ======================================== */

@media (prefers-color-scheme: dark) {
    /* This section can be expanded when dark mode is implemented */
    /* Currently placeholder for future dark mode support */
}

/* ========================================
 * REDUCED MOTION
 * ======================================== */

@media (prefers-reduced-motion: reduce) {
    /* Remove all transitions and animations */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Remove transform effects */
    .doc-link:hover,
    .nav-btn:hover,
    .btn:hover {
        transform: none;
    }
}

/* ========== COMPONENTS/CARDS.CSS ========== */
/*
 * Card Components
 * Reusable card styles for landing pages, document cards, etc.
 */

/* Simple Landing Page Cards */
.simple-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-gap-md);
    margin: var(--space-gap-lg) 0;
}

.simple-card {
    background: var(--color-bg-primary);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: var(--space-padding-lg);
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.simple-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.simple-card h3 {
    margin: 0 0 var(--space-margin-sm) 0;
    font-size: 18px;
}

.simple-card h3 a {
    color: var(--color-nav-dark);
    text-decoration: none;
}

.simple-card h3 a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.simple-card p {
    margin: 5px 0;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: var(--line-height-relaxed);
}

.simple-card .doc-count {
    margin-top: var(--space-margin-sm);
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
}

/* Document Cards */
.doc-card {
    background: var(--color-bg-primary);
    border: var(--border-width-medium) solid var(--color-border);
    border-radius: var(--border-radius-xl);
    padding: var(--space-padding-xl);
    text-decoration: none !important;
    color: inherit !important;
    transition: all var(--transition-slow) ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: height var(--transition-slow) ease;
}

.ordinances-card::before { background: var(--color-primary-light); }
.resolutions-card::before { background: var(--color-secondary-light); }
.interpretations-card::before { background: var(--color-warning-light); }
.transcripts-card::before { background: var(--color-purple); }

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.doc-card:hover::before {
    height: 8px;
}

.card-icon {
    font-size: 48px;
    margin-bottom: var(--space-margin-md);
    opacity: 0.9;
}

.doc-card h2 {
    margin: 0 0 var(--space-margin-sm) 0;
    font-size: 20px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-nav-dark);
}

.card-description {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: var(--line-height-relaxed);
    margin: 0 0 auto 0;
}

.card-stats {
    margin-top: var(--space-margin-md);
    padding: 6px 12px;
    background: var(--color-bg-neutral);
    border-radius: 20px;
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-gray);
}

/* ========================================
 * SIMPLE LANDING PAGE CARDS
 * ======================================== */

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

.simple-card {
    background: var(--color-bg-primary);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: var(--space-padding-lg);
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.simple-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.simple-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.simple-card h3 a {
    color: var(--color-nav-dark);
    text-decoration: none;
}

.simple-card h3 a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.simple-card p {
    margin: 5px 0;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: var(--line-height-relaxed);
}

.simple-card .doc-count {
    margin-top: var(--space-margin-sm);
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
}

/* ========== COMPONENTS/FOOTNOTES.CSS ========== */
/*
 * Footnotes Component
 * Styling for document footnotes and references
 */

/* Footnotes Styling */
.footnotes {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-top: 1em;
    padding-top: 1em;
    border-top: var(--border-width-thin) solid var(--color-border);
    max-width: 100%;
}

.footnotes p {
    margin: 0.5em 0;
    line-height: var(--line-height-normal);
}

/* Style for footnote references in tables */
table sup {
    font-size: var(--font-size-xs);
    color: var(--color-primary-light);
    font-weight: var(--font-weight-semibold);
}

/* ========== COMPONENTS/TABLES.CSS ========== */
/*
 * Table Component
 * Enhanced table styling, especially for tables in blockquotes
 */

/* Improve table contrast in blockquotes */
blockquote table {
    background-color: var(--color-bg-primary);
    border: var(--border-width-thin) solid var(--color-border-gray);
}

blockquote table thead {
    background-color: var(--color-bg-gray);
    border-bottom: var(--border-width-medium) solid var(--color-border-gray);
}

blockquote table thead th {
    background-color: var(--color-bg-gray);
    color: var(--color-text);
    font-weight: var(--font-weight-semibold);
    border: var(--border-width-thin) solid var(--color-border-gray);
}

blockquote table tbody tr {
    background-color: var(--color-bg-primary);
}

blockquote table tbody tr:nth-child(even) {
    background-color: var(--color-bg-subtle);
}

blockquote table td {
    border: var(--border-width-thin) solid var(--color-border-gray);
    color: var(--color-text);
}

/* Ensure text in blockquote tables is readable */
blockquote table th,
blockquote table td {
    padding: var(--space-padding-sm) 12px;
}

/* ========================================
 * TABLE FOOTNOTES
 * ======================================== */

.table-footnotes {
    margin-top: 0.5em;
    padding: 0.75em;
    background-color: #f8f9fa;
    border-left: 3px solid #dee2e6;
    font-size: 0.9em;
    color: #495057;
    border-radius: 4px;
}

/* Ensure footnotes are visually separated from tables */
table + .table-footnotes {
    margin-top: 1em;
}

/* Style for the footnote numbers and text */
.table-footnotes p {
    margin: 0.25em 0;
    line-height: 1.5;
}

/* ========== COMPONENTS/LISTS.CSS ========== */
/* 
 * List Styles
 * Unified styling for all list types in legal documents
 * 
 * This is the SINGLE SOURCE OF TRUTH for list styling.
 * All list-related CSS should be here, not scattered across files.
 */

/* ========================================
 * STANDARD ORDERED LISTS
 * Regular numbered lists: 1., 2., 3.
 * ======================================== */

/* Make standard ordered list markers blue */
ol li::marker {
    color: var(--color-primary, #0969da);
}

/* ========================================
 * MANUAL NOTATION LISTS
 * Lists with (a), (b) or (1), (2) notation
 * ======================================== */

/* Hide bullets for lists with manual notation */
.alpha-list,
.numeric-list,
.roman-list {
    list-style: none;
    list-style-type: none;
    padding-left: 2em;
}

/* Ensure list items have proper spacing and no bullets */
.alpha-list li,
.numeric-list li,
.roman-list li {
    list-style: none;
    list-style-type: none;
    margin: 0.5em 0;
    position: relative;
}

/* Extra specificity to override any mdBook defaults */
.content ul.alpha-list,
.content ul.numeric-list,
.content ul.roman-list,
#content ul.alpha-list,
#content ul.numeric-list,
#content ul.roman-list,
.page ul.alpha-list,
.page ul.numeric-list,
.page ul.roman-list {
    list-style: none;
    list-style-type: none;
}

.content ul.alpha-list > li,
.content ul.numeric-list > li,
.content ul.roman-list > li,
#content ul.alpha-list > li,
#content ul.numeric-list > li,
#content ul.roman-list > li,
.page ul.alpha-list > li,
.page ul.numeric-list > li,
.page ul.roman-list > li {
    list-style: none;
    list-style-type: none;
}

/* Remove any pseudo-element bullets */
.alpha-list li::before,
.numeric-list li::before,
.roman-list li::before {
    content: none;
}

/* ========================================
 * LIST MARKERS
 * Styled spans for (a), (1), (i) markers
 * ======================================== */

/* Base marker styling - applies to all manual markers */
.list-marker-alpha,
.list-marker-numeric,
.list-marker-roman {
    color: var(--color-primary, #0969da);
    margin-right: 0.25em;
    display: inline-block;
}

/* Numeric markers */
.list-marker-numeric {
    min-width: 1.5em;
}

/* Alpha markers */
.list-marker-alpha {
    min-width: 1.5em;
}

/* Roman numerals - most are narrow except for larger numbers */
.list-marker-roman {
    min-width: 1.75em;
}

/* ========================================
 * NESTED LISTS
 * Proper indentation for nested structures
 * ======================================== */

/* Nested lists should indent further */
ul ul, ul ol, ol ul, ol ol {
    padding-left: 2em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Nested manual notation lists */
.alpha-list .numeric-list,
.alpha-list .roman-list,
.numeric-list .roman-list {
    padding-left: 2em;
}

/* Visual indentation for complex nesting patterns */
/* When numeric items appear in an alpha list (indicates nesting) */
.alpha-list li .list-marker-numeric {
    margin-left: 2em;
}

/* When roman items appear in an alpha/numeric list (double nesting) */
.alpha-list li .list-marker-roman,
.numeric-list li .list-marker-roman {
    margin-left: 4em;
}

/* ========================================
 * SPECIAL CASES
 * Edge cases and document-specific needs
 * ======================================== */

/* Lists inside blockquotes (common in ordinances) */
blockquote ul,
blockquote ol {
    margin-left: 0;
    padding-left: 1.5em;
}

blockquote .alpha-list,
blockquote .numeric-list,
blockquote .roman-list {
    padding-left: 1em;
}

/* Definition-style lists (term followed by description) */
.definition-list {
    list-style: none;
    padding-left: 0;
}

.definition-list li {
    margin: 1em 0;
}

.definition-term {
    font-weight: bold;
    color: var(--color-primary, #0969da);
    display: block;
    margin-bottom: 0.25em;
}

/* ========================================
 * DOCUMENT NOTES LISTS
 * Lists within Document Notes sections
 * ======================================== */

.document-notes ul,
.document-notes ol {
    margin-left: 1em;
}

.document-notes .alpha-list,
.document-notes .numeric-list {
    padding-left: 1em;
}

/* Lists inside note-content should not have extra padding */
.note-content ul.alpha-list,
.note-content ul.numeric-list,
.note-content ul.roman-list {
    padding-left: 0;
    margin-left: 0;
}

/* The list items themselves should have normal spacing */
.note-content .alpha-list li,
.note-content .numeric-list li,
.note-content .roman-list li {
    margin-left: 0;
}

/* ========================================
 * RESPONSIVE ADJUSTMENTS
 * Mobile-friendly list spacing
 * ======================================== */

@media (max-width: 768px) {
    .alpha-list,
    .numeric-list,
    .roman-list {
        padding-left: 1.5em;
    }
    
    ul ul, ul ol, ol ul, ol ol {
        padding-left: 1.5em;
    }
}

/* ========================================
 * LISTS IN TABLES
 * Style list notation within table cells
 * ======================================== */

/* Style parenthetical markers in table cells */
table td {
    /* This would need JavaScript to properly wrap the markers */
    /* For now, we'll note this as a limitation */
}

/* ========================================
 * PRINT STYLES
 * Optimized for PDF/print output
 * ======================================== */

@media print {
    /* Ensure markers are visible in print */
    .list-marker-alpha,
    .list-marker-numeric,
    .list-marker-roman {
        color: #000;
        font-weight: bold;
    }
    
    ol li::marker {
        color: #000;
    }
}

/* ========== COMPONENTS/NAVIGATION.CSS ========== */
/*
 * Navigation Component Styles
 * Handles sidebar navigation for all document types
 * Phase 4: Extracted from custom.css
 */

/* ========================================
 * NAVIGATION SIDEBAR BASE
 * ======================================== */

/* Override mdBook sidebar styling with higher specificity */
html .sidebar,
.chapter .sidebar {
    background: var(--color-bg-lighter);
    border-right: var(--border-width-thin) solid var(--color-border);
}

html .sidebar-scrollbox,
.chapter .sidebar-scrollbox {
    padding-bottom: 80px; /* More space for floating stats to prevent bounce */
    overflow-y: auto;
}

/* Sidebar Resize Handle */
html #sidebar-resize-handle,
html .sidebar-resize-handle {
    width: 5px;
    cursor: col-resize;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Hide the ugly default indicator */
html .sidebar-resize-indicator {
    display: none;
}

/* Visual feedback ONLY on hover */
html #sidebar-resize-handle:hover,
html .sidebar-resize-handle:hover {
    background: rgba(100, 100, 100, 0.1);
}

/* Active state while dragging */
html .sidebar-resizing #sidebar-resize-handle,
html .sidebar-resizing .sidebar-resize-handle {
    background: rgba(100, 100, 100, 0.2);
}

/* Add a very subtle visual line on hover */
#sidebar-resize-handle:hover::before,
.sidebar-resize-handle:hover::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background: rgba(100, 100, 100, 0.3);
    border-radius: 1px;
}

/* ========================================
 * SIDEBAR LIST STRUCTURE
 * ======================================== */

/* Remove sidebar numbering */
html .sidebar .sidebar-scrollbox ol.chapter {
    list-style-type: none;
    padding-left: 0;
    margin-left: 0;
}

html .sidebar .sidebar-scrollbox ol.chapter li {
    list-style-type: none;
    list-style: none;
}

html .sidebar ol {
    list-style-type: none;
    list-style: none;
}

html .sidebar li {
    list-style-type: none;
    list-style: none;
}

html .sidebar ol ol {
    list-style-type: none;
}

html .sidebar * {
    list-style-type: none;
}

/* Preserve the main content area lists */
.content ol {
    list-style-type: decimal;
}

.content ul {
    list-style-type: disc;
}

/* ========================================
 * NAVIGATION CONTROLS
 * ======================================== */

/* Navigation header container */
.nav-header {
    padding: var(--space-padding-md);
    background: var(--color-bg-light);
    border-bottom: var(--border-width-thin) solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    gap: var(--space-margin-sm);
}

/* View toggle buttons */
.nav-view-toggle {
    display: flex;
    gap: 2px;
    background: #e5e7eb;
    padding: 2px;
    border-radius: 6px;
}

.nav-btn {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
    flex: 1;
    text-align: center;
}

.nav-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.nav-btn.active {
    background: #0969da;
    color: white;
    border-color: #0969da;
}

.nav-btn.active:hover {
    background: #0550ae;
}

/* Document count stats */
.nav-stats {
    font-size: 10px;
    color: #6b7280;
    text-align: center;
    padding: 8px 12px;
    background: white;
    border-top: 1px solid #e5e7eb;
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 101;
    margin-top: auto;
}

.nav-stats #docCount {
    font-weight: 600;
    color: #1f2937;
}

/* ========================================
 * DOCUMENT LIST ITEMS
 * ======================================== */

/* Document list styling */
html .chapter li.chapter-item {
    padding: 0;
    margin-bottom: 2px;
    background: transparent;
    border: none;
    list-style: none;
}

/* Navigation links */
html .chapter li.chapter-item a.doc-link {
    display: flex;
    align-items: center;
    gap: var(--space-margin-sm);
    padding: var(--space-padding-sm) var(--space-margin-sm);
    font-size: 12px;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: background-color 0.15s ease, transform 0.15s ease;
    border: var(--border-width-thin) solid transparent;
    position: relative;
    background: transparent;
    line-height: var(--line-height-relaxed);
    text-decoration: none;
    color: inherit;
    width: 100%;
    box-sizing: border-box;
}

/* General chapter links */
html .chapter li a {
    color: var(--color-text);
    text-decoration: none;
    display: block;
    font-size: 12px;
}

/* Format the ordinance number to stand out */
.chapter li a::before {
    content: '';
}

.chapter a[href*="ordinances"] {
    font-size: 12px;
}

/* Style the ordinance number differently */
html .chapter a:not(.toggle) {
    color: var(--color-text);
}

/* ========================================
 * SECTION HEADERS
 * ======================================== */

/* Fix mdBook section headers */
html .chapter > li.spacer {
    display: none;
    height: 0;
    margin: 0;
    padding: 0;
    min-height: 0;
}

/* Section headers */
html .chapter > li.part-title {
    background: var(--color-bg-cool);
    font-weight: var(--font-weight-semibold);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: var(--space-margin-sm) 0 5px 0;
    padding: 6px var(--space-margin-sm);
    color: var(--color-text-light);
    cursor: default;
    border: none;
}

/* Hide empty anchor tags that create space */
html .chapter li > a:empty {
    display: none;
}

/* Hide separator lines between sections */
html .chapter > li.affix {
    display: none;
}

/* ========================================
 * HOVER & ACTIVE STATES
 * ======================================== */

/* Hover states */
html .chapter li:not(.selected):not(.active) a.doc-link:hover {
    background: var(--color-bg-light);
    border-color: var(--color-border-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Part title hover */
html .chapter li.part-title:hover {
    background: var(--color-bg-cool);
    transform: none;
    box-shadow: none;
}

/* Override mdBook's default active styling */
html .sidebar .chapter li > a.active:not(.doc-link),
html .sidebar .chapter li.chapter-item > a.active:not(.doc-link) {
    background: transparent;
    color: inherit;
    border: none;
    border-left: none;
}

/* Hide mdBook's default active state during transitions */
html .sidebar-transitioning .chapter li > a.active:not(.selected):not(.doc-link) {
    background: transparent;
    border: none;
    transition: none;
}

/* Prevent any visual changes during transition */
html .sidebar-transitioning * {
    transition: none;
}

/* Custom controlled sidebar */
html .chapter.custom-controlled li > a.active:not(.doc-link):not(.selected) {
    background: transparent;
    color: inherit;
    border: none;
    border-left: none;
    transition: none;
}

/* ========================================
 * SELECTED/ACTIVE DOCUMENT STATES
 * ======================================== */

/* Selected/active state for sidebar items */
.sidebar .chapter li.selected,
.sidebar .chapter li.active {
    position: relative;
}

/* Use higher specificity for selected state */
.sidebar .chapter.custom-controlled li.selected,
.sidebar .chapter.custom-controlled li.active,
html .sidebar .chapter li.selected,
html .sidebar .chapter li.active {
    background: var(--color-bg-blue-200);
    margin-left: -10px;
    margin-right: -10px;
    padding-left: var(--space-padding-sm);
    padding-right: var(--space-padding-sm);
    border-left: var(--border-width-thick) solid var(--color-primary);
}

/* Selected doc-links styling */
html .sidebar .chapter.custom-controlled li.selected > a.doc-link,
html .sidebar .chapter.custom-controlled li.active > a.doc-link,
html .sidebar .chapter.custom-controlled li a.doc-link.selected,
html .sidebar .chapter.custom-controlled li a.doc-link.active,
html .sidebar .chapter li.selected > a.doc-link,
html .sidebar .chapter li.active > a.doc-link,
html .sidebar .chapter li a.doc-link.selected,
html .sidebar .chapter li a.doc-link.active {
    background: transparent;
    padding-left: 7px;
    box-shadow: none;
    font-weight: var(--font-weight-medium);
}

/* Hover state for selected items */
html .chapter li.selected > a:hover,
html .chapter li.active > a:hover,
html .chapter li.selected a.doc-link:hover,
html .chapter li.active a.doc-link:hover {
    background: var(--color-bg-blue-300);
    transform: none;
}

/* Hover for non-selected items */
html .chapter li:not(.selected):not(.active) a:hover {
    background: var(--color-bg-light);
    border-color: var(--color-border-light);
}

/* Selected state for grouped items */
html .chapter li.grouped-item.selected > a,
html .chapter li.grouped-item.active > a {
    margin-left: 0;
    padding-left: 7px;
    margin-right: 0;
}

/* ========================================
 * DOCUMENT LINK COMPONENTS
 * ======================================== */

.doc-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.doc-link:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.doc-number {
    font-weight: 600;
    color: #0969da;
    min-width: 60px;
    font-size: 11px;
}

.doc-title {
    flex: 1;
    font-size: 13px;
}

.doc-year {
    color: #9ca3af;
    font-size: 10px;
    margin-left: auto;
    font-weight: 500;
}

/* ========================================
 * GROUPED VIEWS (TOPIC/DECADE)
 * ======================================== */

/* Topic groups */
html .topic-group {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Grouped items under headers */
html .chapter-item.grouped-item {
    margin-left: var(--space-margin-sm);
    margin-bottom: 2px;
}

html .chapter-item.grouped-item a.doc-link {
    padding-left: var(--space-margin-sm);
    font-size: 12px;
}

/* ========== COMPONENTS/RELATIONSHIPS-PANEL.CSS ========== */
/*
 * Relationships Panel Component
 * Right sidebar panel for document relationships and metadata
 * Phase 4: Extracted from custom.css
 */

/* ========================================
 * RIGHT PANEL CONTAINER
 * ======================================== */

.right-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: white;
    border-left: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    z-index: 999;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.right-panel.collapsed {
    transform: translateX(100%);
}

/* ========================================
 * PANEL HEADER
 * ======================================== */

.right-panel-header {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.right-panel-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    flex: 1;
}

.panel-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-toggle:hover {
    color: #333;
}

/* ========================================
 * PANEL CONTENT
 * ======================================== */

.right-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.panel-placeholder {
    color: #999;
    font-size: 12px;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* ========================================
 * CURRENT DOCUMENT DISPLAY
 * ======================================== */

.current-document {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.current-document h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
}

.doc-meta {
    margin: 0;
    font-size: 11px;
    color: #666;
}

/* ========================================
 * RELATIONSHIP SECTIONS
 * ======================================== */

.relationship-section {
    margin-bottom: 16px;
}

.relationship-section h5 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
    cursor: pointer;
    user-select: none;
}

/* Color-coded relationship sections */
.relationship-section.amendments h5 {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #d97706;
}

.relationship-section.references h5 {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #0969da;
}

.relationship-section.interpretations h5 {
    background: #ede9fe;
    color: #6b21a8;
    border-left: 4px solid #7c3aed;
}

.relationship-section.related h5 {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #059669;
}

/* ========================================
 * RELATIONSHIP COUNT BADGES
 * ======================================== */

.relationship-count {
    margin-left: auto;
    background: #666;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 500;
    min-width: 16px;
    text-align: center;
}

.relationship-section.amendments .relationship-count {
    background: #d97706;
}

.relationship-section.references .relationship-count {
    background: #2563eb;
}

.relationship-section.interpretations .relationship-count {
    background: #9333ea;
}

.relationship-section.related .relationship-count {
    background: #059669;
}

/* ========================================
 * RELATIONSHIP ITEMS
 * ======================================== */

.relationship-items {
    padding: 12px;
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
}

.relationship-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.relationship-item:last-child {
    margin-bottom: 0;
}

.relationship-item:hover {
    background: #f8f9fa;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.rel-doc-number {
    font-weight: 600;
    color: #0969da;
    font-size: 11px;
    min-width: 60px;
}

.rel-doc-title {
    flex: 1;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
}

.rel-doc-type {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
 * RESPONSIVE ADJUSTMENTS
 * ======================================== */

@media (max-width: 1200px) {
    .right-panel {
        width: 250px;
    }
    
    .relationship-items {
        max-height: 200px;
    }
}

@media (max-width: 768px) {
    .right-panel {
        transform: translateX(100%);
    }
    
    .right-panel.collapsed {
        transform: translateX(100%);
    }
}

/* ========== COMPONENTS/FORM-CONTROLS.CSS ========== */
/*
 * Form Controls Component
 * Buttons, dropdowns, toggles and form elements
 * Phase 4: Extracted from custom.css
 */

/* ========================================
 * SECTION SELECTOR DROPDOWN
 * ======================================== */

.nav-section-selector {
    position: relative;
    flex: 1;
}

.section-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
    font-weight: 500;
}

.section-dropdown-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.section-dropdown-btn .dropdown-arrow {
    color: #6b7280;
    font-size: 12px;
}

.nav-section-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.nav-section-dropdown.active {
    display: block;
}

.section-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.section-option:last-child {
    border-bottom: none;
}

.section-option:hover {
    background: #f9fafb;
}

.section-option.selected {
    background: #eff6ff;
    color: #0969da;
    font-weight: 500;
}

/* ========================================
 * SORT TOGGLE BUTTONS
 * ======================================== */

.sort-toggle {
    display: inline-flex;
    gap: 2px;
    background: #e5e7eb;
    padding: 2px;
    border-radius: 6px;
}

.sort-toggle-btn {
    width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    color: #9ca3af;
    padding: 0;
    line-height: 1;
}

.sort-toggle-btn span {
    display: block;
    line-height: 1;
}

.sort-toggle-btn:hover {
    color: #374151;
}

.sort-toggle-btn.active {
    background: white;
    color: #111827;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* ========================================
 * SEARCH INPUT
 * ======================================== */

.nav-search {
    position: relative;
    margin-bottom: 10px;
}

.nav-search-input {
    width: 100%;
    padding: 8px 32px 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    transition: all 0.2s;
}

.nav-search-input:focus {
    outline: none;
    border-color: #0969da;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.nav-search-input::placeholder {
    color: #9ca3af;
}

.nav-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    line-height: 1;
    display: none;
}

.nav-search-clear:hover {
    color: #6b7280;
}

.nav-search-input:not(:placeholder-shown) ~ .nav-search-clear {
    display: block;
}

/* ========================================
 * VIEW MODE CONTROLS
 * ======================================== */

.nav-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.nav-view {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-view label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

/* ========================================
 * GENERAL BUTTON STYLES
 * ======================================== */

.btn {
    padding: 8px 16px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--color-bg-light);
    color: var(--color-text);
    border: var(--border-width-thin) solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-lighter);
    border-color: var(--color-border-dark);
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

/* ========================================
 * TOGGLE SWITCHES
 * ======================================== */

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

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

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

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

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

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* ========== COMPONENTS/FORM-FIELDS.CSS ========== */
/* 
 * Form Fields and Document Processing Styles
 * Handles {{filled:}} notations and other document markup
 */

/* Empty form fields - shows underline for blank spaces */
.form-field-empty {
    display: inline-block;
    border-bottom: var(--border-width-thin) solid var(--color-text-light);
    margin: 0 2px;
    cursor: default;
    vertical-align: baseline;
    height: 1em;
    position: relative;
}

.form-field-empty:hover {
    background-color: var(--color-bg-neutral);
    border-bottom-color: var(--color-text-muted);
}

/* Tooltip for blank fields */
.form-field-empty::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-nav-dark);
    color: var(--color-bg-primary);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    /* Explicit font reset for consistency */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: normal;
    font-style: normal;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
    transition-delay: 0.5s;
    margin-top: 4px;
    z-index: 100000;
}

.form-field-empty:hover::after {
    opacity: 1;
}

/* Form field size variants */
.form-field-short {
    min-width: 60px;
}

.form-field-medium {
    min-width: 120px;
}

.form-field-long {
    min-width: 200px;
}

/* Filled form fields - highlighted with blue background */
.form-field-filled {
    display: inline-block;
    padding: 2px var(--space-padding-xs) 4px var(--space-padding-xs);
    background-color: var(--color-bg-blue-200);
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-text);
    cursor: default;
    position: relative;
    margin: 0 3px;
    vertical-align: baseline;
    line-height: 1.4;
}

.form-field-filled:hover {
    background-color: var(--color-bg-blue-300);
    border-bottom-color: var(--color-primary-dark);
    z-index: 1000;
}

/* Tooltip for filled fields */
.form-field-filled::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-nav-dark);
    color: var(--color-bg-primary);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    /* Explicit font reset for consistency */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: normal;
    font-style: normal;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
    transition-delay: 0.2s;
    margin-top: 4px;
    z-index: 100000;
}

.form-field-filled:hover::after {
    opacity: 1;
    transition-delay: 0.3s;
}

/* Ensure tooltips appear above other elements */
.form-field-filled:hover,
.form-field-empty:hover {
    z-index: 1000;
}

/* Force no help cursor for form fields */
.form-field-filled,
.form-field-filled:hover,
.form-field-empty,
.form-field-empty:hover {
    cursor: default;
}

/* Hide native browser tooltips */
.form-field-filled[title],
.form-field-empty[title] {
    cursor: default;
}

.form-field-filled[title]:hover::before,
.form-field-empty[title]:hover::before {
    content: '';
}

/* Special positioning for tooltips in headings */
h1 .form-field-filled::after,
h2 .form-field-filled::after,
h3 .form-field-filled::after,
h1 .form-field-empty::after,
h2 .form-field-empty::after,
h3 .form-field-empty::after {
    top: 100%;
    bottom: auto;
    margin-top: 8px;
    margin-bottom: 0;
    font-weight: normal;
    font-size: 12px;
}

/* Special styling for form fields in headings */
h1 .form-field-filled, 
h2 .form-field-filled, 
h3 .form-field-filled {
    font-size: inherit;
    font-weight: inherit;
    vertical-align: baseline;
}

h1 .form-field-empty, 
h2 .form-field-empty, 
h3 .form-field-empty {
    vertical-align: baseline;
    height: 0.8em;
    margin-bottom: -0.1em;
}

/* Signature blocks */
.signature-block {
    margin: var(--space-padding-xxl) 0;
    padding: var(--space-padding-lg) 0;
    border-top: var(--border-width-thin) solid var(--color-border);
}

.signature-line {
    display: inline-block;
    border-bottom: var(--border-width-thin) solid var(--color-text-muted);
    min-width: 200px;
    margin: var(--space-padding-sm) 0;
}

.attestation-block {
    margin: var(--space-padding-xxl) 0;
    padding: var(--space-padding-lg);
    background: var(--color-bg-light);
    border-left: 4px solid var(--color-primary);
    font-style: italic;
}

/* Title and role styling */
.signature-title {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    margin-top: var(--space-padding-sm);
}

.signature-date {
    color: var(--color-text-light);
    font-size: 0.95em;
    margin-top: var(--space-padding-xs);
}

/* Signature mark - represents {{signature}} in documents */
.signature-mark {
    display: inline-block;
    font-family: 'Dancing Script', 'Brush Script MT', 'Lucida Handwriting', cursive, serif;
    font-size: 1.4em;
    font-weight: 500;
    /* Use rgba for color instead of opacity to avoid affecting child elements */
    color: rgba(74, 123, 167, 0.75); /* #4a7ba7 with 0.75 opacity */
    padding: 0 8px;
    position: relative;
    cursor: default;  /* Match form fields cursor */
}

/* Tooltip for signatures - match form fields exactly */
.signature-mark::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-nav-dark);
    color: var(--color-bg-primary);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    /* Reset font inheritance from Dancing Script */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: normal;
    font-style: normal;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
    transition-delay: 0.2s;
    margin-top: 4px;
    z-index: 100000;
}

.signature-mark:hover::after {
    opacity: 1;
    transition-delay: 0.3s;
}

/* Print styles for signature mark */
@media print {
    .signature-mark {
        font-family: serif !important;
        font-style: italic !important;
        color: #333 !important;
        opacity: 1 !important;
    }
    
    .signature-mark::after {
        display: none;
    }
}

/* ========== DOCUMENTS/DOCUMENT-NOTES.CSS ========== */
/*
 * Document Notes Component
 * Special styling for digitization notes and document metadata
 */

.document-note {
    margin: 30px 0;
    padding: var(--space-padding-lg) var(--space-padding-lg) var(--space-padding-lg) 50px;
    background: var(--color-bg-primary);
    border: var(--border-width-thin) solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    position: relative;
    box-shadow: var(--shadow-sm);
}

/* Top accent bar for visual separation */
.document-note::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #0969da;
    border-radius: 4px 4px 0 0;
    z-index: 1;
}

/* Note icon */
.document-note::after {
    content: "📝";
    position: absolute;
    left: 18px;
    top: var(--space-padding-lg);
    font-size: 18px;
}

/* Note heading - always shows as "Document Notes" */
.document-note h2 {
    margin: 0 0 var(--space-margin-sm) 0;
    padding-bottom: 12px;
    color: var(--color-text-tertiary);
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: var(--border-width-thin) solid var(--color-border-light);
}

/* Individual note items */
.note-item {
    margin: var(--space-padding-md) 0;
    padding: var(--space-padding-sm) 0;
}

/* No borders between note items */
.note-item:last-child {
    margin-bottom: 0;
}

/* Note type labels (Stamp, Handwritten text, etc.) */
.note-type-label {
    display: inline-block;
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    color: var(--color-primary);
    letter-spacing: 0.5px;
    margin-bottom: var(--space-margin-xs);
}

/* Page reference in labels */
.label-page-ref {
    font-weight: var(--font-weight-normal);
    color: var(--color-text-muted);
    font-size: 10px;
}

/* Separator between label parts */
.label-separator {
    margin: 0 var(--space-margin-xs);
    color: var(--color-text-light);
}

/* Note content area */
.note-content {
    margin-top: var(--space-margin-xs);
    padding-left: var(--space-padding-md);
}

.note-content p {
    margin: var(--space-margin-xs) 0;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* Note content - maintain existing style */
.document-note p {
    margin: 0 0 var(--space-margin-sm) 0;
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: var(--line-height-loose);
}

.document-note p:last-child {
    margin-bottom: 0;
}

/* Hide only the hr separator when it appears right before document notes */
/* This selector targets the hr element that comes immediately before .document-note */
.document-note {
    /* Keep document-note visible */
}

/* Hide hr when followed by document-note - using adjacent sibling */
hr:has(+ .document-note) {
    display: none;
}

/* Print styles for document notes */
@media print {
    .document-note {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .document-note::after {
        content: none; /* Hide emoji in print */
    }
}

/* ========== DOCUMENTS/ENHANCED-ELEMENTS.CSS ========== */
/* 
 * Enhanced Document Elements
 * Styles for special document formatting from enhanced-custom-processor.py
 */

/* Letter-based lists (a), (b), (c) */
.letter-item {
    margin: var(--space-padding-sm) 0;
    padding-left: 40px;
    position: relative;
}

.letter-marker {
    position: absolute;
    left: 0;
    color: var(--color-text-muted);
}

.letter-content {
    display: inline;
}

/* Definition lists with terms and definitions */
.definition-item {
    margin: var(--space-padding-md) 0;
    padding-left: var(--space-padding-sm);
}

.definition-marker {
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-right: 0.3em;
}

.definition-term {
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-right: 0.3em;
}

.definition-separator {
    margin: 0 0.3em;
    color: var(--color-text-light);
}

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

/* Table wrapper for enhanced tables */
.table-wrapper {
    overflow-x: auto;
    margin: var(--space-padding-xl) 0;
    border-radius: var(--border-radius-lg);
}

.table-wrapper table {
    width: 100%;
    margin: 0;
}

/* Custom numbered lists */
.custom-numbered-list {
    list-style: none;
    counter-reset: none;
    padding-left: 0;
}

.custom-numbered-list li {
    margin: var(--space-padding-sm) 0;
    padding-left: 40px;
    position: relative;
}

.custom-numbered-list .custom-list-marker {
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* WHEREAS clauses (often in resolutions) */
.whereas-clause {
    margin: var(--space-padding-xl) 0;
    padding-left: 0;
    position: relative;
}

.whereas-marker {
    color: var(--color-nav-dark);
    margin-right: 0.5em;
}

/* Section quotes */
.section-quote {
    border-left: 4px solid var(--color-primary);
    padding-left: var(--space-padding-xl);
    margin: var(--space-padding-xl) 0;
    background: var(--color-bg-light);
    padding: var(--space-padding-lg) var(--space-padding-xl);
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
}

/* Nested sections */
.nested-section {
    border-left: 2px solid var(--color-border);
    padding-left: var(--space-padding-lg);
    margin-left: var(--space-padding-lg);
    margin-top: var(--space-padding-sm);
}

/* Fee schedule tables */
.fee-schedule-table {
    background: linear-gradient(to bottom, var(--color-bg-light) 0%, var(--color-bg-primary) 100%);
    padding: var(--space-padding-lg);
}

.formatted-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-bg-primary);
}

.formatted-table thead {
    background: linear-gradient(135deg, var(--color-text-light) 0%, var(--color-text-muted) 100%);
    color: var(--color-bg-primary);
}

.formatted-table th {
    padding: var(--space-padding-md) var(--space-padding-lg);
    text-align: left;
    font-weight: var(--font-weight-semibold);
    border-bottom: 2px solid var(--color-text-muted);
}

.formatted-table td {
    padding: var(--space-padding-sm) var(--space-padding-lg);
    border-bottom: var(--border-width-thin) solid var(--color-border);
}

.formatted-table tbody tr:hover {
    background: var(--color-bg-light);
}

.formatted-table tbody tr:nth-child(even) {
    background: rgba(9, 105, 218, 0.02);
}

/* Cells with footnotes */
.has-footnote {
    position: relative;
}

.has-footnote sup {
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .letter-item,
    .custom-numbered-list li {
        padding-left: 30px;
    }
    
    .definition-item {
        padding: var(--space-padding-sm);
    }
    
    .table-wrapper {
        margin: var(--space-padding-lg) -var(--space-padding-md);
        border-radius: 0;
    }
}

/* Print styles */
@media print {
    .table-wrapper {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .formatted-table {
        font-size: 0.9em;
    }
    
    .whereas-clause,
    .definition-item,
    .section-quote {
        page-break-inside: avoid;
    }
}

/* ========== RIVERGROVE-TYPOGRAPHY.CSS ========== */
/* 
 * Rivergrove Typography
 * Essential typography styles from mdBook general.css without conflicts
 */

/* Base typography */
html {
    font-family: "Open Sans", sans-serif;
    color: var(--fg);
    background-color: var(--bg);
    text-size-adjust: none;
    -webkit-text-size-adjust: none;
}

body {
    margin: 0;
    /* mdBook sets :root font-size to 62.5%, so 1rem = 10px
       We need 1.6rem to get back to 16px default size */
    font-size: 1.6rem;
    overflow-x: hidden;
}

code {
    font-family: var(--mono-font) !important;
    font-size: var(--code-font-size);
    direction: ltr !important;
}

/* Headers */
h1, h2, h3, h4, h5, h6 { 
    font-weight: 600; 
}

h1 { 
    font-size: 2em; 
    margin-block-start: 0.67em;
    margin-block-end: 0.67em;
}

h2, h3 { 
    margin-block-start: 2.5em; 
}

h4, h5 { 
    margin-block-start: 2em; 
}

h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
    font-size: unset;
}

/* Content typography */
.content p { line-height: 1.45em; }
.content ol { line-height: 1.45em; }
.content ul { line-height: 1.45em; }
.content a { text-decoration: none; }
.content a:hover { text-decoration: underline; }
.content img, .content video { max-width: 100%; }

/* Header links */
.content .header:link,
.content .header:visited {
    color: var(--fg);
}

.content .header:link,
.content .header:visited:hover {
    text-decoration: none;
}

/* Tables */
table {
    margin: 0 auto;
    border-collapse: collapse;
}

table td {
    padding: 3px 20px;
    border: 1px solid var(--table-border-color);
}

table thead {
    background: var(--table-header-bg);
}

table thead td,
table thead th {
    font-weight: 700;
    border: none;
}

table thead th {
    padding: 3px 20px;
}

table thead tr {
    border: 1px solid var(--table-header-bg);
}

table tbody tr:nth-child(2n) {
    background: var(--table-alternate-bg);
}

/* Utility classes */
.left { float: left; }
.right { float: right; }
.boring { opacity: 0.6; }
.hide-boring .boring { display: none; }
.hidden { display: none !important; }

/* Code blocks */
pre {
    position: relative;
}

pre > .buttons {
    position: absolute;
    z-index: 100;
    right: 0px;
    top: 2px;
    margin-right: 10px;
    display: flex;
    gap: 2px;
}

pre > .buttons button {
    padding: 2px 5px;
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    color: var(--fg);
    cursor: pointer;
}

pre > .buttons button:hover {
    background: var(--theme-hover);
}

/* Blockquotes */
blockquote {
    margin: 20px 0;
    padding: 15px 20px;  /* Added vertical padding for better spacing */
    color: var(--fg);
    background-color: var(--quote-bg);
    border-block-start: .1em solid var(--quote-border);
    border-block-end: .1em solid var(--quote-border);
    border-inline-start: .4em solid var(--quote-border);
    border-inline-end: .1em solid var(--quote-border);
}

blockquote :first-child { margin-block-start: 0; }
blockquote :last-child { margin-block-end: 0; }

/* Lists */
:not(.footnote-definition) + .footnote-definition,
.footnote-definition + :not(.footnote-definition) {
    margin-block-start: 2em;
}

.footnote-definition {
    font-size: 0.9em;
    margin: 0.5em 0;
}

.footnote-definition p {
    display: inline;
}
