/* Vizualizator de corpuri — suprafață de lucru și selector lateral. */
body:has(.demo) { --fundal-alt: #f7f8f9; --demo-fundal: #ffffff; }
.demo { padding: 38px 0 56px; }
.demo > .cont:first-child { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; margin-bottom: 28px; }
.demo h1 { font-size: clamp(2rem, 3.2vw, 3.4rem); letter-spacing: -.045em; line-height: 1.1; }
.demo > .cont > .mare { font-size: .88rem; line-height: 1.6; color: var(--text-slab); max-width: 410px; margin: 0; justify-self: end; }
.meniu a[aria-current="page"] { color: var(--text); border-bottom: 1px solid var(--text); padding-bottom: 4px; }
.demo-in { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 0; border: 1px solid #cbd3d8; }
.demo-scena { position: relative; background: var(--demo-fundal); overflow: hidden; min-width: 0; }
.scena { height: min(65vh, 700px); min-height: 510px; touch-action: none; cursor: grab; }
.scena:active { cursor: grabbing; }
.scena canvas { display: block; width: 100%; height: 100%; }
.demo-stare { position: absolute; top: 24px; left: 24px; margin: 0; font: 11px/1.6 Consolas, monospace; letter-spacing: .04em; color: #4d6575; pointer-events: none; }
.demo-stare::before { content: ''; display: inline-block; width: 5px; height: 5px; background: #5e8299; margin: 0 10px 2px 0; }
.demo-ajutor { position: absolute; bottom: 0; left: 0; right: 0; margin: 0; padding: 16px 24px; border-top: 1px solid #cbd3d8; color: #566875; font-size: .65rem; line-height: 1.6; background: #ffffffed; pointer-events: none; }
.demo-panou { display: flex; flex-direction: column; background: #ffffff; color: #252b30; padding: 24px; border-left: 1px solid #e5e8ea; }
.demo-panou h2 { font-size: .7rem; letter-spacing: .02em; margin: 0 0 16px; color: #66727a; font-weight: 400; }
.demo-corpuri { display: grid; counter-reset: corp; margin-bottom: 24px; }
.demo-corp { counter-increment: corp; display: grid; grid-template-columns: 22px 1fr; gap: 3px 10px; text-align: left; width: 100%; border: 0; border-bottom: 1px solid #e5e8ea; padding: 13px 10px; background: transparent; color: #333b41; cursor: pointer; font: inherit; position: relative; transition: background .15s; }
.demo-corp::before { content: '0' counter(corp); grid-column: 1; grid-row: 1/3; font: 9px/1.7 Consolas, monospace; color: #849099; padding-top: 2px; }
.demo-corp b { grid-column: 2; font-weight: 500; font-size: .81rem; }
.demo-corp span { grid-column: 2; font-size: .66rem; color: #68767f; }
.demo-corp:hover { background: #f6f8fa; }
.demo-corp[aria-pressed="true"] { background: #f0f5f9; color: #1c4d70; border-bottom-color: #d9e5ef; box-shadow: inset 2px 0 #3577a6; }
.demo-corp[aria-pressed="true"] span, .demo-corp[aria-pressed="true"]::before { color: #537083; }
.demo-bifa { display: flex; align-items: center; gap: 10px; min-height: 38px; font-size: .75rem; cursor: pointer; color: #485660; }
.demo-bifa input { appearance: none; width: 16px; height: 16px; flex-shrink: 0; margin: 0; border: 1px solid #8d9da7; background: transparent; border-radius: 0; cursor: pointer; display: grid; place-content: center; }
.demo-bifa input:checked { background: #3577a6; border-color: #3577a6; }
.demo-bifa input:checked::before { content: ''; width: 8px; height: 4px; border-left: 2px solid #ffffff; border-bottom: 2px solid #ffffff; transform: translateY(-1px) rotate(-45deg); }
.demo-panou .buton { margin-top: 16px; padding: 10px 12px; font-size: .68rem; background: transparent; border-color: #c7d1d8; color: #344e60; justify-content: space-between; width: 100%; }
.demo-panou .buton::after { content: '↺'; font-size: 1.05rem; }
.demo-panou .buton:hover { background: #f0f5f9; }
.demo-panou .mic-text { color: #68767f; font-size: .65rem; line-height: 1.65; margin: auto 0 0; padding-top: 24px; }
@media (min-width: 1700px) { .scena { min-height: 580px; } }
@media (max-width: 1000px) {
 .demo-in { grid-template-columns: minmax(0, 1fr) 250px; }
 .demo-panou { padding: 20px; }
 .demo-stare { left: 18px; top: 18px; }
 .demo-ajutor { padding-inline: 18px; }
 .demo > .cont:first-child { gap: 28px; }
}
@media (max-width: 760px) {
 .demo { padding-top: 28px; }
 .demo > .cont:first-child { display: block; }
 .demo > .cont > .mare { margin-top: 16px; max-width: 480px; font-size: .82rem; }
 .demo-in { grid-template-columns: 1fr; }
 .scena { height: 54vh; min-height: 340px; max-height: 520px; }
 .demo-panou { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding: 22px; }
 .demo-panou h2 { grid-column: 1/-1; }
 .demo-corpuri { grid-column: 1/-1; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
 .demo-corp { padding: 12px 10px; min-height: 64px; }
 .demo-panou .buton { grid-column: 1/-1; justify-self: start; width: auto; min-width: 190px; }
 .demo-panou .mic-text { grid-column: 1/-1; max-width: 440px; padding-top: 18px; }
 .demo-ajutor { font-size: .6rem; padding: 12px 16px; }
}
@media (max-width: 380px) { .demo-panou { padding: 16px; column-gap: 12px; } .demo-corp { grid-template-columns: 18px 1fr; column-gap: 5px; } .demo-corp b { font-size: .72rem; } }
@media (prefers-reduced-motion: reduce) { .demo-corp { transition: none; } }
/* Titlul demo nu folosește poziționarea titlului din pagina principală. */
.demo h1 { grid-column: auto; grid-row: auto; }
