/*
 * =============================================================================
 * ACCESSIBLE MATH READER - STYLESHEET
 * =============================================================================
 * A modern, blue-based theme with dark/light mode support.
 * 
 * Features:
 * - CSS custom properties for easy theming
 * - Dark mode default with light mode toggle
 * - Responsive layout with collapsible sidebar
 * - Accessible focus indicators
 * - Smooth transitions (respects prefers-reduced-motion)
 * 
 * Author: Accessible Math Reader Contributors
 * Version: 0.2.0
 * =============================================================================
 */

/* =============================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================================= */

:root {
    /* -------------------------------------------------------------------------
       Typography
       ------------------------------------------------------------------------- */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* -------------------------------------------------------------------------
       Spacing & Layout
       ------------------------------------------------------------------------- */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 0px;
    --titlebar-height: 48px;
    --border-radius: 8px;
    --border-radius-lg: 12px;

    /* -------------------------------------------------------------------------
       Transitions (disabled if user prefers reduced motion)
       ------------------------------------------------------------------------- */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* -------------------------------------------------------------------------
       Z-Index Layers
       ------------------------------------------------------------------------- */
    --z-sidebar: 100;
    --z-titlebar: 200;
    --z-dropdown: 300;
    --z-modal: 400;
}

/* -------------------------------------------------------------------------
   DARK THEME (Default)
   Balanced slate/teal palette with subtle accents
   ------------------------------------------------------------------------- */
[data-theme="dark"] {
    /* Primary Colors - Teal (less intense than pure blue) */
    --color-primary: #14b8a6;
    /* Teal 500 */
    --color-primary-hover: #0d9488;
    /* Teal 600 */
    --color-primary-light: #2dd4bf;
    /* Teal 400 */
    --color-primary-dark: #0f766e;
    /* Teal 700 */

    /* Accent - Violet for subtle highlights */
    --color-accent: #a78bfa;
    /* Violet 400 */

    /* Backgrounds - Neutral dark slate */
    --bg-app: #111827;
    /* Gray 900 */
    --bg-sidebar: #1f2937;
    /* Gray 800 */
    --bg-card: #1f2937;
    /* Gray 800 */
    --bg-card-hover: #374151;
    /* Gray 700 */
    --bg-input: #111827;
    /* Gray 900 */
    --bg-titlebar: #1f2937;
    /* Gray 800 */
    --bg-dropdown: #1f2937;
    --bg-tab-active: #14b8a6;

    /* Text Colors */
    --text-primary: #f9fafb;
    /* Gray 50 */
    --text-secondary: #9ca3af;
    /* Gray 400 */
    --text-muted: #6b7280;
    /* Gray 500 */
    --text-on-primary: #ffffff;

    /* Borders */
    --border-color: #374151;
    /* Gray 700 */
    --border-color-light: #4b5563;
    /* Gray 600 */

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

    /* Status Colors */
    --color-success: #10b981;
    /* Emerald 500 */
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* Focus Ring */
    --focus-ring: 0 0 0 3px rgba(20, 184, 166, 0.4);
}

/* -------------------------------------------------------------------------
   LIGHT THEME
   Clean, neutral light palette
   ------------------------------------------------------------------------- */
[data-theme="light"] {
    /* Primary Colors - Teal */
    --color-primary: #0d9488;
    /* Teal 600 */
    --color-primary-hover: #0f766e;
    /* Teal 700 */
    --color-primary-light: #14b8a6;
    /* Teal 500 */
    --color-primary-dark: #115e59;
    /* Teal 800 */

    /* Accent */
    --color-accent: #7c3aed;
    /* Violet 600 */

    /* Backgrounds */
    --bg-app: #f9fafb;
    /* Gray 50 */
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f3f4f6;
    /* Gray 100 */
    --bg-input: #ffffff;
    --bg-titlebar: #111827;
    /* Keep dark titlebar */
    --bg-dropdown: #ffffff;
    --bg-tab-active: #0d9488;

    /* Text Colors */
    --text-primary: #111827;
    /* Gray 900 */
    --text-secondary: #4b5563;
    /* Gray 600 */
    --text-muted: #9ca3af;
    /* Gray 400 */
    --text-on-primary: #ffffff;

    /* Borders */
    --border-color: #e5e7eb;
    /* Gray 200 */
    --border-color-light: #d1d5db;
    /* Gray 300 */

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

    /* Status Colors */
    --color-success: #059669;
    /* Emerald 600 */
    --color-warning: #d97706;
    --color-error: #dc2626;

    /* Focus Ring */
    --focus-ring: 0 0 0 3px rgba(13, 148, 136, 0.3);
}

/* -------------------------------------------------------------------------
   HIGH CONTRAST MODE
   ------------------------------------------------------------------------- */
[data-theme="dark"].high-contrast {
    --bg-app: #000000;
    --bg-sidebar: #000000;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --border-color: #ffffff;
    --color-primary: #60a5fa;
}

[data-theme="light"].high-contrast {
    --bg-app: #ffffff;
    --text-primary: #000000;
    --border-color: #000000;
    --color-primary: #1d4ed8;
}

/* =============================================================================
   BASE STYLES & RESET
   ============================================================================= */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =============================================================================
   TITLE BAR
   ============================================================================= */

.title-bar {
    display: flex;
    align-items: center;
    height: var(--titlebar-height);
    background-color: var(--bg-titlebar);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: var(--z-titlebar);
}

.title-bar__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 2rem;
}

.title-bar__icon {
    font-size: 1.5rem;
}

.title-bar__title {
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
    /* Always light on dark titlebar */
    white-space: nowrap;
}

/* Menu Bar */
.menu-bar {
    display: flex;
    align-items: center;
    flex: 1;
}

.menu-item {
    position: relative;
}

.menu-item__trigger {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color var(--transition-fast);
}

.menu-item__trigger:hover,
.menu-item__trigger:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.menu-item__trigger:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Dropdown Menu */
.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: var(--bg-dropdown);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    z-index: var(--z-dropdown);
    list-style: none;
}

.menu-item:hover .menu-dropdown,
.menu-item:focus-within .menu-dropdown {
    display: block;
}

.menu-dropdown li {
    margin: 0;
}

.menu-dropdown button,
.menu-dropdown a {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.menu-dropdown button:hover,
.menu-dropdown a:hover {
    background-color: var(--color-primary);
    color: var(--text-on-primary);
}

.menu-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

.menu-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 1rem 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--border-radius);
    margin-left: auto;
    font-size: 1.25rem;
    transition: background-color var(--transition-fast);
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Show/hide theme icons based on current theme */
[data-theme="dark"] .theme-toggle__icon--light {
    display: none;
}

[data-theme="dark"] .theme-toggle__icon--dark {
    display: inline;
}

[data-theme="light"] .theme-toggle__icon--light {
    display: inline;
}

[data-theme="light"] .theme-toggle__icon--dark {
    display: none;
}

/* =============================================================================
   APP LAYOUT (Sidebar + Content)
   ============================================================================= */

.app-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* =============================================================================
   SIDEBAR
   ============================================================================= */

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: width var(--transition-normal), transform var(--transition-normal);
    position: relative;
    z-index: var(--z-sidebar);
    flex-shrink: 0;
}

/* Collapsed state */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    overflow: hidden;
}

.sidebar.collapsed .sidebar__section,
.sidebar.collapsed .sidebar__toggle-icon {
    opacity: 0;
    visibility: hidden;
}

.sidebar__toggle {
    position: absolute;
    top: 0.5rem;
    right: -2.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color var(--transition-fast);
}

.sidebar__toggle:hover {
    background-color: var(--bg-card-hover);
}

.sidebar.collapsed .sidebar__toggle {
    right: -2.5rem;
}

.sidebar.collapsed .sidebar__toggle-icon {
    opacity: 1;
    visibility: visible;
    transform: rotate(180deg);
}

.sidebar__section {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: opacity var(--transition-fast);
}

.sidebar__section:last-child {
    border-bottom: none;
}

.sidebar__heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar__heading-icon {
    font-size: 1rem;
}

/* Examples List */
.examples-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.example-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.example-btn:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--text-on-primary);
}

.example-btn:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

.example-btn__preview {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-primary-light);
}

.example-btn:hover .example-btn__preview {
    color: var(--text-on-primary);
}

.example-btn__label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.example-btn:hover .example-btn__label {
    color: rgba(255, 255, 255, 0.8);
}

/* History List */
.history-list {
    max-height: 150px;
    overflow-y: auto;
}

.history-empty {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Tips List */
.tips-list {
    list-style: none;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tips-list li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.tips-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

.tips-list code {
    font-family: var(--font-mono);
    background-color: var(--bg-card-hover);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* Settings Groups */
.settings-group {
    border: none;
    margin-bottom: 1rem;
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group legend {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0;
}

.radio-option input[type="radio"] {
    accent-color: var(--color-primary);
    width: 1rem;
    height: 1rem;
}

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

/* =============================================================================
   MAIN CONTENT AREA
   ============================================================================= */

.content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Section Heading */
.section-heading {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* =============================================================================
   INPUT SECTION
   ============================================================================= */

.input-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
}

.input-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    resize: vertical;
    min-height: 100px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--focus-ring);
}

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

.input-help {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.input-help code {
    font-family: var(--font-mono);
    background-color: var(--bg-card-hover);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

.input-actions {
    display: flex;
    gap: 0.75rem;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn:focus {
    outline: none;
    box-shadow: var(--focus-ring);
}

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

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

.btn--secondary {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn--small {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
}

.btn__icon {
    font-size: 0.875rem;
}

/* =============================================================================
   OUTPUT SECTION & TABS
   ============================================================================= */

.output-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tabs Navigation */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card-hover);
}

.tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.tab:focus {
    outline: none;
    box-shadow: inset var(--focus-ring);
}

.tab--active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background-color: var(--bg-card);
}

.tab__icon {
    font-size: 1rem;
}

/* Tab Panels */
.tab-panels {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.tab-panel {
    display: none;
}

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

.panel-subheading {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    margin-top: 1.25rem;
}

.panel-subheading:first-child {
    margin-top: 0;
}

/* Formula Display */
.formula-display {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    font-size: 1.25rem;
    overflow-x: auto;
}

/* Audio Player */
.audio-player {
    width: 100%;
    margin-bottom: 1rem;
}

/* Transcript Box */
.transcript-box {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Braille Display */
.braille-display {
    font-family: var(--font-mono);
    font-size: 2rem;
    letter-spacing: 0.25rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 1rem;
}

.braille-actions {
    display: flex;
    gap: 0.75rem;
}

/* Accessible Content */
.accessible-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.accessible-hint kbd {
    background-color: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.accessible-math {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.accessible-math:focus {
    outline: none;
    box-shadow: var(--focus-ring);
    border-color: var(--color-primary);
}

.context-display {
    background-color: var(--bg-card-hover);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
}

/* =============================================================================
   MODALS/DIALOGS
   ============================================================================= */

/* Dialog/Modal - Hidden by default, shown via showModal() */
.modal {
    /* Reset default dialog styles */
    border: none;
    padding: 0;
    background: transparent;
    max-width: none;
    max-height: none;

    /* Positioning when open */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);

    /* Flexbox centering for content */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide dialog when not open (browser default, but explicit for safety) */
.modal:not([open]) {
    display: none;
}

/* Backdrop styling */
.modal::backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal__content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal__content h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.shortcuts-table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.shortcuts-table th,
.shortcuts-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.shortcuts-table th {
    font-weight: 600;
    color: var(--text-secondary);
}

.shortcuts-table kbd {
    background-color: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.app-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-sidebar);
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    .title-bar__title {
        display: none;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: var(--titlebar-height);
        height: calc(100vh - var(--titlebar-height));
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }

    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }

    .sidebar__toggle {
        right: -3rem;
    }

    .content {
        padding: 1rem;
    }
}

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

@media print {

    .title-bar,
    .sidebar,
    .input-section,
    .tabs,
    .app-footer {
        display: none;
    }

    .output-section {
        border: none;
        box-shadow: none;
    }

    .tab-panel {
        display: block !important;
        page-break-inside: avoid;
    }
}