/* /design/concrete-beam/ only (loaded by templates/directory/design_beam.html). */
.bm-page { --pass: #1e7b45; --pass-bg: #eaf6ee; --fail: #b3261e; --fail-bg: #fdecea; --warn: #8a6100; --warn-bg: #fff6dc; }
.bm-main { min-width: 0; }
.bm-disclaimer { display: flex; gap: .75rem; align-items: flex-start; background: #fff6dc; border: 1px solid #f0d58a; border-radius: 12px; padding: .85rem 1rem; margin: 0 0 1.4rem; }
.bm-disclaimer .ico { width: 28px; height: 28px; flex: 0 0 28px; color: #8a6100; }
.bm-disclaimer p { margin: 0; font-size: .95rem; color: #4a3b10; }

.bm { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.bm fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.bm legend { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy); margin-bottom: .8rem; float: none; }
.bm-pills { list-style: none; padding: 0; margin: 0 0 1.1rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.bm-pills button { width: 100%; display: flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .3rem .5rem; font-size: .82rem; font-weight: 650; color: var(--muted); min-width: 0; }
.bm-pills button b { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: var(--line); color: var(--navy); font-size: .75rem; }
.bm-pills button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-pills button[aria-current] { border-color: var(--accent); color: var(--navy); }
.bm-pills button[aria-current] b { background: var(--accent); color: #fff; }
.bm-pills button.done b { background: var(--navy); color: #fff; }
@media (max-width: 420px) { .bm-pills button span { display: none; } .bm-pills button { justify-content: center; } }

.bm-field { display: grid; gap: .25rem; margin-bottom: .9rem; min-width: 0; }
.bm-field > label, .bm-label { font-size: .9rem; font-weight: 700; color: #2c3a46; }
.bm-field label em { font-style: normal; color: var(--muted); font-weight: 500; }
.bm-help { font-size: .84rem; color: var(--muted); margin: 0; }
.bm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.bm-field-wide { grid-column: 1 / -1; }
@media (max-width: 575.98px) { .bm-grid { grid-template-columns: minmax(0, 1fr); } }
.bm-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: .35rem; }
@media (max-width: 575.98px) { .bm-choices { grid-template-columns: minmax(0, 1fr); } }
.bm-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "r d" "r t"; gap: .2rem .6rem; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: .65rem .75rem; cursor: pointer; }
.bm-choice input { grid-area: r; margin-top: .3rem; accent-color: var(--accent); }
.bm-choice .bm-dia { grid-area: d; width: 100%; max-width: 150px; height: 30px; }
.bm-choice > span { grid-area: t; display: flex; flex-direction: column; min-width: 0; }
.bm-choice b { color: var(--navy); font-size: .95rem; }
.bm-choice small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.bm-choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(242, 107, 29, .18); }
.bm-dia path { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bm-dia path + path { stroke-width: 2; fill: #fff3ea; }
.bm-dia .bm-dia-d { stroke-dasharray: 3 4; fill: none; }
[dir="rtl"] .bm-dia { transform: scaleX(-1); }
.bm-more { margin: .2rem 0 .6rem; }
.bm-more summary { cursor: pointer; font-weight: 700; color: var(--blue); margin-bottom: .6rem; }
.bm-pts-help { margin-bottom: .6rem; }
.bm-pt { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: .55rem .75rem .2rem; margin-bottom: .6rem; }
.bm-pt-h { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 0 0 .3rem; font-weight: 750; color: var(--navy); }
.bm-pt-h .btn { padding: 0; }
.bm-pt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 .75rem; align-items: end; }
.bm-pt .bm-field { margin-bottom: .5rem; }
@media (max-width: 575.98px) { .bm-pt-grid { grid-template-columns: minmax(0, 1fr); } }
.bm-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: -.2rem 0 1rem; }
.bm-invalid { color: var(--fail); font-weight: 650; font-size: .9rem; margin: .2rem 0 .5rem; }
.bm-nav { display: flex; align-items: center; gap: .6rem; border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .3rem; }
.bm-nav #bm-next { margin-left: auto; }
[dir="rtl"] .bm-nav #bm-next { margin-left: 0; margin-right: auto; }
.bm-progress { font-size: .84rem; color: var(--muted); }
.bm .form-control.is-invalid { border-color: var(--fail); }

.bm-results { margin-top: 2rem; }
.bm-verdict { border-radius: var(--radius); padding: 1rem 1.15rem; border: 1px solid; margin-bottom: 1rem; }
.bm-verdict p { margin: 0 0 .4rem; }
.bm-verdict ul { margin: .4rem 0 0; padding-left: 1.2rem; font-size: .95rem; }
[dir="rtl"] .bm-verdict ul { padding-left: 0; padding-right: 1.2rem; }
.bm-verdict-h { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.bm-pass { background: var(--pass-bg); border-color: #b9e1c6; } .bm-pass .bm-verdict-h { color: var(--pass); }
.bm-review { background: var(--warn-bg); border-color: #f0d58a; } .bm-review .bm-verdict-h { color: var(--warn); }
.bm-fail { background: var(--fail-bg); border-color: #f3b8b2; } .bm-fail .bm-verdict-h { color: var(--fail); }
.bm-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1.2rem; }
.bm-keys .fact-v { font-size: 1.02rem; }
.bm-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.8rem; }
.bm-actions .btn { display: inline-flex; align-items: center; gap: .45rem; white-space: normal; text-align: start; }
.bm-actions .btn .ico { flex: 0 0 auto; }
.bm-actions .bm-help { flex: 1 1 100%; }
@media (max-width: 575.98px) { .bm-actions .btn { width: 100%; justify-content: center; } }
.bm-table td { vertical-align: top; }
.bm-table td:nth-child(2), .bm-table td:nth-child(3) { white-space: nowrap; }
.bm-badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.bm-badge-pass { background: var(--pass-bg); color: var(--pass); }
.bm-badge-fail { background: var(--fail-bg); color: var(--fail); }
.bm-badge-warn { background: var(--warn-bg); color: var(--warn); }
.bm-work-wrap { margin: 2rem 0; }
.bm-work-wrap > summary { cursor: pointer; list-style: none; }
.bm-work-wrap > summary::-webkit-details-marker { display: none; }
.bm-work-wrap > summary h2 { display: inline; }
.bm-work-wrap > summary::after { content: "+"; margin-left: .6rem; color: var(--accent-d); font-weight: 800; font-size: 1.4rem; }
.bm-work-wrap[open] > summary::after { content: "\2212"; }
.bm-w-h { font-size: 1.08rem; font-weight: 800; color: var(--navy); margin: 1.4rem 0 .6rem; display: flex; align-items: center; gap: .5rem; }
.bm-w-h span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--navy); color: #fff; font-size: .8rem; flex: 0 0 26px; }
.bm-eq { padding: .55rem 0; border-bottom: 1px dashed #e2e6ea; display: grid; gap: .2rem; min-width: 0; }
.bm-eq-l { font-size: .84rem; font-weight: 700; color: #3a4955; }
.bm-eq code { display: block; color: var(--ink); background: #f7f8f6; border-radius: 8px; padding: .45rem .6rem; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .82rem; white-space: normal; overflow-wrap: anywhere; text-align: left; unicode-bidi: isolate; }
.bm-eq code b { color: var(--navy); }
.bm-eq-n { font-size: .82rem; color: var(--muted); font-style: italic; }
.bm-attached { display: flex; gap: .45rem; align-items: flex-start; background: #eaf6ee; border: 1px solid #b9e1c6; color: #1e5b35; border-radius: 9px; padding: .5rem .7rem; font-size: .84rem; margin-bottom: .8rem; overflow-wrap: anywhere; }
.bm-attached .ico { flex: 0 0 auto; margin-top: .1rem; }
.bm-print-head { display: none; }

.bm-diagrams { margin: 0 0 1.6rem; }
.dg-fig { margin: 0 0 .9rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .5rem .6rem .2rem; break-inside: avoid; }
.dg-fig figcaption { font-weight: 750; color: var(--navy); font-size: .92rem; margin-bottom: .1rem; }
.dg { display: block; height: auto; overflow: visible; }
.dg text { font-family: inherit; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.dg-t { font-size: 12px; fill: #2c3a46; }
.dg-s { font-size: 11px; fill: var(--muted); }
.dg-sub { font-size: 9px; }
.dg-val { font-weight: 700; fill: var(--navy); }
.dg-pt { fill: var(--accent-d); font-weight: 700; }
.dg-beam { stroke: var(--navy); stroke-width: 5; stroke-linecap: round; }
.dg-cont { stroke-dasharray: 6 6; stroke-width: 4; }
.dg-sup { fill: #fff3ea; stroke: var(--navy); stroke-width: 2; }
.dg-ground, .dg-wall { stroke: var(--navy); stroke-width: 2; }
.dg-wall { stroke-width: 4; }
.dg-w { stroke: var(--blue); stroke-width: 1.5; }
.dg-w-h { fill: var(--blue); }
.dg-p { stroke: var(--accent-d); stroke-width: 2.5; }
.dg-p-h { fill: var(--accent-d); }
.dg-dim { stroke: var(--muted); stroke-width: 1; }
.dg-guide { stroke: #c9d1d8; stroke-width: 1; stroke-dasharray: 2 4; }
.dg-axis { stroke: var(--navy); stroke-width: 1.5; }
.dg-pos { fill: rgba(242, 107, 29, .16); }
.dg-neg { fill: rgba(31, 92, 153, .16); }
.dg-line { fill: none; stroke: var(--navy); stroke-width: 2; }
.dg-dash { stroke-dasharray: 6 4; stroke: var(--blue); }

@media print {
    .dg-fig { border-color: #999; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .site-nav, .site-footer, .bm-aside, #bm, .bm-disclaimer, .bm-no-print, .crumbs, .page-head, .faq, #faq, .related-block,
    #siteFeedbackWidget, [class*="feedback"], [id*="Feedback"], [id*="feedback"] { display: none !important; }
    .bm-results { display: block !important; margin: 0; }
    .bm-print-head { display: block; border-bottom: 2px solid #000; margin-bottom: .8rem; padding-bottom: .4rem; }
    .bm-print-head h2 { font-size: 18pt; margin: 0; }
    .bm-print-brand { font-weight: 800; margin: 0; }
    .bm-print-warn { border: 1px solid #000; padding: .4rem .6rem; font-size: 9.5pt; }
    .col-lg-8 { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; }
    body { font-size: 10pt; background: #fff; }
    .bm-work-wrap > summary::after { content: none; }
    .bm-eq { break-inside: avoid; }
    .bm-eq code { background: none; padding: 0; }
    .bm-verdict, .table-wrap { break-inside: avoid; }
    .ref-table th { background: #ddd !important; color: #000 !important; }
    .bm-keys { grid-template-columns: repeat(4, 1fr); }
    a[href]::after { content: none; }
}
