/* ═══════════════════════════════════════
   DCE — Design Check Engine
   Design System
   ═══════════════════════════════════════ */

:root {
    --bg: #f0ede8;
    --bg-warm: #e8e4dd;
    --surface: #ffffff;
    --surface-hover: #fafaf8;
    --preview-bg: #f7f5f2;
    --border: #d4cfc7;
    --border-light: #e8e4dd;
    --text: #2c2a26;
    --text-secondary: #6b6760;
    --text-muted: #9e9890;
    --accent: #c45d3e;
    --accent-hover: #b5512f;
    --accent-light: rgba(196, 93, 62, 0.08);
    --accent-border: rgba(196, 93, 62, 0.2);
    --success: #4a8c5c;
    --success-bg: rgba(74, 140, 92, 0.08);
    --warning: #c49a3e;
    --warning-bg: rgba(196, 154, 62, 0.08);
    --error: #c45d3e;
    --error-bg: rgba(196, 93, 62, 0.08);
    --info: #3e7ec4;
    --info-bg: rgba(62, 126, 196, 0.08);
    --shadow-sm: 0 1px 3px rgba(44,42,38,0.06);
    --shadow-md: 0 4px 16px rgba(44,42,38,0.08);
    --shadow-lg: 0 8px 32px rgba(44,42,38,0.12);
    --shadow-xl: 0 16px 48px rgba(44,42,38,0.16);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --font: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --a4-width: 794px;
    --a4-height: 1123px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body, .dce-root {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════ */
.topbar {
    height: 52px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    flex-shrink: 0;
    z-index: 100;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.topbar.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.topbar-storage-toggle {
    display: flex;
    gap: 2px;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 2px;
}

.storage-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    border: none;
    border-radius: calc(var(--radius) - 1px);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.storage-btn:hover { color: var(--text); }

.storage-btn.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.topbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.topbar-spacer { flex: 1; }

/* Engineering module switcher */
.topbar-modules {
    display: flex;
    gap: 2px;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 2px;
}

.module-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: none;
    border-radius: calc(var(--radius) - 1px);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
}

.module-btn:hover:not(:disabled) {
    background: var(--surface);
    color: var(--text);
}

.module-btn.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.module-btn.active svg { stroke: var(--accent); }

.module-btn:disabled, .module-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.module-label { font-size: 11px; }

.topbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.topbar-btn:hover {
    background: var(--bg);
    color: var(--text);
    border-color: var(--text-muted);
}

.topbar-btn.active {
    background: rgba(255,255,255,0.15);
    border-color: var(--accent-border);
    color: var(--accent);
}

.topbar-btn.gated {
    opacity: 0.4;
    cursor: pointer;
}


.topbar-btn-user {
    margin-left: 4px;
}

.topbar-lang-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.topbar-lang-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topbar-lang-toggle {
    display: flex;
    gap: 1px;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 2px;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 6px;
    border: none;
    border-radius: calc(var(--radius) - 1px);
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

/* Avatar badge (initials in circle) */
.avatar-badge {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; color: #fff;
    flex-shrink: 0; text-transform: uppercase;
    background: var(--text-muted);
}
.avatar-admin { background: #dc2626; }
.avatar-manager { background: #9333ea; }
.avatar-tester { background: #2563eb; }
.avatar-vip { background: #d97706; }
.avatar-user { background: #6b7280; }

/* User dropdown menu */
.topbar-user-menu-wrap { position: relative; }
.topbar-btn-user { display: flex; align-items: center; gap: 6px; }
.topbar-user-name { font-size: 13px; font-weight: 500; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user-backdrop { position: fixed; inset: 0; z-index: 199; }
.topbar-user-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    min-width: 200px; padding: 6px 0; z-index: 200;
}
.topbar-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 10px 16px; border: none; background: none;
    font-size: 13px; font-weight: 500; color: var(--text);
    cursor: pointer; text-align: left;
}
.topbar-dropdown-item:hover { background: var(--bg); }
.topbar-dropdown-item.logout { color: var(--error); }
.topbar-dropdown-item.logout:hover { background: #fef2f2; }
.topbar-dropdown-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

/* Profile grid */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}
.profile-section .form-group { margin-bottom: 0; }

.lang-btn:hover { color: var(--text); }

.lang-btn.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════
   NOTIFICATION BAR
   ═══════════════════════════════════════ */
.notification-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease;
    max-width: 500px;
    pointer-events: none;
    opacity: 0;
}

.notification-bar.visible {
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    cursor: pointer;
    opacity: 1;
}

.notification-bar.info { background: #eaf2fb; color: var(--info); border: 1px solid rgba(62,126,196,0.2); }
.notification-bar.success { background: #eaf5ed; color: var(--success); border: 1px solid rgba(74,140,92,0.2); }
.notification-bar.warning { background: #faf5ea; color: #8a6d1b; border: 1px solid rgba(196,154,62,0.2); }
.notification-bar.error { background: #fbeceb; color: var(--error); border: 1px solid rgba(196,93,62,0.2); }

.notification-bar svg { width: 18px; height: 18px; flex-shrink: 0; }
.notification-close {
    margin-left: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition);
    background: none;
    border: none;
    color: inherit;
    font-size: 14px;
}
.notification-close:hover { opacity: 1; }

/* ═══════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════ */
.main-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* ═══════════════════════════════════════
   A4 INLINE PLACEHOLDERS
   ═══════════════════════════════════════ */
.a4-placeholder {
    margin: 16px 36px;
    padding: 32px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-hover);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition);
}

.a4-placeholder:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.a4-placeholder svg {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    transition: color var(--transition);
}

.a4-placeholder:hover svg { color: var(--accent); }

.a4-placeholder-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.a4-placeholder:hover .a4-placeholder-title { color: var(--accent); }

.a4-placeholder-hint {
    font-size: 11px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════
   CENTER — A4 PRESENTATION
   ═══════════════════════════════════════ */
.center-area {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    overflow-y: auto;
    padding: 24px;
    background: var(--bg);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.center-area::-webkit-scrollbar {
    display: none;
}

/* TocPanel sticks while A4 scrolls */
.center-area > :last-child {
    position: sticky;
    top: 0;
    max-height: calc(100vh - 52px - 48px);
}

.a4-page {
    width: var(--a4-width);
    min-height: var(--a4-height);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    font-size: var(--body-size, 11px);
}


/* 2×A4 mode — first page fixed in place, second paged */
.a4-page-fixed {
    position: sticky;
    top: 0;
    width: var(--a4-width);
    height: var(--a4-height);
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: var(--shadow-lg);
    background: var(--surface);
    scrollbar-width: thin;
}
.a4-page-fixed .a4-page {
    min-height: 100%;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

/* 2×A4 mode — second pane: paginated A4 pages with header/footer */
.a4-page-paged {
    width: var(--a4-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.a4-page-paged > .a4-page {
    width: var(--a4-width);
    box-shadow: var(--shadow-lg);
    background: var(--surface);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Hidden measurement container for JS pagination */
.a4-measure-container {
    position: absolute;
    left: -9999px;
    visibility: hidden;
}


/* Page header */
.page-header {
    padding: 28px 36px 20px;
    border-bottom: 2px solid var(--text);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.page-header-left {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.page-header-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.page-header-logo-default {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    color: var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.page-header-logo-default svg {
    width: 28px;
    height: 28px;
}

.page-header-left h1 {
    font-family: var(--font);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.page-header-left p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
}

.page-header-right {
    text-align: right;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.6;
}

/* Cross-section display */
.section-block {
    padding: 24px 36px;
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}

.section-block:hover {
    background: var(--accent-light);
}

.section-block::after {
    content: 'Klikněte pro editaci';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 10px;
    color: var(--accent);
    opacity: 0;
    transition: opacity var(--transition);
    font-weight: 500;
}

.section-block:hover::after { opacity: 1; }

.section-title {
    font-size: var(--heading-size, 12px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.cross-section-visual {
    width: 100%;
    height: 260px;
    background: #fafaf8;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cross-section-visual.compact {
    height: 180px;
}

.cs-drawing {
    position: relative;
}

.cs-concrete {
    width: 200px;
    height: 200px;
    background: #e8e4dd;
    border: 2px solid #8a8580;
    position: relative;
}

.cs-rebar {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 1.5px solid #8a3a22;
}

.cs-rebar.top-left { top: 16px; left: 16px; }
.cs-rebar.top-mid1 { top: 16px; left: 60px; }
.cs-rebar.top-mid2 { top: 16px; right: 60px; }
.cs-rebar.top-right { top: 16px; right: 16px; }
.cs-rebar.bot-left { bottom: 16px; left: 16px; }
.cs-rebar.bot-mid1 { bottom: 16px; left: 60px; }
.cs-rebar.bot-mid2 { bottom: 16px; right: 60px; }
.cs-rebar.bot-right { bottom: 16px; right: 16px; }

.cs-dim {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.cs-dim.width { bottom: -28px; left: 50%; transform: translateX(-50%); }
.cs-dim.height { right: -50px; top: 50%; transform: translateY(-50%) rotate(-90deg); }

.cs-dim-line {
    position: absolute;
    background: var(--text-muted);
}

.cs-dim-line.h { width: 200px; height: 1px; bottom: -14px; left: 0; }
.cs-dim-line.v { width: 1px; height: 200px; right: -24px; top: 0; }

.cs-material-label {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255,255,255,0.85);
    padding: 2px 8px;
    border-radius: 4px;
}

.cs-info-table {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 500;
}

.cs-info-table strong { color: var(--text); font-weight: 600; }

/* Internal forces table */
.forces-block {
    padding: 20px 36px;
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}

.forces-block:hover { background: var(--accent-light); }
.forces-block::after {
    content: 'Klikněte pro editaci';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 10px;
    color: var(--accent);
    opacity: 0;
    transition: opacity var(--transition);
    font-weight: 500;
}
.forces-block:hover::after { opacity: 1; }

.forces-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.forces-table th {
    background: #f5f3ef;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
}

.forces-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text);
}

.forces-table tr:last-child td { border-bottom: none; }

.forces-table .unit {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 400;
}

/* Combination table */
.combination-table-block {
    padding: 16px 0;
}

.combination-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.combination-table-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.combination-table-controls {
    display: flex;
    gap: 8px;
}

.combination-mode-select,
.combination-category-select {
    font-family: var(--font);
    font-size: 10px;
    padding: 4px 8px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
}

.cat-badge {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cat-badge.uls {
    background: var(--error-bg, #fff0f0);
    color: var(--error, #c45d3e);
}

.cat-badge.sls {
    background: #f0f4ff;
    color: #4a6fa5;
}

.no-data-row {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 12px !important;
}

/* Edit button for user combinations */
.combination-edit-btn {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}
.combination-edit-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* User combinations 13-column table */
.user-comb-table th {
    font-size: 9px;
    padding: 5px 4px;
    text-align: center;
}
.user-comb-table .sub-col {
    font-size: 8px;
    padding: 2px 4px;
    background: #f9f7f4;
    border-bottom: 1px solid var(--border-light);
}
.user-comb-table .total-col {
    color: var(--accent);
}
.user-comb-table td {
    font-size: 11px;
    padding: 5px 4px;
    text-align: center;
}
.user-comb-table .num-cell {
    font-family: var(--font-mono);
    text-align: right;
    padding-right: 6px;
}
.user-comb-table .total-cell {
    font-weight: 600;
    color: var(--accent);
    background: rgba(196,93,62,0.03);
}
.user-comb-table .type-cell {
    font-size: 9px;
    font-weight: 500;
}

/* Nonconformities */
.nonconformities-section {
    padding: 12px 0;
    margin-top: 8px;
}

.nonconformities-list {
    font-size: 11px;
    color: var(--text-secondary);
}

.nonconformity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.nonconformity-item:last-child { border-bottom: none; }

.nonconformity-icon {
    flex-shrink: 0;
}

.nonconformity-item.error .nonconformity-icon { color: var(--error, #c45d3e); }
.nonconformity-item.error { color: var(--error, #c45d3e); }
.nonconformity-item.warning .nonconformity-icon { color: var(--warning, #c49a3e); }
.nonconformity-item.warning { color: var(--text-secondary, #555); }
.nonconformity-item.info .nonconformity-icon { color: var(--info, #3e8fc4); }
.nonconformity-item.info { color: var(--text-muted, #888); }

.nonconformity-pass {
    color: var(--text-muted);
    font-style: italic;
    padding: 8px 0;
}

/* Calculation results */
.results-block {
    padding: 20px 36px;
    flex: 1;
}

.result-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.result-card {
    background: #fafaf8;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.result-card-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.result-card-value {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.result-card-value .unit {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 2px;
}

.result-card.pass { border-left: 3px solid var(--success); }
.result-card.fail { border-left: 3px solid var(--error); }

.utilization-bar {
    margin-top: 8px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.utilization-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.utilization-fill.ok { background: var(--success); }
.utilization-fill.warn { background: var(--warning); }
.utilization-fill.fail { background: var(--error); }

/* Code info (chapter 1) */
.code-info {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.code-sep {
    margin: 0 8px;
    color: var(--border);
}

/* Materials summary (chapter 2) */
.materials-summary {
    display: flex;
    gap: 24px;
}

.material-item {
    display: flex;
    gap: 6px;
    font-size: 13px;
}

.material-type {
    color: var(--text-secondary);
    font-weight: 500;
}

.material-grade {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text);
}

.chapter-empty {
    font-size: 12px;
    font-style: italic;
    color: var(--text-muted);
}

/* Non-hoverable section blocks */
.section-block.no-hover {
    cursor: default;
}

.section-block.no-hover:hover {
    background: transparent;
}

.section-block.no-hover::after {
    display: none;
}

/* Summary section */
.summary-section {
    border-top: 1px solid var(--border-light);
}

.summary-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: #fafaf8;
    border: 1px solid var(--border-light);
}

.summary-item.pass { border-left: 3px solid var(--success); }
.summary-item.fail { border-left: 3px solid var(--error); }

.summary-name {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.summary-util {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.summary-verdict {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.summary-item.pass .summary-verdict {
    background: var(--success-bg);
    color: var(--success);
}

.summary-item.fail .summary-verdict {
    background: var(--error-bg);
    color: var(--error);
}

/* Check chapters */
.check-chapter {
    padding: 20px 36px;
    border-top: 1px solid var(--border-light);
}

.sub-section {
    margin-top: 12px;
}

.sub-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Inline result strain/stress diagram */
.result-diagram-inline {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

.result-diagram-inline svg {
    max-width: 100%;
    height: auto;
    max-height: 260px;
}

/* No results note */
.no-results-note {
    margin-top: 12px;
    padding: 12px 16px;
    font-size: 12px;
    font-style: italic;
    color: var(--text-muted);
    background: var(--surface-hover);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

/* Extended placeholder */
.extended-placeholder {
    margin-top: 12px;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.extended-text {
    font-size: 11px;
    font-style: italic;
    color: var(--text-muted);
}

/* Page footer */
.page-footer {
    padding: 12px 36px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: auto;
}

/* Empty state */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 36px;
    text-align: center;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--border);
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 280px;
    line-height: 1.5;
}

/* ═══════════════════════════════════════
   MODAL DIALOGS
   ═══════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 42, 38, 0.4);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 440px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition);
}

.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body {
    padding: 20px 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child { margin-bottom: 0; }

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-unit {
    font-weight: 400;
    font-size: 10px;
    color: var(--text-muted, #9B9590);
    margin-left: 2px;
}

.form-input {
    width: 100%;
    font-family: var(--font);
    font-size: 13px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color var(--transition);
    background: var(--surface);
    color: var(--text);
}

.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-row.four-col {
    grid-template-columns: auto 1fr 1fr 1fr;
}

.form-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}
.form-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 36px;
    height: 20px;
    background: var(--border);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background var(--transition);
    flex-shrink: 0;
}
.form-toggle input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.form-toggle input[type="checkbox"]:checked {
    background: var(--accent);
}
.form-toggle input[type="checkbox"]:checked::after {
    transform: translateX(16px);
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Toggle row & switch */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.toggle-row .form-label { margin-bottom: 0; }

.setting-toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-warm);
    padding: 2px;
    cursor: pointer;
    position: relative;
    transition: background var(--transition), border-color var(--transition);
    flex-shrink: 0;
}
.setting-toggle .toggle-knob {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition);
}
.setting-toggle.on {
    background: var(--accent);
    border-color: var(--accent);
}
.setting-toggle.on .toggle-knob {
    transform: translateX(20px);
}

/* Color input */
.form-color {
    padding: 4px;
    height: 42px;
    cursor: pointer;
}

.modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg); }

/* Material picker cards */
.material-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.material-card {
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    background: none;
}

.material-card:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.material-card.selected {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(196, 93, 62, 0.1);
}

.material-card-grade {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.material-card-info {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ═══════════════════════════════════════
   AI CHAT FLOATING PANEL
   ═══════════════════════════════════════ */
.ai-chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    z-index: 150;
}

.ai-chat-toggle:hover { transform: scale(1.08); box-shadow: var(--shadow-xl); }
.ai-chat-toggle svg { width: 24px; height: 24px; }

.ai-chat-panel {
    position: fixed;
    bottom: 82px;
    right: 20px;
    width: 360px;
    height: 460px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    z-index: 140;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-chat-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.ai-chat-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #d4845e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.ai-chat-header-info h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.ai-chat-header-info p {
    font-size: 10px;
    color: var(--success);
    font-weight: 500;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
}

.chat-msg.ai {
    background: #f5f3ef;
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg.user {
    background: var(--accent);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-chat-input {
    padding: 12px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 8px;
}

.ai-chat-input input {
    flex: 1;
    font-family: var(--font);
    font-size: 13px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    outline: none;
    transition: border-color var(--transition);
    background: #fafaf8;
}

.ai-chat-input input:focus { border-color: var(--accent); }

.ai-chat-input button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.ai-chat-input button:hover { background: var(--accent-hover); }
.ai-chat-input button svg { width: 16px; height: 16px; }
.ai-chat-input button:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-chat-input input:disabled { opacity: 0.6; }

.ai-chat-apikey {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    justify-content: center;
}
.ai-chat-apikey p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.ai-apikey-input { display: flex; gap: 6px; }
.ai-apikey-input input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-family: monospace;
    background: var(--surface);
    color: var(--text-primary);
}
.ai-apikey-input input:focus { border-color: var(--accent); outline: none; }
.ai-apikey-input button {
    padding: 8px 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}
.ai-apikey-input button:hover { background: var(--accent-hover); }
.ai-apikey-input button:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-apikey-hint { font-size: 11px !important; color: var(--text-muted) !important; }

.typing-indicator {
    display: inline-block;
    animation: typingPulse 1.2s ease-in-out infinite;
    color: var(--text-muted);
    letter-spacing: 2px;
}

@keyframes typingPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ═══════════════════════════════════════
   TOOLTIP
   ═══════════════════════════════════════ */
.tooltip-wrap { position: relative; }
.tooltip {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--text);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 50;
}
.tooltip-wrap:hover .tooltip { opacity: 1; }

/* ═══════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

/* ═══════════════════════════════════════
   MATERIAL EDITOR — Radzen form overrides
   Global rules to override Radzen defaults
   ═══════════════════════════════════════ */

/* Force ALL Radzen components inside editor-input to fill width */
.editor-input > .rz-spinner,
.editor-input > .rz-dropdown,
.editor-input > .rz-textbox,
.editor-input > span,
.editor-input > input {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Spinner: flex layout, hide buttons */
.editor-input .rz-spinner {
    display: flex !important;
}

.editor-input .rz-spinner > .rz-inputtext {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.editor-input .rz-spinner .rz-spinner-button {
    display: none !important;
}


/* ===== Profile/Licenses dialog shared styles (pd-* prefix) ===== */
.pd-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 200; display: flex; align-items: center; justify-content: center; }
.pd-dialog { background: var(--surface, #fff); border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); width: 520px; max-height: 85vh; display: flex; flex-direction: column; }
.pd-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border, #e8e4e0); }
.pd-title { font-size: 16px; font-weight: 600; margin: 0; }
.pd-close-btn { background: none; border: none; cursor: pointer; padding: 4px; color: var(--text-secondary, #6b6760); }
.pd-close-btn:hover { color: var(--text); }

.pd-user-badge { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--border, #e8e4e0); background: var(--bg, #fafaf8); }
.pd-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border, #e8e4e0); padding: 0 24px; }
.pd-tab { background: none; border: none; padding: 10px 16px; font-size: 13px; cursor: pointer; color: var(--text-secondary, #6b6760); border-bottom: 2px solid transparent; }
.pd-tab.active { color: var(--accent, #C45D3E); border-bottom-color: var(--accent, #C45D3E); font-weight: 600; }
.pd-tab:hover { color: var(--text); }

.pd-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.pd-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.pd-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted, #9b9590); margin: 16px 0 8px; }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.pd-message { margin-top: 12px; font-size: 12px; color: var(--success, #4caf50); }

.pd-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px; border-top: 1px solid var(--border, #e8e4e0); }
.pd-btn { padding: 8px 20px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); cursor: pointer; font-size: 13px; }
.pd-btn:hover { background: var(--bg); }
.pd-btn-accent { background: var(--accent, #C45D3E); color: #fff; border-color: var(--accent); }
.pd-btn-accent:hover { opacity: 0.9; }

.pd-status-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pd-tier-badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.tier-active { background: #e8f5e9; color: #2e7d32; }
.tier-trial { background: #fff3e0; color: #e65100; }
.tier-expired, .tier-anonymous { background: #fce4ec; color: #c62828; }

.pd-module-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.pd-module-table th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted, #9b9590); }
.pd-module-table td { padding: 8px; border-bottom: 1px solid var(--border, #e8e4e0); }
.pd-mod-badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11px; background: #fce4ec; color: #c62828; }
.pd-mod-badge.active { background: #e8f5e9; color: #2e7d32; }
.pd-mod-badge.warning { background: #fff8e1; color: #7a5800; }
.pd-mod-badge.expired { background: #f5f3f0; color: #999; }

/* ===== PRINT ===== */

/* Dev role switcher — only on localhost */
.dev-role-switcher {
    margin-left: auto;
    margin-right: 8px;
}
.dev-role-select {
    font-family: var(--font);
    font-size: 11px;
    padding: 4px 8px;
    border: 1px dashed var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    outline: none;
}
.dev-role-select:focus {
    border-color: var(--accent);
}

/* User Management Dialog */
.um-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.um-dialog { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-xl); width: 920px; max-width: 95vw; max-height: 85vh; display: flex; flex-direction: column; }
.um-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.um-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.um-title { font-size: 18px; font-weight: 600; margin: 0; }
.um-close-btn { background: none; border: none; cursor: pointer; padding: 4px; color: var(--text-muted); }
.um-body { padding: 24px; overflow-y: auto; flex: 1; }
.um-empty { text-align: center; padding: 40px; color: var(--text-muted); }
.um-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.um-table th { text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--border); font-weight: 600; font-size: 11px; text-transform: uppercase; color: var(--text-muted); }
.um-table td { padding: 8px 12px; border-bottom: 1px solid var(--border-light); }
.um-role-select { font-size: 12px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 3px; background: var(--bg); }
.um-tier-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.tier-active { background: #e8f5e9; color: #2e7d32; }
.tier-trial { background: #fff3e0; color: #e65100; }
.tier-expired { background: #fbe9e7; color: #bf360c; }
.um-action-btn { background: none; border: 1px solid var(--border); border-radius: 3px; padding: 2px 8px; cursor: pointer; font-size: 12px; }
.um-action-btn.danger { color: #c62828; border-color: #c62828; }
.um-action-btn:hover { background: var(--bg); }
.um-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.um-btn { padding: 8px 20px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); cursor: pointer; font-size: 13px; }
.um-btn:hover { background: var(--bg); }

@page {
    margin: 0;  /* Remove browser header/footer — A4Page has its own */
    size: A4;
}

@media print {
    /* Hide chrome */
    .topbar,
    .toc-page,
    .notification-bar,
    .blazor-error-boundary,
    .a4-placeholder,
    .ai-chat-toggle,
    .ai-chat-panel { display: none !important; }

    /* Reset layout */
    .dce-root,
    .main-layout,
    .center-area {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        background: white !important;
    }

    /* A4 page — fill printed page */
    .a4-page-paged {
        width: 100% !important;
        min-height: auto !important;
        overflow: visible !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
        height: auto !important;
        display: block !important;
        gap: 0 !important;
    }

    /* Every A4 page (both fixed first page and paginated pages) */
    .a4-page,
    .a4-page-fixed,
    .a4-page-paged > .a4-page {
        width: 100% !important;
        height: 100vh !important;       /* fill actual printable area (not fixed 297mm) */
        max-height: 100vh !important;
        overflow: hidden !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
        page-break-after: always;
        page-break-inside: avoid;
    }

    /* Last page: no forced page-break */
    .a4-page:last-child,
    .a4-page-fixed:last-child,
    .a4-page-paged > .a4-page:last-child {
        page-break-after: auto;
    }

    /* Content fills available space, footer stays at bottom */
    .a4-page .a4-page-content,
    .a4-page-fixed .a4-page-content,
    .a4-page-paged > .a4-page .a4-page-content {
        flex: 1 !important;
        overflow: hidden !important;
    }

    .a4-page .page-footer,
    .a4-page-fixed .page-footer,
    .a4-page-paged > .a4-page .page-footer {
        margin-top: auto !important;
        flex-shrink: 0 !important;
    }

    /* Page header must not shrink */
    .page-header { flex-shrink: 0 !important; page-break-inside: avoid; page-break-after: avoid; }

    /* Page breaks */
    .check-chapter { page-break-inside: avoid; }
    .summary-section { page-break-inside: avoid; page-break-after: auto; }

    /* Hidden measurement container */
    .a4-measure-container { display: none !important; }

    /* Preserve colors for diagrams and badges */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* SVG diagrams — ensure visible */
    svg { max-width: 100%; height: auto; }

    /* Hide interactive elements */
    .toc-calc-button,
    .se-btn-accent,
    .se-btn-primary,
    button[title*="Zpět"],
    button[title*="Znovu"] { display: none !important; }
}

/* ═══════════════════════════════════════
   Sigma-Eps Material Diagram
   ═══════════════════════════════════════ */
.sigma-eps-diagram {
    margin-top: 1rem;
    max-width: 360px;
    border: 1px solid var(--border-subtle, #e0dcd8);
    border-radius: 6px;
    background: #faf9f8;
    padding: 8px;
}
