/**
 * a11yReady — Document Accessibility Platform
 * Main Stylesheet
 * WCAG 2.1 AA Compliant
 */

/* ============================================
   VARIABLES & RESET
   ============================================ */

:root {
    /* a11yReady brand colors */
    --primary: #316094;
    --primary-dark: #254a73;
    --primary-light: #4a7ab5;
    --accent: #47763b;
    --accent-dark: #365a2d;
    --accent-light: #5a944c;

    /* Semantic colors — all verified for WCAG AA contrast on white */
    --success: #2e7d32;        /* 5.1:1 on white */
    --warning: #b85600;        /* 4.8:1 on white (was #ed6c02 at 3.5:1) */
    --error: #c62828;          /* 5.6:1 on white (was #d32f2f at 4.0:1) */
    --info: #316094;           /* 4.6:1 on white */

    /* Neutrals — all meet WCAG AA 4.5:1 for text, 3:1 for UI components */
    --text: #1a1a1a;           /* 16.6:1 on white */
    --text-secondary: #4a4a4a; /* 7.7:1 on white (was #555 at 7.0:1) */
    --text-muted: #595959;     /* 5.9:1 on white (was #777 at 4.5:1 FAIL) */
    --bg: #f5f6f8;
    --bg-white: #fff;
    --border: #949494;         /* 3.0:1 on white — meets 1.4.11 (was #ddd at 1.7:1 FAIL) */
    --border-light: #c0c0c0;  /* 2.3:1 — decorative only (was #eee at 1.2:1) */

    /* Spacing (8pt grid) */
    --sp-xs: 0.25rem;
    --sp-sm: 0.5rem;
    --sp-md: 1rem;
    --sp-lg: 1.5rem;
    --sp-xl: 2rem;
    --sp-2xl: 3rem;

    /* Typography */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --leading: 1.6;

    /* Borders & Shadows */
    --radius: 8px;
    --radius-sm: 4px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

    /* Transitions */
    --ease: 200ms ease;
    --ease-slow: 400ms ease;
}

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

/* ============================================
   BASE STYLES
   ============================================ */

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: var(--leading);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
}

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

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

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--sp-md);
    background: var(--primary);
    color: #fff;
    padding: var(--sp-sm) var(--sp-md);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    z-index: 200;
    transition: top var(--ease);
}

.skip-link:focus {
    top: 0;
}

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

/* Focus indicators */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--primary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    text-decoration: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
}

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

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.nav-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    transition: color var(--ease);
}

.logo:hover .logo-title {
    opacity: 0.85;
}

/* a11y gradient text effect — green-to-blue on the "a11y" portion */
.a11y-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 60%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}
.hero h2 .a11y-gradient {
    font-size: inherit;
}

/* Beta badge in nav */
.beta-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1;
    margin-left: -2px;
    align-self: flex-start;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2px;
    margin: 0 auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--ease);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--bg);
    transform: translateY(-1px);
}

.nav-links a[aria-current="page"] {
    color: var(--primary);
    background: var(--bg);
    box-shadow: inset 0 -2px 0 var(--primary);
}

/* User/Auth nav */
.nav-user {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    flex-shrink: 0;
    font-size: 0.8125rem;
}
.user-badge {
    font-weight: 600;
    color: var(--text);
}
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.role-admin { background: var(--primary); color: #fff; }
.role-reviewer { background: var(--accent); color: #fff; }
.nav-logout {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    padding: var(--sp-xs) var(--sp-sm);
    border-radius: var(--radius-sm);
}
.nav-logout:hover { color: var(--error); background: var(--bg); }

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

main {
    min-height: calc(100vh - 180px);
    padding: var(--sp-2xl) 0;
}

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

.site-footer {
    border-top: 2px solid var(--primary);
    padding: var(--sp-lg) 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    background: var(--bg-white);
}

.site-footer .report-issue-link {
    color: var(--warning);
    font-weight: 500;
    transition: color var(--ease);
}

.site-footer .report-issue-link:hover {
    color: var(--error);
}

.site-footer a {
    color: var(--text-secondary);
}

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

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--sp-xl);
    transition: box-shadow var(--ease), transform var(--ease);
    animation: cardFadeIn 0.4s ease-out;
}

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

.card--bordered {
    box-shadow: none;
    border: 1px solid var(--border);
}

.card--bordered:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

/* ── Subtle entrance animations ── */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .card,
    .nav-links a {
        animation: none;
        transition: none;
        transform: none !important;
    }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--ease);
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    color: #fff;
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--bg);
    border-color: var(--primary-light);
    color: var(--primary);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-accent:hover:not(:disabled) {
    background: var(--accent-dark);
    color: #fff;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   UPLOAD PAGE
   ============================================ */

.hero {
    text-align: center;
    margin-bottom: var(--sp-2xl);
}

.hero-logo {
    display: block;
    margin: 0 auto var(--sp-md);
    height: auto;
}

.hero h2 {
    font-size: 2.2rem;
    color: var(--text);
    margin-bottom: var(--sp-xs);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.5;
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: var(--sp-2xl) var(--sp-xl);
    text-align: center;
    background: var(--bg-white);
    background-image: url('../images/multco_logo.svg');
    background-repeat: no-repeat;
    background-position: center 60%;
    background-size: 45%;
    transition: all var(--ease);
    cursor: pointer;
    position: relative;
}

/* Faded overlay so logo is a subtle watermark (~6% visible) */
.drop-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: inherit;
    pointer-events: none;
    transition: background var(--ease);
}

/* Ensure all drop-zone content sits above the overlay */
.drop-zone > * {
    position: relative;
    z-index: 1;
}

.drop-zone:hover {
    border-color: var(--primary-light);
    background-color: #f0f4f9;
}

.drop-zone:hover::before {
    background: rgba(240, 244, 249, 0.92);
}

.drop-zone.drag-over {
    border-color: var(--primary);
    background-color: #e8eff8;
    box-shadow: var(--shadow-md);
    transform: scale(1.01);
}

.drop-zone.drag-over::before {
    background: rgba(232, 239, 248, 0.90);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: var(--sp-md);
    color: var(--primary-light);
}

.drop-zone-text {
    font-size: 1.0625rem;
    margin-bottom: var(--sp-sm);
    color: var(--text);
}

.drop-zone-hint {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

#file-input {
    display: none;
}

.file-list {
    margin-top: var(--sp-lg);
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-md);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sp-sm);
}

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

.file-info {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: var(--sp-xs);
    line-height: 1;
}

.file-remove:hover {
    color: var(--error);
}

.upload-metadata {
    margin-top: var(--sp-lg);
    padding: var(--sp-md) var(--sp-lg);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
}

.metadata-row {
    display: flex;
    gap: var(--sp-md);
    margin-bottom: var(--sp-sm);
}

.metadata-field {
    flex: 1;
}

.metadata-field-wide {
    flex: 2;
}

.doc-type-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--sp-xs);
    color: var(--text);
    font-size: 0.9375rem;
}

.optional-label {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.doc-type-select,
input.doc-type-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: white;
    font-size: 0.9375rem;
    color: var(--text);
    cursor: pointer;
}

.doc-type-select:focus,
input.doc-type-select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-color: var(--primary);
}

.doc-type-hint {
    margin-top: var(--sp-xs);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .metadata-row {
        flex-direction: column;
    }
}

.upload-actions {
    margin-top: var(--sp-lg);
    text-align: center;
}

.error-messages {
    margin-top: var(--sp-lg);
    padding: var(--sp-md);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 0.9375rem;
    display: none;
}

.error-messages.show {
    display: block;
}

/* Feature cards */
.features {
    margin-top: var(--sp-2xl);
}

.features h3 {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: var(--sp-lg);
    color: var(--text-secondary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--sp-md);
}

.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: var(--sp-lg);
    text-align: center;
    transition: box-shadow var(--ease);
}

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

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: var(--sp-sm);
    color: var(--primary);
}

.feature-card h4 {
    font-size: 0.9375rem;
    margin-bottom: var(--sp-xs);
    color: var(--text);
}

.feature-card p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================
   PROGRESS PAGE - VERTICAL STEPPER
   ============================================ */

.progress-page {
    max-width: 640px;
    margin: 0 auto;
}

.job-header {
    margin-bottom: var(--sp-xl);
}

.job-header h2 {
    font-size: 1.5rem;
    margin-bottom: var(--sp-xs);
}

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

.job-id code {
    cursor: pointer;
}

/* Progress bar */
.progress-section {
    margin-bottom: var(--sp-xl);
}

.progress-section h3 {
    font-size: 1rem;
    margin-bottom: var(--sp-md);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--sp-sm);
}

.progress-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

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

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--sp-md);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width var(--ease-slow);
}

.current-stage {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.current-stage strong {
    color: var(--primary);
}

.status-message {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--sp-xs);
}

/* Vertical stepper */
.stepper {
    list-style: none;
    position: relative;
    padding: 0;
}

.stepper-item {
    display: flex;
    gap: var(--sp-md);
    padding-bottom: var(--sp-lg);
    position: relative;
}

.stepper-item:last-child {
    padding-bottom: 0;
}

/* Connector line */
.stepper-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 36px;
    bottom: 0;
    width: 2px;
    background: var(--border);
    transition: background var(--ease);
}

.stepper-item.complete:not(:last-child)::after {
    background: var(--accent);
}

.stepper-item.active:not(:last-child)::after {
    background: linear-gradient(to bottom, var(--primary) 0%, var(--border) 100%);
}

/* Step indicator circle */
.step-indicator {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid var(--border);
    background: var(--bg-white);
    color: var(--text-muted);
    transition: all var(--ease);
    position: relative;
    z-index: 1;
}

.stepper-item.complete .step-indicator {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.stepper-item.active .step-indicator {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px rgba(49, 96, 148, 0.15);
    animation: pulse-ring 2s ease infinite;
}

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 4px rgba(49, 96, 148, 0.15); }
    50% { box-shadow: 0 0 0 8px rgba(49, 96, 148, 0.08); }
}

/* Step content */
.step-content {
    flex: 1;
    padding-top: 4px;
}

.step-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
    margin-bottom: 2px;
}

.stepper-item.pending .step-name {
    color: var(--text-muted);
}

.step-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.step-time {
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 48px;
    text-align: right;
    padding-top: 4px;
}

.stepper-item.complete .step-time {
    color: var(--accent);
    font-weight: 500;
}

/* Error display */
.error-display {
    margin-top: var(--sp-xl);
}

.error-card {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: var(--sp-xl);
}

.error-card h3 {
    color: var(--error);
    margin-bottom: var(--sp-sm);
}

.error-actions {
    margin-top: var(--sp-lg);
    display: flex;
    gap: var(--sp-sm);
}

/* ============================================
   RESULTS PAGE
   ============================================ */

.results-page {
    max-width: 800px;
    margin: 0 auto;
}

.results-header {
    text-align: center;
    margin-bottom: var(--sp-xl);
}

.results-header .status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: var(--sp-sm);
}

.status-icon.success {
    background: #e8f5e9;
    color: var(--success);
}

.results-header h2 {
    font-size: 1.5rem;
    margin-bottom: var(--sp-xs);
}

.results-header .filename {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Summary card */
.summary-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--sp-xl);
    margin-bottom: var(--sp-lg);
}

.compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm) var(--sp-md);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: var(--sp-lg);
}

.compliance-badge.pass {
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid #c8e6c9;
}

.compliance-badge.warn {
    background: #fff3e0;
    color: var(--warning);
    border: 1px solid #ffe0b2;
}

.compliance-badge.fail {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

.compliance-score {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--sp-lg);
}

.compliance-score strong {
    font-size: 1.5rem;
    color: var(--text);
}

/* Metric bars */
.metric-bars {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.metric-row {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 140px;
    flex-shrink: 0;
}

.metric-bar-track {
    flex: 1;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width var(--ease-slow);
}

.metric-bar-fill.high {
    background: var(--accent);
}

.metric-bar-fill.medium {
    background: var(--warning);
}

.metric-bar-fill.low {
    background: var(--error);
}

.metric-value {
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* Processing info */
.processing-info {
    display: flex;
    gap: var(--sp-lg);
    padding-top: var(--sp-md);
    border-top: 1px solid var(--border-light);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.processing-info span {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
}

/* Validation issues */
.issues-section {
    margin-bottom: var(--sp-lg);
}

.issues-section h3 {
    font-size: 1.125rem;
    margin-bottom: var(--sp-md);
}

.issue-group {
    margin-bottom: var(--sp-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.issue-group summary {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9375rem;
    list-style: none;
    background: var(--bg-white);
    transition: background var(--ease);
}

.issue-group summary:hover {
    background: var(--bg);
}

.issue-group summary::-webkit-details-marker {
    display: none;
}

.issue-group summary::before {
    content: '>';
    font-weight: 700;
    font-size: 0.75rem;
    transition: transform var(--ease);
    display: inline-block;
    width: 1em;
}

.issue-group[open] summary::before {
    transform: rotate(90deg);
}

.severity-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.severity-tag.error {
    background: #fef2f2;
    color: var(--error);
}

.severity-tag.warning {
    background: #fff3e0;
    color: var(--warning);
}

.severity-tag.info {
    background: #e3f2fd;
    color: var(--info);
}

.issue-count {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 400;
}

.issue-list {
    padding: 0 var(--sp-md) var(--sp-md);
    background: var(--bg-white);
}

.issue-item {
    padding: var(--sp-md) 0;
    border-top: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.issue-item:first-child {
    border-top: none;
}

.issue-header {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-xs);
}

.wcag-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--bg);
    color: var(--text-secondary);
    font-weight: 500;
}

.issue-message {
    color: var(--text);
    margin-bottom: var(--sp-xs);
}

.issue-suggestion {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-style: italic;
}

/* Document stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.stat-box {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: var(--sp-md);
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: var(--sp-xs);
}

/* Downloads */
.downloads-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-lg);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm) var(--sp-md);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--ease);
}

.download-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f4f9;
}

.download-btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.download-btn-primary:hover {
    background: var(--primary-dark, #1a56db);
    color: #fff;
}

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

/* Batch outputs (multi-sheet Excel) */
.batch-outputs-section {
    margin-bottom: var(--sp-lg);
}

.batch-status-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    margin-bottom: var(--sp-md);
}

.batch-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.batch-badge.approved {
    background: #dcfce7;
    color: #166534;
}

.batch-info {
    font-size: 0.875rem;
    color: var(--text-light, #6b7280);
}

.batch-actions-top {
    margin-bottom: var(--sp-md);
}

.batch-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.batch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.batch-table th,
.batch-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light, #e5e7eb);
}

.batch-table thead th {
    background: var(--bg-subtle, #f9fafb);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light, #6b7280);
}

.batch-table tbody tr:hover {
    background: #f0f4f9;
}

.batch-table tbody tr:last-child td {
    border-bottom: none;
}

.batch-dl-cell {
    display: flex;
    gap: var(--sp-sm);
}

.batch-dl-link {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--primary);
    transition: all var(--ease);
}

.batch-dl-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Actions */
.actions-section {
    display: flex;
    gap: var(--sp-md);
    justify-content: center;
    padding-top: var(--sp-lg);
    border-top: 1px solid var(--border-light);
}

/* Review banner */
.review-banner {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    border-radius: var(--radius-sm);
    padding: var(--sp-md);
    margin-bottom: var(--sp-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--sp-sm);
    font-size: 0.9375rem;
}

.review-banner .icon {
    color: var(--warning);
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ============================================
   HISTORY PAGE
   ============================================ */

.history-page {
    max-width: 960px;
    margin: 0 auto;
}

.history-header {
    margin-bottom: var(--sp-xl);
}

.history-header h2 {
    font-size: 1.5rem;
    margin-bottom: var(--sp-xs);
}

.filter-banner {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm) var(--sp-md);
    margin-bottom: var(--sp-md);
    background: #e3f2fd;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--info);
    font-weight: 500;
}

.history-controls {
    display: flex;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-lg);
    flex-wrap: wrap;
}

.history-controls input[type="search"],
.history-controls select {
    padding: var(--sp-sm) var(--sp-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9375rem;
    background: var(--bg-white);
    transition: border-color var(--ease);
}

.history-controls input[type="search"] {
    flex: 1;
    min-width: 200px;
}

.history-controls input:focus,
.history-controls select:focus {
    border-color: var(--primary);
}

/* History table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.history-table th {
    text-align: left;
    padding: var(--sp-md);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--border);
}

.history-table td {
    padding: var(--sp-md);
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.history-table tbody tr {
    transition: background var(--ease);
}

.history-table tbody tr:hover {
    background: var(--bg);
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-badge.success {
    background: #e8f5e9;
    color: var(--success);
}

.status-badge.warning {
    background: #fff3e0;
    color: var(--warning);
}

.status-badge.error {
    background: #fef2f2;
    color: var(--error);
}

/* Batch count badge (shown in history for multi-doc jobs) */
.batch-count-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.45rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
    vertical-align: middle;
}

/* Score badges */
.score-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.score-badge.high {
    background: #e8f5e9;
    color: var(--success);
}

.score-badge.medium {
    background: #fff3e0;
    color: var(--warning);
}

.score-badge.low {
    background: #fef2f2;
    color: var(--error);
}

/* Action buttons in table */
.action-buttons {
    display: flex;
    gap: var(--sp-sm);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 1rem;
    transition: all var(--ease);
    background: var(--bg);
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--primary);
    color: #fff;
}

.btn-icon.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--sp-2xl);
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: var(--sp-md);
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: var(--sp-sm);
    color: var(--text);
}

.empty-state p {
    margin-bottom: var(--sp-lg);
}

.pagination-info {
    margin-top: var(--sp-md);
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
}

/* ============================================
   COMPARISON PAGE
   ============================================ */

.compare-page {
    display: grid;
    grid-template-rows: 48px 1fr;
    height: 100vh;
    overflow: hidden;
}

.compare-toolbar {
    display: flex;
    align-items: center;
    padding: 0 var(--sp-md);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    gap: var(--sp-md);
    z-index: 10;
}

.compare-back {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: var(--sp-xs) var(--sp-sm);
    border-radius: var(--radius-sm);
    transition: all var(--ease);
}

.compare-back:hover {
    color: var(--primary);
    background: var(--bg);
}

.compare-filename {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compare-controls {
    display: flex;
    gap: 2px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.compare-controls button {
    padding: var(--sp-xs) var(--sp-md);
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 3px;
    transition: all var(--ease);
}

.compare-controls button.active {
    background: var(--bg-white);
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.compare-controls button:hover:not(.active) {
    color: var(--text);
}

.compare-swap {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--sp-xs) var(--sp-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all var(--ease);
}

.compare-swap:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Panels */
.compare-panels {
    display: grid;
    grid-template-columns: 1fr 4px 1fr;
    overflow: hidden;
    transition: grid-template-columns 0.3s ease;
}

.compare-panels.pdf-only {
    grid-template-columns: 1fr 0px 0fr;
}

.compare-panels.html-only {
    grid-template-columns: 0fr 0px 1fr;
}

.compare-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    padding: var(--sp-sm) var(--sp-md);
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.panel-header .panel-badge {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    text-transform: none;
    letter-spacing: 0;
}

.compare-panel iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: var(--bg-white);
}

/* Divider */
.compare-divider {
    background: var(--border);
    cursor: col-resize;
    position: relative;
    transition: background var(--ease);
    z-index: 5;
}

.compare-divider:hover,
.compare-divider.dragging {
    background: var(--primary);
}

.compare-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 40px;
    border-radius: 2px;
    opacity: 0;
    transition: opacity var(--ease);
}

.compare-divider:hover::after {
    opacity: 1;
}

/* ============================================
   ERROR PAGE
   ============================================ */

.error-page {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.error-page .error-icon {
    font-size: 3rem;
    margin-bottom: var(--sp-md);
    color: var(--warning);
}

.error-page h2 {
    font-size: 1.5rem;
    margin-bottom: var(--sp-md);
}

.error-message-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--sp-xl);
    margin-bottom: var(--sp-xl);
    text-align: left;
}

.error-message-card h3 {
    color: var(--error);
    margin-bottom: var(--sp-sm);
}

.error-message-card details {
    margin-top: var(--sp-md);
    font-size: 0.875rem;
}

.error-message-card summary {
    cursor: pointer;
    color: var(--text-muted);
}

.error-page .actions {
    display: flex;
    gap: var(--sp-sm);
    justify-content: center;
    flex-wrap: wrap;
}

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

@media (max-width: 768px) {
    .container {
        padding: 0 var(--sp-md);
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .site-header nav {
        height: auto;
        min-height: 48px;
        flex-wrap: wrap;
        padding: var(--sp-xs) 0;
        gap: var(--sp-xs);
    }

    .logo-title {
        font-size: 1rem;
    }

    .nav-logo-img {
        width: 22px;
        height: 22px;
    }

    .beta-badge {
        font-size: 0.5rem;
        padding: 1px 4px;
    }

    .nav-links {
        gap: 0;
        order: 3;
        width: 100%;
        justify-content: center;
        border-top: 1px solid var(--border-light);
        padding-top: var(--sp-xs);
        margin: 0;
    }

    .nav-links a {
        padding: 4px 10px;
        font-size: 0.8125rem;
    }

    .nav-user {
        font-size: 0.75rem;
    }

    .help-toggle {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

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

    .history-controls {
        flex-direction: column;
    }

    .history-controls input[type="search"] {
        min-width: auto;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .metric-label {
        min-width: 100px;
        font-size: 0.8125rem;
    }

    .processing-info {
        flex-wrap: wrap;
        gap: var(--sp-sm);
    }

    .downloads-row {
        flex-direction: column;
    }

    .actions-section {
        flex-direction: column;
        align-items: stretch;
    }

    /* Comparison page - stack on mobile */
    .compare-panels {
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr 4px 1fr;
    }

    .compare-divider {
        cursor: row-resize;
    }

    .compare-toolbar {
        flex-wrap: wrap;
        height: auto;
        padding: var(--sp-sm);
        gap: var(--sp-sm);
    }
}

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

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   BATCH PROCESSING PAGE
   ============================================ */

.batch-page {
    max-width: 900px;
    margin: 0 auto;
}

.batch-page .card {
    margin-bottom: var(--sp-lg);
}

.batch-page .card h3 {
    font-size: 1.125rem;
    margin-bottom: var(--sp-sm);
}

.batch-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--sp-md);
    line-height: 1.5;
}

.batch-controls {
    display: flex;
    gap: var(--sp-md);
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: var(--sp-lg);
}

.scan-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.scan-file-list {
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.875rem;
}

.scan-file-list h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--sp-sm);
}

.scan-file-list ul {
    list-style: none;
    padding: 0;
}

.scan-file-list li {
    padding: var(--sp-xs) 0;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.batch-progress-bar {
    margin-bottom: var(--sp-lg);
}

.batch-progress-stats {
    margin-top: var(--sp-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.batch-error-count {
    color: var(--error);
    font-weight: 600;
}

.batch-job-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
    max-height: 400px;
    overflow-y: auto;
}

.batch-job-item {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm) var(--sp-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--bg-white);
}

.batch-job-item strong {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-job-status {
    color: var(--text-muted);
    font-size: 0.8125rem;
    white-space: nowrap;
}

/* Review queue */
.review-queue-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}

.review-queue-item {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    transition: box-shadow var(--ease);
}

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

.review-queue-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.review-queue-item strong {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   GLOBAL TOOLTIPS
   ============================================ */

.global-tip {
    position: absolute;
    z-index: 9999;
    max-width: 280px;
    padding: var(--sp-sm) var(--sp-md);
    background: var(--text);
    color: #fff;
    font-size: 0.8125rem;
    line-height: 1.45;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--ease), transform var(--ease);
}

.global-tip.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================
   HELP SIDE PANEL
   ============================================ */

.help-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--bg-white);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--ease);
    flex-shrink: 0;
}

.help-toggle:hover,
.help-toggle:focus-visible {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f4f9;
}

.help-toggle[aria-expanded="true"] {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.help-panel {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    width: 340px;
    background: var(--bg-white);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 90;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 0;
}

.help-panel.open {
    transform: translateX(0);
}

.help-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-md) var(--sp-lg);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 1;
}

.help-panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.help-close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--sp-xs);
    border-radius: var(--radius-sm);
    transition: all var(--ease);
    line-height: 1;
}

.help-close-btn:hover,
.help-close-btn:focus-visible {
    color: var(--text);
    background: var(--bg);
}

.help-panel-body {
    padding: var(--sp-lg);
}

.help-panel-body h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 var(--sp-sm) 0;
}

.help-panel-body h3:not(:first-child) {
    margin-top: var(--sp-lg);
}

.help-panel-body p,
.help-panel-body li {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: var(--sp-sm);
}

.help-panel-body ul {
    padding-left: var(--sp-lg);
    margin-bottom: var(--sp-md);
}

.help-panel-body details {
    margin-bottom: var(--sp-sm);
}

.help-panel-body summary {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    padding: var(--sp-sm) 0;
    list-style: none;
}

.help-panel-body summary::before {
    content: "\25B6\00a0";
    font-size: 0.7em;
    transition: transform var(--ease);
    display: inline-block;
}

.help-panel-body details[open] summary::before {
    transform: rotate(90deg);
}

.help-panel-body details[open] summary {
    color: var(--primary);
}

.help-panel-body .help-shortcut {
    display: inline-block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1px 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .help-panel {
        width: 100%;
        top: 56px;
    }
}


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

@media print {
    .site-header,
    .site-footer,
    .upload-actions,
    .downloads-row,
    .actions-section,
    .compare-toolbar,
    .compare-controls,
    .help-panel,
    .help-toggle,
    .global-tip {
        display: none;
    }

    body {
        background: #fff;
    }

    .card,
    .summary-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
