/* ============================================================
   LYNCTERA DESIGN SYSTEM
   Static component styles extracted from _Layout.cshtml
   for cacheability. Brand-specific CSS variables remain inline.
   ============================================================ */

/* ============================================================
   SIGNATURE GRADIENTS - Distinctive Lynctera branding
   ============================================================ */

.lct-gradient-primary {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

.lct-gradient-subtle {
    background: linear-gradient(135deg, var(--brand-primary-light) 0%, transparent 100%);
}

.lct-gradient-mesh {
    background: 
        radial-gradient(at 40% 20%, var(--brand-primary-light) 0px, transparent 50%),
        radial-gradient(at 80% 0%, color-mix(in srgb, var(--brand-accent) 15%, transparent) 0px, transparent 50%),
        radial-gradient(at 0% 50%, var(--brand-primary-light) 0px, transparent 50%);
}

.lct-gradient-hero {
    background: linear-gradient(160deg, var(--surface-primary) 0%, var(--surface-secondary) 50%, var(--brand-primary-light) 100%);
}

/* ============================================================
   SIGNATURE CARDS - Elevated card components
   ============================================================ */

.lct-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-normal) var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.lct-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--brand-primary-medium);
}

.lct-card-accent {
    border-left: 3px solid var(--brand-primary);
}

.lct-card-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out-expo);
}

.lct-card-accent:hover::before {
    opacity: 1;
}

.lct-card-focus {
    border-top: 3px solid transparent;
    background-image: linear-gradient(var(--surface-elevated), var(--surface-elevated)), 
                      linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.stat-card {
    transition: all var(--duration-normal) var(--ease-out-expo);
    position: relative;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent 40%, var(--brand-primary-light) 100%);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out-expo);
    pointer-events: none;
}

.stat-card:hover::after {
    opacity: 1;
}

/* ============================================================
   TYPOGRAPHY - Refined hierarchy
   ============================================================ */

.lct-heading-hero {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--text-primary);
}

.lct-heading-section {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-primary);
}

.lct-heading-card {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.lct-metric {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.lct-metric-large {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.lct-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* ============================================================
   BUTTONS - Enhanced with brand character
   ============================================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-inverse);
    font-weight: 600;
    border: none;
    box-shadow: var(--shadow-md), 0 2px 8px var(--brand-primary-medium);
    transition: all var(--duration-fast) var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.2) 100%);
    opacity: 0;
    transition: opacity var(--duration-fast);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg), 0 4px 12px var(--brand-primary-medium);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.btn-secondary {
    background-color: var(--surface-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-out-expo);
}

.btn-secondary:hover {
    background-color: var(--surface-secondary);
    border-color: var(--brand-primary-medium);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    transition: all var(--duration-fast);
}

.btn-ghost:hover {
    background: var(--surface-tertiary);
    color: var(--brand-primary);
}

/* ============================================================
   SIDEBAR - Signature navigation
   ============================================================ */

.sidebar-link {
    transition: all var(--duration-fast) var(--ease-out-expo);
    position: relative;
}

.sidebar-link:hover {
    background: var(--surface-tertiary);
}

.sidebar-link.active {
    background: var(--brand-primary-light);
    border-left: 3px solid transparent;
    color: var(--brand-primary);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

.sidebar {
    transition: width var(--duration-slow) var(--ease-out-expo);
}

.sidebar.collapsed {
    width: 56px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar.collapsed::-webkit-scrollbar {
    display: none;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .section-chevron {
    display: none;
}

.sidebar.collapsed .submenu {
    display: none !important;
}

.sidebar.collapsed nav {
    padding: 0.5rem 0.25rem;
}

.sidebar.collapsed .nav-section-header {
    justify-content: center;
    padding: 0.625rem 0;
}

.sidebar.collapsed .nav-section-header .section-icon {
    margin: 0;
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 0.625rem 0;
}

.sidebar.collapsed .sidebar-link > svg {
    margin-right: 0;
}

.sidebar.collapsed .nav-divider {
    display: none;
}

.sidebar.collapsed .mb-6 {
    margin-bottom: 0.25rem;
}

.main-content {
    transition: margin-left var(--duration-slow) var(--ease-out-expo);
}

.main-content.expanded {
    margin-left: 56px;
}

/* ============================================================
   SIDEBAR - Mobile responsive overlay
   ============================================================ */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 19;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out-expo);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-scroll-lock {
    overflow: hidden;
}

@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 25;
        width: 288px;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: 288px;
        transform: translateX(-100%);
    }

    .sidebar.collapsed.mobile-open {
        transform: translateX(0);
    }

    .sidebar.collapsed .nav-label,
    .sidebar.collapsed .section-chevron,
    .sidebar.collapsed .submenu {
        display: revert;
    }

    .sidebar.collapsed .nav-section-header,
    .sidebar.collapsed .sidebar-link {
        justify-content: revert;
        padding: revert;
    }

    .sidebar.collapsed .nav-section-header .section-icon {
        margin-right: 0.5rem;
    }

    .sidebar.collapsed .sidebar-link > svg {
        margin-right: 0.75rem;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

/* ============================================================
   GEOMETRIC PATTERNS - Subtle background textures
   ============================================================ */

.lct-pattern-dots {
    background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
    background-size: 20px 20px;
}

.lct-pattern-grid {
    background-image: 
        linear-gradient(var(--border-subtle) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 40px 40px;
}

.lct-pattern-diagonal {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        var(--border-subtle) 10px,
        var(--border-subtle) 11px
    );
}

/* ============================================================
   ANIMATIONS - Micro-interactions
   ============================================================ */

.lct-stagger-in > * {
    opacity: 0;
    animation: lctFadeInUp var(--duration-slow) var(--ease-out-expo) forwards;
}

.lct-stagger-in > *:nth-child(1) { animation-delay: 0ms; }
.lct-stagger-in > *:nth-child(2) { animation-delay: 50ms; }
.lct-stagger-in > *:nth-child(3) { animation-delay: 100ms; }
.lct-stagger-in > *:nth-child(4) { animation-delay: 150ms; }
.lct-stagger-in > *:nth-child(5) { animation-delay: 200ms; }
.lct-stagger-in > *:nth-child(6) { animation-delay: 250ms; }
.lct-stagger-in > *:nth-child(7) { animation-delay: 300ms; }
.lct-stagger-in > *:nth-child(8) { animation-delay: 350ms; }

@keyframes lctFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lct-skeleton {
    background: linear-gradient(
        90deg,
        var(--surface-tertiary) 0%,
        var(--surface-secondary) 50%,
        var(--surface-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: lctShimmer 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

@keyframes lctShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.lct-success-pulse {
    animation: lctSuccessPulse 0.6s var(--ease-out-expo);
}

@keyframes lctSuccessPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 4px var(--success-light); }
    100% { transform: scale(1); box-shadow: none; }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--duration-slow) var(--ease-out-expo),
                transform var(--duration-slow) var(--ease-out-expo);
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   HAMBURGER ANIMATION
   ============================================================ */

.hamburger-line {
    transition: all var(--duration-normal) var(--ease-in-out-expo);
}

.sidebar-expanded .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sidebar-expanded .hamburger-line:nth-child(2) {
    opacity: 0;
}

.sidebar-expanded .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   SUBMENU ANIMATIONS
   ============================================================ */

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-normal) var(--ease-out-expo);
}

.submenu.expanded {
    max-height: 800px;
}

.chevron {
    transition: transform var(--duration-fast) var(--ease-out-expo);
}

.chevron.rotated {
    transform: rotate(180deg);
}

.breadcrumb-separator::before {
    content: '/';
    padding: 0 0.5rem;
    color: var(--text-tertiary);
}

/* ============================================================
   STATUS INDICATORS
   ============================================================ */

.lct-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.lct-status-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: lctPulse 2s ease-in-out infinite;
}

.lct-status-dot.success { background: var(--success); }
.lct-status-dot.warning { background: var(--warning); }
.lct-status-dot.error { background: var(--error); }
.lct-status-dot.info { background: var(--info); }

@keyframes lctPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0; }
}

/* ============================================================
   FOCUS STATES - Accessibility
   ============================================================ */

:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* ============================================================
   DARK MODE FOUNDATION
   System preference detection + manual toggle support
   ============================================================ */

html.dark {
    --surface-primary: #0f172a;
    --surface-secondary: #1e293b;
    --surface-tertiary: #334155;
    --surface-elevated: #1e293b;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #64748b;
    --text-inverse: #0f172a;
    
    --border-default: #334155;
    --border-subtle: #1e293b;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

html.dark body {
    background-color: var(--surface-primary);
    color: var(--text-primary);
}

html.dark .lct-card,
html.dark .bg-white {
    background-color: var(--surface-elevated);
    border-color: var(--border-default);
}

html.dark .sidebar,
html.dark header {
    background-color: var(--surface-secondary);
    border-color: var(--border-default);
}

html.dark .sidebar-link:hover {
    background-color: var(--surface-tertiary);
}

html.dark .sidebar-link.active {
    background-color: var(--brand-primary-light);
}

html.dark .btn-secondary {
    background-color: var(--surface-tertiary);
    color: var(--text-primary);
    border-color: var(--border-default);
}

html.dark .btn-secondary:hover {
    background-color: var(--surface-secondary);
}

html.dark input,
html.dark select,
html.dark textarea {
    background-color: var(--surface-secondary);
    border-color: var(--border-default);
    color: var(--text-primary);
}

html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus {
    border-color: var(--brand-primary);
}

html.dark .text-purple-500 {
    color: #a78bfa;
}

html.dark .text-amber-500 {
    color: #fbbf24;
}

html.dark .text-slate-500 {
    color: var(--text-tertiary);
}

html.dark .text-slate-700 {
    color: var(--text-secondary);
}

html.dark .text-slate-400 {
    color: var(--text-tertiary);
}

html.dark .lct-skeleton {
    background: linear-gradient(
        90deg,
        var(--surface-tertiary) 0%,
        var(--surface-secondary) 50%,
        var(--surface-tertiary) 100%
    );
    background-size: 200% 100%;
}

html.dark .lct-pattern-dots {
    background-image: radial-gradient(var(--border-default) 1px, transparent 1px);
}

html.dark table thead {
    background-color: var(--surface-secondary);
}

html.dark table tbody tr:hover {
    background-color: var(--surface-tertiary);
}

@media (prefers-color-scheme: dark) {
    html:not(.light) {
        --surface-primary: #0f172a;
        --surface-secondary: #1e293b;
        --surface-tertiary: #334155;
        --surface-elevated: #1e293b;
        
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-tertiary: #64748b;
        --text-inverse: #0f172a;
        
        --border-default: #334155;
        --border-subtle: #1e293b;
    }
}

/* ============================================================
   KEYBOARD HINT - lct-kbd
   ============================================================ */

.lct-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.375rem;
    font-size: 0.75rem;
    font-family: ui-monospace, monospace;
    background: rgb(var(--surface-tertiary-rgb, 241 245 249));
    border: 1px solid rgb(var(--border-default-rgb, 226 232 240));
    border-radius: 0.25rem;
    color: rgb(var(--text-tertiary-rgb, 100 116 139));
}

/* ============================================================
   SCROLLBAR - Thin utility
   ============================================================ */

.scrollbar-thin::-webkit-scrollbar { width: 6px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgb(var(--border-default-rgb, 203 213 225)); border-radius: 3px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgb(var(--text-tertiary-rgb, 148 163 184)); }

/* ============================================================
   STATUS CHIPS - Shared status display across process views
   ============================================================ */

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
}
.status-draft     { background: rgb(var(--neutral-100-rgb, 243 244 246)); color: rgb(var(--neutral-600-rgb, 75 85 99)); }
.status-active    { background: rgb(var(--success-rgb) / 0.1); color: rgb(var(--success-rgb)); }
.status-on_hold   { background: rgb(var(--warning-rgb) / 0.1); color: rgb(var(--warning-rgb)); }
.status-closed    { background: rgb(var(--neutral-100-rgb, 243 244 246)); color: rgb(var(--neutral-500-rgb, 107 114 128)); }
.status-archived  { background: rgb(var(--neutral-100-rgb, 243 244 246)); color: rgb(var(--neutral-400-rgb, 156 163 175)); }
.status-ready_for_review { background: rgb(var(--warning-rgb) / 0.1); color: rgb(var(--warning-rgb)); }
.status-approved_to_send { background: rgb(var(--success-rgb) / 0.1); color: rgb(var(--success-rgb)); }
.status-sent      { background: rgb(var(--info-rgb) / 0.1); color: rgb(var(--info-rgb)); }
.status-final     { background: rgb(var(--success-rgb) / 0.2); color: rgb(var(--success-rgb)); }

.doc-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .lct-stagger-in > * {
        opacity: 1;
        animation: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================================
   DOCUMENT CANVAS - Showcase rendering for generated artifacts
   Artifacts are the product's work-product surface; they render
   as a typeset "page" rather than a stack of data cards.
   Serif headings differentiate the document from UI chrome.
   Swap --font-serif for a self-hosted webfont (e.g. Source Serif 4)
   to upgrade without touching markup. See design-system proposal.
   ============================================================ */

:root {
    /* Document serif — brand-independent work-product typeface. @font-face: css/fonts.css.
       NOTE: --font-sans is defined in fonts.css (loads before the per-brand override
       in _SharedHead) so brand FontFamily wins; do not redefine it here. */
    --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
}

.lct-doc-sheet {
    max-width: 46rem;
    margin: 0 auto;
    background: rgb(var(--surface-primary-rgb, 255 255 255));
    border: 1px solid rgb(var(--border-default-rgb, 226 232 240));
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
    padding: 3rem 3.5rem;
}

.lct-doc-capline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.625rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid rgb(var(--border-default-rgb, 226 232 240));
}
.lct-doc-ref {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: rgb(var(--text-tertiary-rgb, 148 163 184));
}
.lct-doc-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.1875rem 0.625rem;
    background: rgb(var(--warning-rgb) / 0.12);
    color: rgb(var(--warning-rgb));
    text-transform: capitalize;
    white-space: nowrap;
}

.lct-doc-title {
    font-family: var(--font-serif);
    font-size: 1.875rem;
    line-height: 1.2;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: rgb(var(--text-primary-rgb, 15 23 42));
}
.lct-doc-sub {
    font-size: 0.9375rem;
    color: rgb(var(--text-secondary-rgb, 71 85 105));
    margin: 0 0 0.375rem;
}
.lct-doc-meta {
    font-size: 0.75rem;
    color: rgb(var(--text-tertiary-rgb, 148 163 184));
    margin: 0 0 2.25rem;
}

.lct-doc-section { scroll-margin-top: 1rem; }
.lct-doc-section + .lct-doc-section { margin-top: 2rem; }

.lct-doc-h2 {
    font-family: var(--font-serif);
    font-size: 1.1875rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: rgb(var(--text-primary-rgb, 15 23 42));
}
.lct-doc-body-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgb(var(--text-primary-rgb, 15 23 42));
    margin: 0 0 0.75rem;
}
.lct-doc-list {
    list-style: disc;
    padding-left: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgb(var(--text-primary-rgb, 15 23 42));
}
.lct-doc-list li { margin-bottom: 0.25rem; }
.lct-doc-muted { font-size: 0.875rem; font-style: italic; color: rgb(var(--text-tertiary-rgb, 148 163 184)); }

/* Document prose: typeset body for markdown-rendered content */
.lct-doc-prose { font-size: 0.9375rem; line-height: 1.7; color: rgb(var(--text-primary-rgb, 15 23 42)); }
.lct-doc-prose h1, .lct-doc-prose h2, .lct-doc-prose h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    color: rgb(var(--text-primary-rgb, 15 23 42));
    line-height: 1.3;
    margin: 1.75rem 0 0.75rem;
    scroll-margin-top: 1rem;
}
.lct-doc-prose h1 { font-size: 1.5rem; }
.lct-doc-prose h2 { font-size: 1.1875rem; }
.lct-doc-prose h3 { font-size: 1.0625rem; }
.lct-doc-prose p { margin: 0 0 0.75rem; }
.lct-doc-prose ul, .lct-doc-prose ol { padding-left: 1.25rem; margin: 0 0 0.75rem; }
.lct-doc-prose li { margin-bottom: 0.25rem; }
.lct-doc-prose a { color: rgb(var(--brand-primary-rgb, 30 64 175)); text-decoration: underline; }
.lct-doc-prose strong { font-weight: 600; }
.lct-doc-prose blockquote {
    border-left: 3px solid rgb(var(--border-default-rgb, 226 232 240));
    padding-left: 1rem; margin: 0 0 0.75rem; color: rgb(var(--text-secondary-rgb, 71 85 105));
}

/* Print-quality table for tabular artifact content (chronologies, schedules) */
.lct-doc-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.lct-doc-table thead th {
    text-align: left;
    font-weight: 600;
    color: rgb(var(--text-secondary-rgb, 71 85 105));
    padding: 0 0.875rem 0.625rem 0;
    border-bottom: 2px solid rgb(var(--border-default-rgb, 203 213 225));
}
.lct-doc-table tbody td {
    vertical-align: top;
    padding: 0.8125rem 0.875rem 0.8125rem 0;
    border-bottom: 1px solid rgb(var(--border-default-rgb, 226 232 240));
    line-height: 1.55;
    color: rgb(var(--text-primary-rgb, 15 23 42));
}
.lct-doc-table tbody tr:nth-child(even) { background: rgb(var(--surface-secondary-rgb, 248 250 252)); }
.lct-doc-table th:not(:first-child), .lct-doc-table td:not(:first-child) { padding-left: 0.875rem; }
.lct-doc-td-date {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: rgb(var(--text-secondary-rgb, 71 85 105));
}

.lct-doc-attribution {
    margin-top: 1.5rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid rgb(var(--info-rgb, 14 165 233) / 0.2);
    background: rgb(var(--info-rgb, 14 165 233) / 0.05);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: rgb(var(--text-secondary-rgb, 71 85 105));
}
.lct-doc-attribution b { color: rgb(var(--info-rgb, 14 165 233)); font-weight: 600; }

.lct-outline-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: rgb(var(--text-secondary-rgb, 71 85 105));
    cursor: pointer;
    text-decoration: none;
}
.lct-outline-link:hover { background: rgb(var(--surface-tertiary-rgb, 241 245 249)); }
.lct-outline-link.active { background: rgb(var(--brand-primary-rgb, 30 64 175) / 0.1); color: rgb(var(--brand-primary-rgb, 30 64 175)); font-weight: 600; }
.lct-outline-sub { padding-left: 1.5rem; font-size: 0.8125rem; }

/* Markdown tables rendered inside document prose get the same print quality */
.lct-doc-prose table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin: 0.5rem 0 1rem; }
.lct-doc-prose thead th {
    text-align: left;
    font-weight: 600;
    color: rgb(var(--text-secondary-rgb, 71 85 105));
    padding: 0 0.875rem 0.625rem 0;
    border-bottom: 2px solid rgb(var(--border-default-rgb, 203 213 225));
}
.lct-doc-prose tbody td {
    vertical-align: top;
    padding: 0.8125rem 0.875rem 0.8125rem 0;
    border-bottom: 1px solid rgb(var(--border-default-rgb, 226 232 240));
    line-height: 1.55;
}
.lct-doc-prose tbody tr:nth-child(even) { background: rgb(var(--surface-secondary-rgb, 248 250 252)); }
.lct-doc-prose th:not(:first-child), .lct-doc-prose td:not(:first-child) { padding-left: 0.875rem; }

/* =========================================================================
   Slide-over shell (ADR-SLIDE-OVER-SHELL)
   -------------------------------------------------------------------------
   Generic right-edge panel chrome emitted by SlideOverTagHelper, driven by the
   $store.slideOver Alpine store. Chrome only — content is slotted in by callers.
   Panels stack (z-index from stack depth); anchored below the global topbar so
   non-modal panels leave the top chrome usable.
   ========================================================================= */

.lct-slide-over-root {
    position: fixed;
    top: var(--topbar-h, 4rem);
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none; /* closed children are display:none; open children re-enable below */
}

.lct-slide-over-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(15 23 42 / 0.32);
    pointer-events: auto;
}

.lct-slide-over {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: rgb(var(--surface-primary-rgb, 255 255 255));
    box-shadow: 0 12px 32px rgb(15 23 42 / 0.14);
    pointer-events: auto;
    overflow: hidden;
}
.lct-slide-over:focus { outline: none; }
.lct-slide-over--right { right: 0; border-left: 1px solid rgb(var(--border-default-rgb, 226 232 240)); }
.lct-slide-over--left  { left: 0;  border-right: 1px solid rgb(var(--border-default-rgb, 226 232 240)); }

.lct-slide-over__header {
    flex-shrink: 0;
    background: rgb(var(--surface-primary-rgb, 255 255 255));
    border-bottom: 1px solid rgb(var(--border-default-rgb, 226 232 240));
}
.lct-slide-over__headrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
}
.lct-slide-over__title {
    margin: 0;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgb(var(--text-primary-rgb, 15 23 42));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lct-slide-over__close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: rgb(var(--text-tertiary-rgb, 148 163 184));
    cursor: pointer;
    transition: background 150ms, color 150ms;
}
.lct-slide-over__close:hover {
    background: rgb(var(--surface-tertiary-rgb, 241 245 249));
    color: rgb(var(--text-primary-rgb, 15 23 42));
}
.lct-slide-over__close:focus-visible {
    outline: 2px solid rgb(var(--brand-accent-rgb, 37 140 251));
    outline-offset: 2px;
}

.lct-slide-over__tabs {
    display: flex;
    border-top: 1px solid rgb(var(--border-subtle-rgb, 241 245 249));
}
.lct-slide-over__tab {
    flex: 1 1 0;
    padding: 0.625rem 0.75rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    color: rgb(var(--text-tertiary-rgb, 148 163 184));
    cursor: pointer;
    transition: color 150ms, border-color 150ms;
}
.lct-slide-over__tab:hover { color: rgb(var(--text-secondary-rgb, 71 85 105)); }
.lct-slide-over__tab.is-active {
    color: rgb(var(--brand-primary-rgb, 30 64 175));
    border-bottom-color: rgb(var(--brand-primary-rgb, 30 64 175));
}
.lct-slide-over__tab:focus-visible {
    outline: 2px solid rgb(var(--brand-accent-rgb, 37 140 251));
    outline-offset: -2px;
}

.lct-slide-over__body {
    flex: 1 1 auto;
    overflow-y: auto;
}

/* =========================================================================
   Dropdown menu (lct-menu) + toolbar button (lct-toolbar-btn)
   -------------------------------------------------------------------------
   Canonical popover menu — the one shared primitive for action dropdowns
   (replaces ~14 hand-rolled `absolute … shadow-lg` popovers). Chrome only:
   positioning (absolute / right-0 / mt-1 / w-*) stays as utilities at the
   call site, since side and width vary. .lct-toolbar-btn is the compact
   toolbar / menu-trigger button (sits alongside filter-chip / row-action-btn
   as a context button — NOT a competitor to the page-level btn-* CTAs).
   ========================================================================= */

.lct-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.6875rem;
    border: 1px solid rgb(var(--border-default-rgb, 226 232 240));
    border-radius: 0.5rem;
    background: rgb(var(--surface-primary-rgb, 255 255 255));
    color: rgb(var(--text-secondary-rgb, 71 85 105));
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 150ms, border-color 150ms, color 150ms;
}
.lct-toolbar-btn:hover { background: rgb(var(--surface-secondary-rgb, 248 250 252)); }
.lct-toolbar-btn:focus-visible { outline: 2px solid rgb(var(--brand-accent-rgb, 37 140 251)); outline-offset: 2px; }
.lct-toolbar-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.lct-toolbar-btn--brand {
    border-color: rgb(var(--brand-primary-rgb, 30 64 175));
    color: rgb(var(--brand-primary-rgb, 30 64 175));
}
.lct-toolbar-btn--brand:hover { background: rgb(var(--brand-primary-rgb, 30 64 175) / 0.06); }

/* Popover container — apply positioning utilities (absolute right-0 mt-1 w-56 z-50) at the call site. */
.lct-menu {
    padding: 0.3125rem;
    border: 1px solid rgb(var(--border-default-rgb, 226 232 240));
    border-radius: 0.625rem;
    background: rgb(var(--surface-primary-rgb, 255 255 255));
    box-shadow: 0 12px 32px rgb(15 23 42 / 0.14);
}
/* Menu row — works for <button> and <a>; add justify-between / color utilities as needed. */
.lct-menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.5625rem 0.6875rem;
    border: 0;
    border-radius: 0.4375rem;
    background: transparent;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgb(var(--text-primary-rgb, 15 23 42));
    text-decoration: none;
    cursor: pointer;
    transition: background 150ms;
}
.lct-menu-item:hover { background: rgb(var(--surface-tertiary-rgb, 241 245 249)); color: rgb(var(--text-primary-rgb, 15 23 42)); text-decoration: none; }
.lct-menu-item:focus-visible { outline: 2px solid rgb(var(--brand-accent-rgb, 37 140 251)); outline-offset: -2px; }
.lct-menu-item:disabled, .lct-menu-item[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.lct-menu-sep { height: 1px; margin: 0.3125rem 0.25rem; background: rgb(var(--border-subtle-rgb, 241 245 249)); }
