/* LabSimplifier — LSX experiment engine styles (extends style.css) */
.lsx-canvas { width: 100%; height: auto; display: block; border-radius: 12px; background: #0b1020; border: 1px solid var(--line); touch-action: manipulation; }
.lsx-chart { background: var(--card); touch-action: none; }
.lsx-vern { background: var(--card-subtle); }
.lsx-setup-wrap svg { width: 100%; height: auto; background: var(--card-subtle); border: 1px solid var(--line); border-radius: 14px; padding: 6px; }
.lsx-setup text { fill: var(--mut); }
.lsx-simroot { display: flex; flex-direction: column; gap: 14px; }
.lsx-locked .lsx-ctl { opacity: .5; pointer-events: none; filter: grayscale(.4); position: relative; }
.lsx-locked .lsx-ctl::after { content: "🔒 Controls unlock after the last procedure step"; position: absolute; inset: auto 12px 8px auto; font-size: .72rem; font-weight: 700; color: var(--mut); }
.lsx-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.lsx-panel h3 { font-size: 1rem; margin-bottom: 8px; }
.lsx-cvcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.lsx-cvhead { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 14px; background: var(--card-subtle); border-bottom: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: var(--mut); }
.lsx-cvcard .lsx-canvas { border: 0; border-radius: 0; }
.lsx-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lsx-grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .lsx-grid2 { grid-template-columns: 1fr 1fr; } }
.lsx-sw { font: 800 2rem/1 var(--font-mono); letter-spacing: 1px; color: var(--acc); background: #0b1020; border-radius: 12px; padding: 10px 16px; min-width: 150px; text-align: center; border: 1px solid #1e293b; }
.lsx-small { font-size: .82rem; color: var(--mut); }
.lsx-ok { color: var(--ok); font-weight: 700; }
.lsx-bad { color: var(--err); font-weight: 700; }
.lsx-warn { color: #b45309; font-weight: 700; }
.lsx-help { background: var(--card-subtle); border-left: 4px solid var(--acc2); border-radius: 10px; padding: 12px 14px; font-size: .88rem; line-height: 1.6; margin: 10px 0; }
.lsx-help ol { padding-left: 20px; }
.lsx-stat { background: var(--card-subtle); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: center; }
.lsx-stat b { display: block; font-size: 1.05rem; color: var(--acc); font-family: var(--font-math); }
.lsx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.lsx-in { padding: 9px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; width: 120px; text-align: center; }
.lsx-in:focus { outline: none; border-color: var(--acc2); }
.lsx-chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.lsx-chipset .chip { min-height: 36px; }
.lsx-tag { font: 700 .72rem var(--font-sans); text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 99px; background: var(--acc2-subtle); color: var(--acc2); }
.lsx-tag.red { background: var(--acc-subtle); color: var(--acc); }
.lsx-tag.green { background: var(--ok-bg); color: var(--ok); }
.lsx-dial { width: 100%; }
.lsx-btnbig { min-height: 46px; font-size: 1rem; }
.lsx-calc { background: var(--card-subtle); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 12px; }
.lsx-calc h4 { font-size: .95rem; margin-bottom: 8px; }
.lsx-tbl-note { font-size: .78rem; color: var(--mut); margin-top: 6px; }
.obs-table td.lsx-hl { background: var(--acc-subtle); font-weight: 700; }
.obs-table td .lsx-in { width: 84px; padding: 6px; }
.lsx-sim-hint { font-size: .85rem; color: var(--mut); padding: 0 4px; }
.lsx-switch { display: inline-flex; background: var(--card-subtle); border-radius: 10px; padding: 3px; gap: 3px; }
.lsx-switch button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: .82rem; color: var(--mut); cursor: pointer; min-height: 36px; }
.lsx-switch button.on { background: var(--card); color: var(--acc2); box-shadow: var(--shadow-sm); }
.lsx-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lsx-knob { width: 100%; }
@media (max-width: 480px) { .lsx-sw { font-size: 1.5rem; min-width: 120px; } }

.lsx-canvas { image-rendering: auto; }

.sim-readings-box { position: sticky; bottom: 8px; z-index: 6; box-shadow: 0 -6px 18px rgba(0,0,0,.25); border: 1px solid var(--line); }

/* canvas size cap: never taller than the screen, centred */
.lsx-cvcard .lsx-canvas { width: auto; max-width: 100%; max-height: 62vh; margin: 0 auto; background: #070b14; }
.lsx-cvcard .lsx-chart, .lsx-cvcard .lsx-vern { max-height: none; width: 100%; max-width: 100%; }
.lsx-cvcard { background: #070b14; }
.lsx-cvcard .lsx-cvhead { background: var(--card-subtle); }
.lsx-cvcard.light { background: var(--card); }
.lsx-chipsbox { background: var(--card-subtle); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.lsx-stickybar { position: sticky; bottom: 8px; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.28); }
.sim-readings-box { position: static; box-shadow: none; }
.lsx-simroot { padding-bottom: 6px; }
.lsx-sw { background: #070b14; }
/* vibrant brand mark */
.brand-logo-icon { background: linear-gradient(135deg, #ff7a45 0%, #e5383b 48%, #9333ea 100%) !important; color: #fff !important; box-shadow: 0 6px 22px rgba(229,56,59,.55), inset 0 0 0 1px rgba(255,255,255,.4) !important; font-weight: 900 !important; text-shadow: 0 0 12px rgba(255,255,255,.85); }
.brand-name { font-weight: 900; letter-spacing: -.3px; }
.brand-name span { background: linear-gradient(90deg, #ff4d4f, #c026d3); -webkit-background-clip: text; background-clip: text; color: transparent !important; }

@keyframes lsxp { 0%,100% { box-shadow: 0 0 0 0 rgba(22,163,74,.7); } 50% { box-shadow: 0 0 0 10px rgba(22,163,74,0); } }
.lsx-pulse { animation: lsxp 1s infinite; border-color: var(--ok) !important; color: var(--ok) !important; font-weight: 800; }
.obs-table.lsx-grid { font-size: .84rem; }
.obs-table.lsx-grid th, .obs-table.lsx-grid td { padding: 6px 7px; }
.obs-table.lsx-grid td .lsx-small { font-size: .7rem; line-height: 1.3; white-space: nowrap; }

/* mobile polish */
@media (max-width: 560px) {
  .procedure-banner { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
  .procedure-banner > div:last-child { justify-content: flex-end; width: 100%; }
  .procedure-banner > div:last-child .btn-indigo { flex: 1; }
  .sim-top-nav { padding: 10px 12px; }
  .sim-title { font-size: .95rem; }
  .sim-workspace { padding: 10px; gap: 10px; }
  .lsx-panel { padding: 12px; }
  .lsx-stickybar { padding: 6px 10px; }
  .lsx-stickybar .btn { padding: 8px 12px; font-size: .85rem; }
  .lsx-calc, .lsx-help { padding: 10px 12px; }
  .lsx-stats { grid-template-columns: repeat(2, 1fr); }
}
.lsx-stickybar { flex-wrap: nowrap; }
.lsx-stickybar .readings-counter { flex: 1 1 auto; min-width: 0; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsx-stickybar .btn { flex: 0 0 auto; }
@media (max-width: 560px) { .lsx-hide-sm { display: none; } .lsx-stickybar .readings-counter { font-size: .78rem !important; } }

/* paywall + admin shared bits */
.ls-modal { position: fixed; inset: 0; z-index: 3000; background: rgba(2,6,23,.72); display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); }
.ls-modal-card { position: relative; width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.ls-x { position: absolute; top: 12px; right: 12px; background: var(--card-subtle); border: 1px solid var(--line); color: var(--ink); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; }
.ls-opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card-subtle); color: var(--ink); cursor: pointer; font: inherit; }
.ls-opt:hover:not(:disabled) { border-color: var(--acc); }
.ls-opt:disabled { opacity: .6; }
.ls-price { font-weight: 800; font-size: 1.15rem; color: var(--acc); white-space: nowrap; }
.ls-coupon { display: flex; gap: 8px; margin-top: 14px; }
.ls-bundle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(229,56,59,.16), rgba(147,51,234,.16)); border: 1px solid var(--line); }
.billing-badge { margin-left: 6px; }
