.beam-calculator-page [hidden], .modal [hidden] { display: none !important; }
.ob-beam-stage-toolbar__file-chip { position:relative; }
.beam-model-name { display:inline-flex; align-items:center; min-width:0; max-width:100%; min-height:36px; padding:4px 6px; border:1px solid transparent; border-radius:6px; background:transparent; text-align:left; cursor:text; }
.beam-model-name:hover { border-color:#cbd5e1; background:#f8fafc; }
.beam-model-name:focus-visible { outline:2px solid #439a9c; outline-offset:2px; }
.beam-calculator-page input.beam-model-name-input { width:240px; min-width:0; max-width:100%; min-height:36px; height:36px; padding:4px 6px; border-radius:6px; font-size:14px; font-weight:700; }
.beam-model-name-error { position:absolute; top:calc(100% + 4px); left:0; z-index:25; width:260px; max-width:80vw; padding:8px 10px; border:1px solid #fecaca; border-radius:6px; background:#fff; color:#b42318; font-size:12px; line-height:1.5; box-shadow:0 3px 12px #0f172a14; }
@media(max-width:767px) { .beam-calculator-page input.beam-model-name-input { font-size:16px; } }
.beam-history-buttons { display: inline-flex; gap: 2px; }
.beam-history-buttons .btn { min-width: 36px; min-height: 36px; padding: 7px 10px; }
.beam-history-buttons button:disabled { opacity: .35; cursor: default; }
.beam-calculator-page .btn.beam-toolbar-icon { border-color:transparent; background:transparent; color:#64748b; }
.beam-calculator-page .btn.beam-toolbar-icon:hover:not(:disabled) { background:#f1f5f9; color:#334155; }

/* Match the Project controls used by Section Builder and 2D Analysis. */
.beam-calculator-page .beam-project-toggle { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:40px; padding:0 12px; border:1px solid #dce4eb; border-radius:8px; color:#536174; background:#f8fafc; font-size:13px; font-weight:700; cursor:pointer; white-space:nowrap; }
.beam-calculator-page .beam-project-toggle:hover,
.beam-calculator-page .model-options-menu[open] > summary { border-color:#a9d8d9; color:#2d7172; background:#ecfbfb; }
.beam-calculator-page .model-options-menu svg { width:18px; height:18px; flex-shrink:0; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.7; }
.beam-calculator-page .beam-project-toggle .beam-project-chevron { width:12px; height:12px; transition:transform 140ms ease; }
.beam-calculator-page .model-options-menu[open] .beam-project-chevron { transform:rotate(180deg); }
.beam-calculator-page .model-options-menu__panel { left:0; right:auto; width:280px; min-width:0; max-width:calc(100vw - 48px); padding:6px; border-color:#dce4eb; border-radius:11px; box-shadow:0 18px 42px #0f172a29; }
.beam-calculator-page .model-options-menu__panel > button,
.beam-calculator-page .model-options-menu__panel > a { display:grid; grid-template-columns:24px minmax(0,1fr); align-items:center; gap:10px; width:100%; min-height:48px; padding:9px 10px; border:0; border-radius:7px; background:transparent; color:#526174; text-align:left; text-decoration:none; cursor:pointer; }
.beam-calculator-page .model-options-menu__panel > button > span,
.beam-calculator-page .model-options-menu__panel > a > span { display:grid; gap:2px; min-width:0; }
.beam-calculator-page .model-options-menu__panel strong { color:#334155; font-size:13px; font-weight:700; line-height:1.35; }
.beam-calculator-page .model-options-menu__panel small { color:#7c8b9e; font-size:11px; font-weight:400; line-height:1.4; }
.beam-calculator-page .model-options-menu__panel strong:has(kbd) { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.beam-calculator-page .model-options-menu__panel kbd { padding:0; border:0; background:none; color:#7c8b9e; font-family:inherit; font-size:10px; font-weight:400; white-space:nowrap; }
.beam-calculator-page .model-options-menu__panel > button:hover,
.beam-calculator-page .model-options-menu__panel > a:hover { background:#effafa; color:#274e56; }
.beam-calculator-page .beam-project-divider { display:block; height:1px; margin:4px 6px; background:#e8edf1; }
.beam-calculator-page .beam-project-toggle:focus-visible,
.beam-calculator-page .model-options-menu__panel > :focus-visible,
.beam-calculator-page .beam-properties-trigger:focus-visible { outline:2px solid #439a9c; outline-offset:2px; }
.beam-calculator-page .beam-properties-trigger { width:40px; min-height:40px; padding:0; justify-content:center; font-size:16px; }
@media(max-width:639px) {
    .beam-calculator-page .beam-project-toggle { gap:6px; padding:0 8px; }
    .beam-calculator-page #beam-ask-optimal { min-width:0; height:40px; padding:0 8px; }
    .beam-calculator-page .beam-properties-trigger { justify-self:end; }
    .beam-calculator-page .model-options-menu__panel { width:280px; max-width:calc(100vw - 48px); }
}


.beam-calculator-page .ob-model-table-block__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.beam-calculator-page .ob-model-table-block__title { font-size: 14px; font-weight: 700; color: #334155; }
.beam-input-filters { display: flex; flex-wrap: wrap; gap: 3px; }
.beam-input-filters button { background: #f8fafc; color: #475569; border: 1px solid transparent; border-radius: 6px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.beam-input-filters button[aria-pressed="true"] { background: #eaf5f4; color: #28696a; border-color: #b4d9d8; }
.beam-input-filters span { padding-left: 4px; opacity: .7; }
.beam-empty { margin: 0; padding: 18px 12px; color: #64748b; text-align: center; font-size: 13px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; }
.beam-row-name { display: block; font-size: 12px; font-weight: 400; color: #64748b; overflow-wrap: anywhere; }
.beam-case-tag { display: block; width: fit-content; margin-top: 4px; padding: 1px 6px; background: #f1f5f9; border-radius: 4px; font-size: 10px; color: #475569; }
.beam-calculator-page #table-section-properties .ob-mobile-prop-chip::after { content: ' ' attr(data-property-unit) !important; color: #64748b; font-size: 10px; }
.beam-calculator-page #table-variables .ob-desktop-type-only, .beam-calculator-page #table-variables .ob-mobile-row-title { font-weight: 600; color: #334155; }
.beam-calculator-page .table-row-actions { gap: 5px; }
.beam-calculator-page .table-row-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; min-width: 34px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; }
.beam-calculator-page .table-row-actions a:hover { background: #eaf5f4; border-color: #8bbebd; }
.beam-calculator-page .table-row-actions a:focus-visible, .beam-input-filters button:focus-visible { outline: 2px solid #4a999a; outline-offset: 2px; }
.beam-muted { color: #64748b; font-size: 12px; line-height: 1.65; }
.beam-error { color: #b42318; font-size: 13px; line-height: 1.6; }
.beam-error:empty { display: none; }
.beam-ai-message { font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.beam-ai-message:empty { display: none; }
.beam-ai-proposal { padding: 12px; border: 1px solid #b4d9d8; border-radius: 8px; background: #f4faf9; font-size: 12px; }
.beam-ai-proposal ul { list-style: disc; padding-left: 16px; margin: 10px 0; max-height: 320px; overflow-y: auto; }
.beam-ai-proposal li { margin: 7px 0; overflow-wrap: anywhere; line-height: 1.6; }
.beam-ai-proposal .beam-form-actions { margin-top: 12px; }
.beam-results-scenario { margin:0; font-size:13px; font-weight:600; color:#334155; }
.beam-results-scenario:empty { display: none; }
@media (min-width: 768px) {
    .beam-calculator-page #table-variables td:first-child, .beam-calculator-page #table-section-properties td:first-child { text-align: left; padding-left: 16px; }
    .beam-calculator-page #table-variables td { vertical-align: middle; padding-top: 9px; padding-bottom: 9px; }
    .beam-calculator-page #table-variables tr[data-row-kind="beam"] { background: #f8fafc; }
    .beam-calculator-page #table-variables td:nth-child(3)::after { content: attr(data-value-unit); color: #64748b; font-size: 11px; margin-left: 5px; }
    .beam-calculator-page #table-variables td[data-spring-unit]:not([data-spring-unit=""])::after { content: attr(data-spring-unit); }
    .beam-calculator-page #table-section-properties .ob-mobile-prop-list { display: flex; flex-wrap: wrap; gap: 5px; font-size: 11px; line-height: 1.6; }
    .beam-calculator-page #table-section-properties .ob-mobile-prop-chip { padding: 2px 5px; background: #f1f5f9; border-radius: 4px; white-space: nowrap; }
    .beam-calculator-page #table-section-properties .ob-mobile-prop-chip::after { content: none; }
}
@media (max-width: 767px) {
    .beam-calculator-page .ob-model-table-block__header { align-items: flex-start; }
    .beam-input-filters button { padding: 7px 8px; }
    .beam-calculator-page .table-row-actions a { min-width: 40px; min-height: 40px; }
    .beam-case-tag { display: inline-block; margin-left: 6px; }
    .beam-row-name { flex-basis: 100%; }
    .beam-history-buttons .btn { min-height: 40px; min-width: 40px; }
}
/* Context tools share the Properties / Assistant / Activity pattern. */
.beam-save-notice { position:fixed; z-index:80; left:50%; bottom:24px; transform:translateX(-50%); display:flex; align-items:flex-start; gap:10px; width:max-content; max-width:min(460px,calc(100vw - 32px)); padding:12px 12px 12px 14px; border:1px solid #dce4ea; border-radius:12px; background:#fff; box-shadow:0 6px 28px #0f172a24; color:#334155; }
.beam-save-notice__icon { width:20px; height:20px; margin-top:1px; flex-shrink:0; stroke:#277a7c; stroke-width:1.8; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.beam-save-notice__warning, .beam-save-notice.is-error .beam-save-notice__check { display:none; }
.beam-save-notice.is-error .beam-save-notice__warning { display:block; }
.beam-save-notice.is-error .beam-save-notice__icon { stroke:#b45309; }
.beam-save-notice__body { min-width:0; }
.beam-save-notice strong { display:block; font-size:13px; line-height:1.5; font-weight:650; }
.beam-save-notice p { margin:3px 0 0; font-size:12px; line-height:1.5; color:#64748b; overflow-wrap:anywhere; max-height:120px; overflow-y:auto; }
.beam-save-notice p:empty { display:none; }
.beam-save-notice button { border:0; border-radius:5px; background:none; cursor:pointer; }
#beam-save-dismiss { margin:-4px -4px -4px 2px; padding:3px; width:30px; height:30px; flex-shrink:0; color:#64748b; font-size:23px; line-height:1; }
#beam-save-retry { margin:6px 0 0; padding:5px 0; color:#277a7c; font-size:12px; font-weight:600; }
.beam-save-notice button:focus-visible { outline:2px solid #439a9c; outline-offset:2px; }
#beam-save-dismiss:hover { background:#f1f5f9; }
.beam-calculator-page #file-manager-updates { width:100%; margin:0 0 10px; padding:9px 12px; border:1px solid #e8d7b9; border-radius:7px; background:#fffcf5; color:#805516; text-align:left; font-size:13px; font-weight:400; line-height:1.5; }
.beam-calculator-page #file-manager-updates:empty { display:none; }
@media(max-width:767px) {
    .beam-save-notice { bottom:calc(16px + env(safe-area-inset-bottom,0px)); }
    body:has(#beam-mobile-run:not([hidden])) .beam-save-notice { bottom:140px; }
    #beam-save-dismiss { width:40px; height:40px; }
}
.beam-text-button { border:0; background:transparent; color:#377e80; font-size:12px; font-weight:600; padding:8px 10px; border-radius:6px; cursor:pointer; }
.beam-text-button:hover { background:#edf7f6; }
.beam-context-panel button:focus-visible, .beam-loads-entry:focus-visible { outline:2px solid #439a9c; outline-offset:2px; }
.beam-run-group { display:inline-flex; min-width:0; align-items:stretch; gap:8px; }
.beam-run-group #beam-scenario-bar { display:flex; min-width:0; position:relative; }
#beam-scenario-bar::after { content:""; position:absolute; right:14px; top:50%; width:7px; height:7px; border-right:1.5px solid #64748b; border-bottom:1.5px solid #64748b; transform:translateY(-70%) rotate(45deg); pointer-events:none; }
.beam-calculator-page .beam-run-group select { appearance:none; -webkit-appearance:none; width:164px; min-width:0; max-width:100%; padding:9px 34px 9px 12px; color:#334155; background:#fff; border:1px solid #cbd5e1; border-radius:8px; font-size:14px; line-height:20px; text-overflow:ellipsis; box-shadow:none; }
.beam-calculator-page .beam-run-group select:hover { border-color:#94a3b8; }
.beam-calculator-page .beam-run-group select:focus-visible { border-color:#47b8b8; box-shadow:0 0 0 3px rgba(79,204,205,.28); }
.beam-loads-entry { width:100%; display:flex; justify-content:space-between; gap:12px; align-items:center; border:0; border-top:1px solid #e2e8f0; background:transparent; padding:16px 0 0; font-size:13px; font-weight:600; color:#334155; text-align:left; cursor:pointer; }
.beam-loads-entry > span:last-child { font-size:11px; font-weight:400; color:#64748b; }
.beam-context-panel { position:fixed; top:94px; bottom:16px; right:16px; width:420px; max-width:calc(100vw - 24px); z-index:60; display:flex; flex-direction:column; background:#fff; border:1px solid #dce4ea; border-radius:12px; box-shadow:0 16px 60px #0f172a20,0 2px 6px #0f172a0a; overflow:hidden; font-size:13px; color:#334155; }
.beam-context-top { display:flex; align-items:center; padding:0 12px; border-bottom:1px solid #e2e8f0; flex-shrink:0; }
.beam-context-top [role=tablist] { display:flex; flex:1; }
.beam-context-top [role=tab] { border:0; border-bottom:2px solid transparent; padding:17px 12px 15px; background:none; font-size:12px; font-weight:600; color:#64748b; cursor:pointer; }
.beam-context-top [aria-selected=true] { color:#277a7c; border-bottom-color:#43a2a5; }
#beam-context-close { border:0; background:none; font-size:25px; color:#64748b; padding:5px 8px; cursor:pointer; }
.beam-context-content { padding:22px; overflow-y:auto; overscroll-behavior:contain; min-height:0; flex:1; }
.beam-property-selection-row { display:flex; align-items:center; gap:6px; }
#beam-property-clear { flex:0 0 36px; height:36px; padding:0; border:0; border-radius:6px; background:transparent; color:#64748b; font-size:23px; line-height:1; cursor:pointer; }
#beam-property-clear:hover { color:#334155; background:#f1f5f9; }
.beam-panel-heading { margin:0 0 20px; }
.beam-panel-heading h2 { font-size:19px; font-weight:700; color:#0f172a; margin:0 0 6px; }
.beam-panel-heading p, :is(.beam-context-panel,.beam-workspace-dialog) small { color:#64748b; font-size:11px; line-height:1.6; }
.beam-panel-subheading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:22px 0 10px; }
.beam-panel-subheading h3, .beam-assignment-heading h3 { font-size:13px; font-weight:700; margin:0; color:#334155; }
.beam-property-row { display:flex; justify-content:space-between; align-items:center; padding:10px 0; width:100%; background:none; border:0; border-bottom:1px solid #eef2f6; text-align:left; cursor:pointer; color:#334155; }
.beam-property-row strong, .beam-property-row small { display:block; }
.beam-property-row strong { font-size:12px; font-weight:600; }
.beam-loads-manager > .beam-panel-subheading { margin-top:0; }
.beam-switch { display:inline-flex; position:relative; cursor:pointer; margin:0; }
.beam-switch input { position:absolute; opacity:0; width:32px; height:20px; }
.beam-switch span { width:32px; height:20px; border-radius:20px; background:#cbd5e1; transition:background .15s; }
.beam-switch span::after { content:''; position:absolute; top:3px; left:3px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #0002; transition:transform .15s; }
.beam-switch input:checked + span { background:#3d999c; }
.beam-switch input:checked + span::after { transform:translateX(12px); }
.beam-switch input:focus-visible + span { outline:2px solid #276e70; outline-offset:3px; }
.beam-segmented { display:flex; border-bottom:1px solid #e2e8f0; gap:18px; margin:16px 0; }
.beam-segmented button { flex:1; border:0; border-bottom:2px solid transparent; padding:9px 0; background:none; color:#64748b; font-size:12px; font-weight:600; cursor:pointer; }
.beam-segmented button[aria-pressed=true] { border-bottom-color:#4a999a; color:#277a7c; }
.beam-case-card { border-bottom:1px solid #eef2f6; }
.beam-case-card summary { display:flex; align-items:center; gap:10px; list-style:none; cursor:pointer; padding:12px 0; }
.beam-case-card summary::-webkit-details-marker { display:none; }
.beam-case-card strong { flex:1; min-width:0; overflow-wrap:anywhere; font-size:12px; font-weight:600; }
.beam-case-code { font-size:10px; letter-spacing:.03em; font-weight:700; color:#377e80; background:#edf6f5; border-radius:4px; padding:3px 5px; min-width:28px; text-align:center; }
.beam-case-card small { white-space:nowrap; }
:is(.beam-context-panel,.beam-workspace-dialog) input:not([type=checkbox]), :is(.beam-context-panel,.beam-workspace-dialog) select, :is(.beam-context-panel,.beam-workspace-dialog) textarea { font-size:12px; width:100%; min-width:0; box-sizing:border-box; padding:8px 10px; border:1px solid #cbd5e1; border-radius:6px; background:#fff; color:#1e293b; height:auto; line-height:1.5; }
:is(.beam-context-panel,.beam-workspace-dialog) input:focus, :is(.beam-context-panel,.beam-workspace-dialog) select:focus, :is(.beam-context-panel,.beam-workspace-dialog) textarea:focus { outline:2px solid #4a999a55; outline-offset:1px; border-color:#4a999a; }
:is(.beam-context-panel,.beam-workspace-dialog) label { font-size:11px; color:#64748b; font-weight:500; display:grid; gap:5px; }
:is(.beam-context-panel,.beam-workspace-dialog) form { display:grid; gap:12px; margin:12px 0; }
:is(.beam-context-panel,.beam-workspace-dialog) .btn { font-size:12px; min-height:34px; padding:7px 12px; width:auto; border-radius:6px; }
.beam-form-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.beam-add-case summary { font-size:12px; color:#377e80; padding:12px 0; cursor:pointer; list-style:none; }
.beam-assignment-heading { display:flex; align-items:center; gap:12px; justify-content:space-between; border-top:1px solid #e2e8f0; padding-top:20px; margin:12px 0; }
.beam-assignment-heading select { width:140px; font-size:11px; padding:6px 8px; }
.beam-bulk-bar { display:flex; gap:8px; align-items:center; padding:8px; background:#f8fafc; border-radius:6px; margin-bottom:6px; }
.beam-bulk-bar label { display:flex; align-items:center; white-space:nowrap; margin:0; }
.beam-bulk-bar select { flex:1; width:80px; padding:5px; font-size:11px; }
.beam-bulk-bar .beam-text-button { padding:5px; font-size:11px; }
:is(.beam-context-panel,.beam-workspace-dialog) input[type=checkbox] { accent-color:#438f92; width:15px; height:15px; margin:0; flex-shrink:0; }
.beam-load-assignment-row { display:grid; grid-template-columns:15px minmax(0,1fr) 140px; gap:10px; align-items:center; min-height:52px; padding:8px 0; border-bottom:1px solid #eef2f6; }
.beam-load-assignment-row > div { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 8px; min-width:0; }
.beam-load-assignment-row strong { font-size:12px; font-weight:600; overflow-wrap:anywhere; }
.beam-load-assignment-row small { overflow-wrap:anywhere; }
.beam-load-assignment-row select { margin:0; padding:7px 8px; width:100%; min-width:0; min-height:36px; font-size:12px; text-overflow:ellipsis; }
@media(max-width:767px) {
    .beam-load-assignment-row { grid-template-columns:15px minmax(0,1fr) minmax(124px,36%); gap:8px; }
    .beam-load-assignment-row select { min-height:40px; font-size:16px; }
}
.beam-combination-card, .beam-checkpoint { display:flex; align-items:center; gap:6px; padding:14px 0; border-bottom:1px solid #eef2f6; }
.beam-combination-card > div, .beam-checkpoint > div { flex:1; min-width:0; }
.beam-combination-card strong, .beam-checkpoint strong { display:block; overflow-wrap:anywhere; font-weight:600; font-size:12px; }
.beam-combination-card small, .beam-checkpoint small { display:block; margin-top:4px; overflow-wrap:anywhere; }
.beam-icon-button { border:0; background:none; color:#64748b; padding:8px; cursor:pointer; border-radius:4px; }
.beam-icon-button:hover { background:#f1f5f9; }
.beam-combination-form { border-top:1px solid #e2e8f0; padding-top:16px; }
#beam-combination-factors { display:grid; gap:8px; }
:is(.beam-context-panel,.beam-workspace-dialog) .beam-factor-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.beam-factor-row input { width:80px !important; text-align:right; }
.beam-activity { display:flex; gap:12px; padding:12px 0; border-bottom:1px solid #f1f5f9; }
.beam-activity > span { color:#4a999a; width:12px; flex-shrink:0; }
.beam-activity strong { display:block; font-size:12px; font-weight:500; line-height:1.5; overflow-wrap:anywhere; }
.beam-activity small { display:block; margin-top:3px; }
#beam-panel-assistant { padding:0; }
#beam-panel-assistant:not([hidden]) { display:flex; flex-direction:column; overflow:hidden; }
#beam-panel-assistant #ai-beam-panel { display:flex; flex-direction:column; flex:1; min-height:0; margin:0; border:0; box-shadow:none; background:none; }
#beam-panel-assistant .beam-ai-header { flex-shrink:0; padding:11px 14px; border-bottom:1px solid #e2e8f0; }
.beam-ai-header p { margin:0 0 3px; color:#64748b; font-size:10px; font-weight:650; letter-spacing:.1em; text-transform:uppercase; }
#beam-panel-assistant h2 { margin:0; font-size:16px; line-height:1.4; font-weight:650; color:#334155; }
#beam-panel-assistant .beam-ai-body { display:flex; flex-direction:column; flex:1; min-height:0; padding:0; }
#beam-panel-assistant .beam-ai-message { margin:8px 0 0; font-size:12px; }
/* Routine updates are already shown in the conversation; announce them without a duplicate footer. */
#beam-panel-assistant .beam-ai-message:not(.beam-error) { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#beam-panel-assistant .beam-ai-message.beam-error { max-height:80px; overflow-y:auto; }
#beam-panel-assistant .beam-ai-proposal { margin-top:12px; }
.beam-ai-messages { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:12px; background:#fbfcfd; }
.beam-ai-welcome, .beam-ai-entry { min-width:0; padding:11px 12px; margin:0 0 10px; border:1px solid #dee6eb; border-radius:11px; background:#fff; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.beam-ai-welcome { color:#475569; }
.beam-ai-entry:last-child { margin-bottom:0; }
.beam-ai-entry.is-user { margin-left:20px; border-color:#c9e6e2; background:#eff9f8; }
.beam-ai-entry.is-error { color:#b42318; }
.beam-ai-entry__label { display:block; font-size:11px; color:#64748b; margin-bottom:4px; }
.beam-ai-entry .ob-ai-user { margin:0; }
.beam-ai-entry__status { color:#277a7c; font-size:12px; margin:10px 0 0; }
.beam-ai-previous-changes { font-size:12px; margin-top:10px; }
.beam-ai-previous-changes summary { cursor:pointer; color:#64748b; }
.beam-ai-previous-changes ul { list-style:disc; padding-left:18px; }
#beam-panel-assistant .beam-ai-composer { display:block; flex-shrink:0; padding:10px 12px 12px; margin:0; border-top:1px solid #e2e8f0; background:#fff; }
#beam-panel-assistant #beam-ai-input { display:block; width:100%; min-height:68px; max-height:140px; padding:9px 10px; margin:0; border-radius:10px; resize:vertical; font-size:14px; font-weight:400; line-height:1.5; }
.beam-ai-composer__footer { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:7px; }
.beam-ai-composer__footer small { min-width:0; }
#beam-panel-assistant #beam-ai-generate { flex-shrink:0; width:auto; min-width:62px; min-height:34px; margin:0; padding:7px 12px; font-size:12px; line-height:18px; }
.beam-ai-send-icon, .beam-ai-busy-icon { display:none; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#beam-context-backdrop { display:none; }
/* Optional metadata is a quiet, single-line part of the existing form. */
.beam-editor-fields { display:flex; flex-wrap:wrap; gap:10px 18px; margin-top:18px; text-align:left; }
.beam-editor-fields .beam-name-field { flex:1; display:flex; align-items:center; gap:12px; font-size:12px; font-weight:400; color:#64748b; margin:0; min-width:0; }
.beam-name-field > span { white-space:nowrap; }
.beam-name-field small { font-size:11px; color:#94a3b8; }
.beam-calculator-page .beam-name-field input.form-control { flex:1; width:100%; min-width:0; height:34px; min-height:34px; padding:6px 9px; font-size:12px; font-weight:400; border-color:#e2e8f0; }
.beam-editor-fields .beam-case-field { display:flex; align-items:center; gap:8px; font-size:12px; color:#64748b; font-weight:400; margin:0; }
.beam-calculator-page .beam-case-field select { width:auto; max-width:210px; height:34px; min-height:34px; padding:4px 24px 4px 8px; border:1px solid #e2e8f0; border-radius:6px; font-size:12px; background:#fff; color:#334155; }
.beam-properties-trigger { min-width:36px; }
#beam-ask-optimal { white-space:nowrap; border-color:#c8e7e6; color:#176a6c; background:linear-gradient(135deg,#f3fbfa,#e6f7f6); }
#beam-ask-optimal:hover { box-shadow:0 1px 3px rgba(15,23,42,.1); }
.beam-optimal-ai-icon { width:15px; height:15px; flex-shrink:0; color:#23898b; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; }
.beam-optimal-ai-icon--heading { width:18px; height:18px; }
.beam-loads-entry { margin-top:14px; flex-wrap:wrap; gap:5px; padding-top:12px; }
#beam-selected-properties h3 { margin:24px 0 4px; font-size:16px; font-weight:600; overflow-wrap:anywhere; }
#beam-selected-properties dl { margin:16px 0; }
#beam-selected-properties dl > div { display:flex; justify-content:space-between; gap:20px; padding:10px 0; border-bottom:1px solid #eef2f6; }
#beam-selected-properties dt { font-size:12px; color:#64748b; font-weight:400; }
#beam-selected-properties dd { font-size:12px; margin:0; text-align:right; overflow-wrap:anywhere; }
.beam-property-empty { color:#64748b; text-align:center; padding:40px 0; }
.beam-workspace-dialog { padding:0; width:460px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 40px); margin:auto; border:1px solid #dce4ea; border-radius:12px; box-shadow:0 20px 70px #0f172a30; background:#fff; color:#334155; font-size:13px; overflow:auto; }
.beam-workspace-dialog::backdrop { background:#0f172a66; }
.beam-loads-dialog { width:600px; }
.beam-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; border-bottom:1px solid #e2e8f0; position:sticky; top:0; background:#fff; z-index:1; }
.beam-dialog-header h2 { font-size:18px; font-weight:650; margin:0; }
.beam-dialog-header .beam-icon-button { font-size:24px; line-height:1; }
.beam-dialog-body, .beam-workspace-dialog form.beam-dialog-body { padding:22px; margin:0; }
#beam-signin-dialog .beam-dialog-body > p { margin:0 0 14px; }
#beam-signin-dialog .beam-error:empty { display:none; }
.beam-dialog-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; padding-top:12px; }
.beam-workspace-dialog button:focus-visible { outline:2px solid #439a9c; outline-offset:2px; }
.beam-workspace-dialog .beam-muted { margin:0 0 12px; }
.beam-activity-filters { gap:12px; }
@media(max-width:767px) {
    .beam-context-panel { top:72px; right:0; bottom:0; width:100%; max-width:100%; border-radius:12px 12px 0 0; }
    #beam-context-backdrop { display:block; position:fixed; inset:0; background:#0f172a35; z-index:59; }
    .beam-context-content { padding:18px; }
    .beam-context-top [role=tab] { padding:15px 10px; }
    .beam-run-group { flex:1; }
    .beam-run-group #beam-scenario-bar { flex:1; }
    .beam-calculator-page .beam-run-group select { width:100%; font-size:16px; }
    .beam-editor-fields { gap:8px 12px; }
    .beam-editor-fields .beam-name-field, .beam-editor-fields .beam-case-field { flex-basis:100%; }
    .beam-editor-fields .beam-name-field > span, .beam-editor-fields .beam-case-field > span { width:98px; flex-shrink:0; }
    .beam-calculator-page .beam-editor-fields .beam-case-field select { flex:1; width:100%; max-width:none; min-width:0; }
    .beam-loads-entry { align-items:flex-start; }
    .beam-loads-entry > span:last-child { text-align:right; }
}
@media(max-height:540px) {
    .beam-context-panel { top:8px; bottom:8px; }
    #beam-panel-assistant .beam-ai-header { padding:7px 14px; }
    .beam-ai-header p { display:none; }
}
@media (max-width:767px), (hover:none) and (pointer:coarse) {
    /* Keep every editable field at the iPhone focus-zoom threshold, including
       dynamically created names, case forms, checkpoints and AI questions. */
    .beam-calculator-page :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]), select, textarea) { font-size:16px !important; }
    .beam-calculator-page .beam-name-field input.form-control { height:auto; min-height:40px; }
    .beam-context-panel { --beam-panel-inset:72px; top:calc(var(--beam-viewport-top, 0px) + var(--beam-panel-inset)); bottom:auto; height:calc(var(--beam-viewport-height, 100dvh) - var(--beam-panel-inset)); right:0; width:100%; max-width:100%; border-radius:12px 12px 0 0; }
    .beam-context-panel.is-keyboard-open { --beam-panel-inset:8px; }
    #beam-panel-assistant .beam-ai-header { display:none; }
    #beam-panel-assistant .beam-ai-composer { padding:8px 10px max(8px, env(safe-area-inset-bottom)); }
    #beam-panel-assistant .beam-ai-composer__entry { display:flex; align-items:flex-end; gap:6px; padding:4px; border:1px solid #cbd5e1; border-radius:14px; background:#fff; }
    #beam-panel-assistant .beam-ai-composer__entry:focus-within { border-color:#439a9c; box-shadow:0 0 0 2px #439a9c20; }
    #beam-panel-assistant #beam-ai-input { flex:1; min-width:0; min-height:44px; max-height:116px; padding:10px 8px; border:0; border-radius:10px; resize:none; overflow-y:auto; line-height:24px; outline:none; box-shadow:none; }
    #beam-panel-assistant .beam-ai-composer__footer { flex:0 0 auto; margin:0; }
    #beam-panel-assistant .beam-ai-composer__footer small { display:none; }
    #beam-panel-assistant #beam-ai-generate { display:flex; align-items:center; justify-content:center; min-width:44px; width:44px; height:44px; min-height:44px; padding:0; border-radius:10px; }
    #beam-panel-assistant .beam-ai-generate__label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
    #beam-panel-assistant .beam-ai-send-icon { display:block; }
    #beam-panel-assistant #beam-ai-generate[aria-busy=true] .beam-ai-send-icon { display:none; }
    #beam-panel-assistant #beam-ai-generate[aria-busy=true] .beam-ai-busy-icon { display:block; stroke-dasharray:36 15; animation:beam-ai-spin 1s linear infinite; }
}
@media (max-width:767px) and (max-height:540px), (hover:none) and (pointer:coarse) and (max-height:540px) {
    .beam-context-panel { --beam-panel-inset:8px; }
}
@keyframes beam-ai-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { #beam-panel-assistant #beam-ai-generate[aria-busy=true] .beam-ai-busy-icon { animation:none; } }
@media(prefers-reduced-motion:reduce) { .beam-switch span, .beam-switch span::after { transition:none; } }
@media(min-width:768px) {
    .beam-calculator-page :is(#add-pinned-modal,#add-roller-modal,#add-fixed-modal,#add-spring-modal,#add-point-modal,#add-distributed-modal,#add-moment-modal) .modal-dialog { width:560px; max-width:calc(100vw - 40px); }
}

/* Keep case actions available beside their compact editors. */
.beam-case-row { display:flex; align-items:flex-start; gap:6px; border-bottom:1px solid #eef2f6; }
.beam-case-row .beam-case-card { flex:1; min-width:0; border:0; }
.beam-case-row .beam-case-remove { flex-shrink:0; min-height:44px; }
/* AI previews are isolated from the actual diagram and all report rendering. */
.beam-design { position:relative; }
.beam-design > [hidden], #beam-ai-canvas-preview [hidden] { display:none !important; }
#beam-canvas-selection { position:absolute; border:2px solid #0e7490; background:#0891b214; border-radius:5px; pointer-events:none; box-sizing:border-box; }
#beam-ai-canvas-preview { border:1px solid #a5d4d6; border-radius:8px; overflow:hidden; background:white; }
.beam-ai-canvas-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; padding:10px 12px; background:#f0fafa; color:#155e75; font-size:12px; }
.beam-ai-canvas-switch { display:flex; gap:4px; }
.beam-ai-canvas-switch button { border:1px solid #a5d4d6; padding:5px 9px; border-radius:5px; color:#155e75; background:white; font-size:12px; }
.beam-ai-canvas-switch button[aria-pressed=true] { background:#155e75; color:white; }
.beam-ai-canvas-legend { display:flex; flex-wrap:wrap; gap:6px 18px; padding:8px 12px; font-size:11px; color:#0e7490; }
.beam-ai-canvas-legend span:last-child { color:#be123c; }
.beam-ai-canvas-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; padding:10px 12px; border-top:1px solid #d8e8eb; }
.beam-ai-selection { display:flex; flex-shrink:0; align-items:center; justify-content:space-between; gap:8px; min-height:34px; padding:7px 14px; border-bottom:1px solid #e2e8f0; font-size:11px; color:#64748b; overflow-wrap:anywhere; }
.beam-ai-selection strong { color:#155e75; font-weight:500; }
.beam-ai-selection button { border:0; background:none; color:#0e7490; padding:4px; font-size:11px; }
.beam-ai-entry__context { display:block; margin-top:6px; overflow-wrap:anywhere; }

/* Summaries are compact; original numeric values remain in the legacy model cells. */
.beam-calculator-page .beam-numeric-summary { font-size:0 !important; }
.beam-numeric-summary::before { content:attr(data-display); content:attr(data-display) / ""; font-size:13px; }
.beam-calculator-page .ob-mobile-prop-chip.beam-numeric-summary::before { font-size:11px; }
.beam-scope { margin:0; font-size:12px; color:#475569; line-height:1.6; }
.beam-scope .beam-text-button { padding:4px 6px; }
#beam-model-scope { margin:0; }
.beam-analysis-summary { display:flex; flex-wrap:wrap; align-items:center; gap:4px 16px; min-width:0; overflow-wrap:anywhere; }
.beam-analysis-summary[hidden] { display:none; }
#beam-run-scope-home { grid-column:1 / -1; }
#beam-results-summary { margin-bottom:10px; }
#beam-run-home { display:flex; min-width:0; }
#beam-mobile-run { position:fixed; bottom:0; left:0; right:0; z-index:45; padding:10px 16px max(10px,env(safe-area-inset-bottom)); background:#fff; border-top:1px solid #dce4ea; box-shadow:0 -3px 12px #0f172a0a; }
#beam-mobile-run .beam-run-group { width:100%; justify-content:flex-end; }
#beam-mobile-run #beam-scenario-bar { flex:1; }
#beam-mobile-run #run-model { flex:0 0 auto; min-width:90px; }
#beam-property-form { margin-top:18px; }
.beam-ai-access { flex-shrink:0; border-bottom:1px solid #e2e8f0; padding:10px 14px; color:#475569; font-size:12px; line-height:1.6; }
.beam-ai-access p { margin:0; }
.beam-ai-access .beam-text-button { padding-left:0; }
@media(max-width:767px) {
    #main-interface:has(#beam-mobile-run:not([hidden])) { padding-bottom:80px; }
    #beam-run-home { flex:1; min-height:40px; }
    .beam-calculator-page #beam-property-form input { font-size:16px; }
}
@media(max-width:639px) {
    .beam-load-assignment-row { grid-template-columns:15px minmax(0,1fr) minmax(128px,34%); gap:6px; }
}

@media(max-width:767px) {
    body:has(#beam-mobile-run:not([hidden])) .site-back-to-top { bottom:80px; }
}
/* Workspace entitlement is checked on submission; the draft and access CTA stay usable. */
.beam-calculator-page #beam-panel-assistant #ai-beam-panel.ai-beam-locked .panel-body { opacity:1; cursor:auto; }
.beam-calculator-page #beam-panel-assistant #ai-beam-panel.ai-beam-locked .panel-body :is(textarea,button) { pointer-events:auto; }
/* Size the ribbon against the model panel, allowing the title to yield before controls wrap. */
.beam-calculator-page .ob-beam-stage { container:beam-toolbar / inline-size; }
.beam-calculator-page #o-beam-updates.ob-beam-stage-toolbar__status { display:block; grid-column:1 / -1; grid-row:2; order:3; position:static; width:100%; height:auto; margin:0; padding:0; text-align:left; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.beam-calculator-page #o-beam-updates:empty { display:none; }
@media(min-width:640px) {
    .beam-calculator-page .ob-beam-stage-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px 12px; }
    .beam-calculator-page .ob-beam-stage-toolbar__meta { grid-column:1; grid-row:1; display:flex; flex-wrap:nowrap; align-items:center; gap:6px; min-width:0; }
    .beam-calculator-page .ob-beam-stage-toolbar__file-chip { flex:1 1 120px; min-width:0; gap:6px; }
    .beam-calculator-page .ob-beam-stage-toolbar__meta .model-name-label { flex:1; min-width:0; max-width:100%; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-model-name { flex:1; min-width:0; padding-left:2px; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-model-name-input { width:100%; }
    .beam-calculator-page .ob-beam-stage-toolbar__meta > :not(.ob-beam-stage-toolbar__file-chip) { flex:0 0 auto; }
    .beam-calculator-page .ob-beam-stage-toolbar__actions { grid-column:2; grid-row:1; display:flex; flex-wrap:nowrap; align-self:center; align-items:center; justify-content:flex-end; gap:6px; }
    .beam-calculator-page .ob-beam-stage-toolbar .btn { height:40px; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-history-buttons { gap:0; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-run-group { flex:0 0 auto; gap:6px; }
    .beam-calculator-page .ob-beam-stage-toolbar #beam-run-home { flex:0 0 auto; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-run-group select { width:164px; height:40px; }
    @container beam-toolbar (max-width:1000px) {
        .beam-calculator-page .ob-beam-stage-toolbar__pdf-label { font-size:0; line-height:0; }
        .beam-calculator-page .ob-beam-stage-toolbar__pdf-label::after { content:'PDF'; font-size:14px; line-height:20px; }
        .beam-calculator-page .ob-beam-stage-toolbar .beam-run-group select { width:136px; }
    }
    @container beam-toolbar (max-width:780px) {
        .beam-calculator-page .ob-beam-stage-toolbar:has(#beam-scenario-bar:not([hidden])) { grid-template-columns:minmax(0,1fr); }
        .beam-calculator-page .ob-beam-stage-toolbar:has(#beam-scenario-bar:not([hidden])) .ob-beam-stage-toolbar__actions { grid-column:1; grid-row:2; }
        .beam-calculator-page .ob-beam-stage-toolbar:has(#beam-scenario-bar:not([hidden])) #o-beam-updates { grid-row:3; }
    }
    @container beam-toolbar (max-width:660px) {
        .beam-calculator-page .ob-beam-stage-toolbar { grid-template-columns:minmax(0,1fr); }
        .beam-calculator-page .ob-beam-stage-toolbar__actions { grid-column:1; grid-row:2; }
        .beam-calculator-page .ob-beam-stage-toolbar #o-beam-updates { grid-row:3; }
    }
}
@media(max-width:767px) {
    /* Mobile cells already use ::before for their field label. */
    .beam-calculator-page .ob-beam-tables-panel td.beam-numeric-summary::after { content:attr(data-display); content:attr(data-display) / ""; font-size:14px; color:#0f172a; }
}

/* Phone toolbar: history beside the title, tools above one analysis row. */
@media(max-width:639px) {
    .beam-calculator-page .ob-beam-stage-toolbar { position:relative; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px; gap:6px; }
    .beam-calculator-page .ob-beam-stage-toolbar__meta { display:contents; }
    .beam-calculator-page .ob-beam-stage-toolbar__file-chip { grid-column:1 / -1; grid-row:1; min-height:44px; padding-right:96px; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-model-name { flex:1; min-width:0; padding-left:0; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-model-name-input { width:100%; }
    .beam-calculator-page .ob-beam-stage-toolbar .model-options-menu { grid-column:1; grid-row:2; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-project-toggle { height:44px; }
    .beam-calculator-page #beam-ask-optimal { grid-column:2; grid-row:2; height:44px; }
    .beam-calculator-page .beam-properties-trigger { grid-column:3; grid-row:2; width:44px; min-height:44px; }
    .beam-calculator-page .ob-beam-stage-toolbar__actions { grid-column:1 / -1; grid-row:3; position:static; display:flex; flex-wrap:nowrap; gap:8px; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-history-buttons { position:absolute; top:8px; right:0; gap:0; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-history-buttons .btn { width:44px; height:44px; min-width:44px; padding:0; }
    .beam-calculator-page .ob-beam-stage-toolbar__actions #pdf-export-btn { flex:0 0 auto; order:0; width:auto; min-height:44px !important; height:44px; padding:8px 10px !important; }
    .beam-calculator-page .ob-beam-stage-toolbar #beam-run-home { flex:1 1 0; order:1; min-width:0; min-height:44px; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-run-group { flex:1; gap:8px; }
    .beam-calculator-page .ob-beam-stage-toolbar #beam-scenario-bar { flex:1; min-width:0; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-run-group select { width:100%; height:44px; }
    .beam-calculator-page .ob-beam-stage-toolbar #run-model { flex:1; width:auto; min-height:44px; }
    .beam-calculator-page .ob-beam-stage-toolbar .beam-run-group:has(#beam-scenario-bar:not([hidden])) #run-model { flex:0 0 auto; min-width:80px; }
    .beam-calculator-page #o-beam-updates.ob-beam-stage-toolbar__status { grid-row:4; }
}
@media(max-width:767px) {
    .beam-calculator-page [aria-label="Calculator workspace"] .ob-ribbon-tab { min-height:44px; }
    .beam-calculator-page #beam-mobile-run #run-model { min-height:44px !important; }
    .beam-calculator-page #beam-mobile-run select { height:44px; }
}
