/* Rama demo: zakładki, tabele źródłowe, lejek ETL, gwiazda, dashboard, pivot, okna */

.demo { width: min(1176px, calc(100% - 64px)); margin: 16px auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px 14px 0 0; border-bottom: 0; min-height: 80vh; overflow-x: clip; /* animacja kartki nie poszerza strony; clip nie psuje sticky */ }
@media (max-width: 760px) { .demo { width: calc(100% - 16px); margin: 12px auto 0; } }
.tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: var(--hh, 58px); z-index: 20; background: var(--panel); border-radius: 14px 14px 0 0; transition: top .25s; }
.tabs button { flex: 1; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 14px 10px; font-size: 15px; cursor: pointer; display: flex; gap: 10px; align-items: center; justify-content: center; font-family: inherit; }
.tabs button b { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: var(--panel2); border: 1px solid var(--line); font-size: 13px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs button.on b { background: var(--accent); color: #000; border-color: var(--accent); }
.tabs button:hover { color: var(--ink); }
@media (max-width: 600px) { .tabs button .long { display: none; } .tabs button { font-size: 13px; padding: 10px 4px; } }
.page { display: none; padding: 20px 24px 40px; }
.page.on { display: block; animation: flipIn .6s cubic-bezier(.3, .7, .3, 1); }
@keyframes flipIn { from { opacity: 0; transform: perspective(1800px) rotateY(-28deg) translateX(-30px); transform-origin: left center; } }
@media (max-width: 760px) { .page { padding: 14px 12px 30px; } }
.page h2 { margin: 0 0 4px; font-size: 20px; }
.page .sub { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

/* okno-kafelek (zakładki 1 i 2) */
.win { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel2); }
.win .bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bar); cursor: pointer; }
.win .bar .dots { display: flex; gap: 4px; }
.win .bar .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .6; }
.win .bar b { font-family: inherit; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win .bar .i { margin-left: auto; font-size: 11px; color: var(--a2); white-space: nowrap; }
.win .bar:hover { filter: brightness(1.2); }

/* zakładka 1 */
.grp { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.thumbs { display: grid; gap: 12px; grid-template-columns: repeat(6, 1fr); }
.thumbs.dict { grid-template-columns: repeat(9, 1fr); gap: 10px; }
@media (max-width: 1300px) { .thumbs { grid-template-columns: repeat(5, 1fr); } .thumbs.dict { grid-template-columns: repeat(7, 1fr); } }
@media (max-width: 1140px) { .thumbs { grid-template-columns: repeat(4, 1fr); } .thumbs.dict { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 960px) { .thumbs { grid-template-columns: repeat(3, 1fr); } .thumbs.dict { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .thumbs { grid-template-columns: repeat(2, 1fr); } .thumbs.dict { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .thumbs { grid-template-columns: 1fr; } .thumbs.dict { grid-template-columns: repeat(2, 1fr); } }
.meta { font-size: 11px; color: var(--muted); padding: 5px 10px; border-bottom: 1px solid var(--line); }
.shot { position: relative; cursor: pointer; background: #0b0f18; overflow: hidden; }
body.light .shot { background: #f7f8fb; }
.shot pre { margin: 0; font-family: inherit; padding: 6px 8px; font-size: 9px; line-height: 1.35; color: #7fa6d6; white-space: pre; }
body.light .shot pre { color: #4a6a96; }
.shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--panel2)); }
.shot .show { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; background: var(--accent); color: #000; font-size: 12px; font-weight: 600; padding: 4px 16px; border-radius: 14px; }
.shot:hover .show { box-shadow: 0 0 0 3px rgba(242, 200, 17, .35); }
.tx .shot { height: 220px; }
.dict .shot { height: 96px; }
.dict .shot pre { font-size: 8px; }
.dict .win .bar b { font-size: 12.5px; }
.dict .shot .show { font-size: 11px; padding: 2px 12px; bottom: 6px; }

/* zakładka 2: lejek */
.etl { position: relative; display: grid; grid-template-columns: 22% 26% 52%; }
.funnel { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 0; }
.funnel.h { height: 100%; }
.funnel.v { display: none; height: 470px; }
.etl > .src, .etl > .mid, .etl > .star { position: relative; z-index: 1; }
.stream { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 10; opacity: .75; animation: dash 2.4s linear infinite; }
.stream.d17 { animation-duration: 1.7s; }
.stream.d30 { animation-duration: 3s; }
@keyframes dash { to { stroke-dashoffset: -32; } }
.src { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 12% 8px 0; }
.src div { font-family: inherit; font-size: 10.5px; background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 3px 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src div:hover { border-color: var(--accent); }
.mid { display: flex; align-items: center; justify-content: center; }
.gear { width: clamp(150px, 17vw, 250px); aspect-ratio: 1; animation: spin 9s linear infinite; filter: drop-shadow(0 0 14px rgba(242, 200, 17, .4)); }
@keyframes spin { to { transform: rotate(360deg); } }
.star { position: relative; aspect-ratio: 10 / 11; container-type: inline-size; }
.star svg.links { position: absolute; inset: 0; width: 100%; height: 100%; }
.tb { position: absolute; transform: translate(-50%, -50%); width: 22%; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--dim); color: var(--dimInk); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); transition: box-shadow .15s; }
.tb .bar { background: var(--dimBar); padding: 5px 8px; font-weight: 700; font-size: 13.5px; display: flex; gap: 6px; align-items: center; }
.tb .bar::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; opacity: .5; flex: none; }
.tb .d { padding: 5px 8px 6px; font-size: 11px; line-height: 1.3; opacity: .9; }
.tb.fact { width: 24%; background: var(--fact); color: var(--factInk); }
.tb.fact .bar { background: var(--factBar); font-size: 13.5px; }
/* trzy obszary faktów: jaśniejsze od wymiarów, każdy w swoim odcieniu */
.tb.fact.stock { background: #a8e6cf; } .tb.fact.stock .bar { background: #c9f2df; }
.tb.fact.prod { background: #cfb8f5; } .tb.fact.prod .bar { background: #e2d4fa; }
.tb .bar { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb:hover { box-shadow: 0 0 0 3px var(--accent), 0 4px 14px rgba(0, 0, 0, .3); }
@container (max-width: 620px) { .tb .d { display: none; } .tb .bar, .tb.fact .bar { font-size: 10px; padding: 4px 5px; white-space: normal; overflow-wrap: anywhere; } }
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.steps div { flex: 1 1 170px; font-size: 12px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.steps b { color: var(--a3); margin-right: 6px; }
@media (max-width: 800px) {
  .etl { grid-template-columns: 1fr; grid-template-rows: 170px 200px auto; }
  .funnel.h { display: none; }
  .funnel.v { display: block; }
  .src { flex-direction: row; justify-content: space-around; padding: 0 4px 10px; gap: 2px; align-items: flex-end; }
  .src div { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 9.5px; padding: 6px 2px; max-height: 150px; }
  .gear { width: 160px; }
  .star { aspect-ratio: 10 / 12; }
}

/* zakładka 3 */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: var(--panel2); color: var(--ink); border: 0; padding: 7px 14px; cursor: pointer; font-size: 13px; font-family: inherit; }
.seg button.on { background: var(--accent); color: #000; font-weight: 600; }
select.combo { flex: 1 1 320px; min-width: 0; padding: 8px; border-radius: 8px; background: var(--panel2); color: var(--ink); border: 1px solid var(--line); font-family: inherit; }
.desc { font-size: 12px; color: var(--muted); background: var(--panel2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; }
.dash { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 118px; gap: 10px; }
@media (max-width: 900px) { .dash { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .dash { grid-template-columns: 1fr; } .dash .w2 { grid-column: auto; } }
.tile { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; position: relative; cursor: grab; overflow: hidden; }
.tile.dragging { opacity: .4; }
.tile.over { outline: 2px dashed var(--accent); }
.tile .t { font-size: 11px; color: var(--muted); padding-right: 44px; }
.tile .ctl { position: absolute; top: 6px; right: 8px; font-size: 12px; color: var(--muted); }
.tile .ctl span { cursor: pointer; margin-left: 6px; }
.tile .ctl span:hover { color: var(--accent); }
.kpi { font-size: 26px; font-weight: 700; margin-top: 4px; }
.delta { font-size: 12px; }
.up { color: var(--a3); }
.down { color: var(--a4); }
.w2 { grid-column: span 2; }
.h2 { grid-row: span 2; }
.add { border: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); cursor: default; gap: 6px; }
.add button { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 11px; cursor: pointer; margin: 2px; }

.pivot { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; }
.minw0 { min-width: 0; }
.fields { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12px; align-self: start; }
.fields summary { font-weight: 600; cursor: pointer; list-style: none; }
.fields summary::-webkit-details-marker { display: none; }
.fields summary small { color: var(--muted); font-weight: 400; }
.flist { margin-top: 6px; }
.f { padding: 4px 6px; margin: 3px 0; border-radius: 5px; background: var(--panel); border: 1px solid var(--line); cursor: grab; }
.f.m { border-left: 3px solid var(--accent); }
.f.d { border-left: 3px solid var(--a2); }
.zones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.zone { background: var(--panel2); border: 1px dashed var(--line); border-radius: 8px; padding: 6px 8px; font-size: 11px; min-height: 54px; color: var(--muted); }
.zone.over { border-color: var(--accent); background: rgba(242, 200, 17, .08); }
.chip { display: inline-block; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 2px 8px; margin: 2px; cursor: grab; }
.chip i { font-style: normal; margin-left: 6px; cursor: pointer; color: var(--muted); }
.pvwrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.pv-note { font-size: 11px; color: var(--muted); margin-top: 6px; }
/* tabela przestawna w oknie o stałej wysokości: pola, strefy i nagłówki stoją, przewija się tylko tabela */
@media (min-width: 1001px) {
  .pivot { height: max(420px, calc(100vh - var(--hh, 58px) - 44px - 28px)); }
  .pivot .fields { max-height: 100%; overflow: auto; }
  .pivot .minw0 { display: flex; flex-direction: column; height: 100%; }
  .pivot .zones, .pivot .pv-bar, .pivot .pv-note { flex: 0 0 auto; }
  .pivot .pvwrap { flex: 1 1 auto; min-height: 0; }
}
#pvTable thead th.rh { position: sticky; left: 0; z-index: 3; background: var(--panel2); }
@media (max-width: 1000px) {
  .pivot { grid-template-columns: minmax(0, 1fr); }
  .fields summary small::after { content: " ▾"; }
  .flist { display: flex; flex-wrap: wrap; gap: 4px; }
  .flist .f { margin: 0; }
  .zones { grid-template-columns: repeat(2, 1fr); }
  .pvwrap { max-height: 55vh; }
}
@media (max-width: 520px) { .zones { grid-template-columns: 1fr; } }
table.pv { width: 100%; border-collapse: collapse; font-size: 12px; }
.pvwrap table.pv { min-width: 720px; }
table.pv th, table.pv td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.pv th:first-child, table.pv td:first-child { text-align: left; }
table.pv thead th { background: var(--panel2); color: var(--muted); font-weight: 600; position: sticky; top: 0; }
table.pv tr.tot td { font-weight: 700; border-top: 2px solid var(--line); }
table.pv td.heat { background: rgba(242, 200, 17, .35); }

/* okna danych i struktury */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: none; align-items: center; justify-content: center; z-index: 50; padding: 10px; }
.modal.on { display: flex; }
.modal .box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; width: 1100px; max-width: 100%; }
.modal .box.narrow { width: 600px; }
.mh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mh b { font-family: inherit; font-size: 16px; }
.mh .sub2 { color: var(--muted); font-size: 12px; }
.mh .x { margin-left: auto; cursor: pointer; font-size: 20px; color: var(--muted); background: none; border: 0; }
.scroll { max-height: 62vh; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
.raw td, .raw th { font-family: inherit; font-size: 11px; text-align: left !important; }
.raw td.n { text-align: right !important; }
.raw td.null { color: var(--muted); font-style: italic; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.pager button { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; cursor: pointer; margin-left: 3px; }
.pager button.on { background: var(--accent); color: #000; }
.type { color: var(--a2); }
.pk { color: var(--accent); }

/* kroki ETL z dziennika ładowania, komunikaty */
.steps div small { display: block; margin-top: 3px; line-height: 1.35; }
.steps div .num { display: block; margin-top: 4px; color: var(--ink); font-family: inherit; font-size: 11px; }
.etl-run { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.demo-note { margin: 0; padding: 8px 16px; background: rgba(242, 200, 17, .15); color: var(--ink); font-size: 13px; border-radius: 14px 14px 0 0; }
.demo-loading, .demo-err { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin: 8px 0; }
.demo-err { color: var(--a4); }
.raw td.loading { color: var(--muted); padding: 16px; }

/* pivot na żywo (Plan 4) */
.zone { display: flex; flex-direction: column; }
.zone .zl { font-size: 11px; color: var(--muted); }
.zone .zbody { flex: 1; min-height: 30px; }
.chip .cl { cursor: pointer; }
.fgrp { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 8px 0 2px; }
.f.lv1 { margin-left: 8px; } .f.lv2 { margin-left: 16px; } .f.lv3 { margin-left: 24px; } .f.lv4 { margin-left: 32px; }
.sortable-ghost { opacity: .4; }
.pv-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 6px; font-size: 12px; color: var(--muted); }
.pv-status.err { color: var(--a4); }
.pv-day input { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; margin-left: 4px; }
#pvTable th { white-space: nowrap; }
#pvTable thead th { text-align: center; }
#pvTable thead th[data-sort] { cursor: pointer; }
#pvTable thead th[data-sort]:hover { color: var(--accent); }
#pvTable th.rl { text-align: left; font-weight: 400; position: sticky; left: 0; background: var(--panel); z-index: 1; }
#pvTable thead th.rh { position: sticky; left: 0; z-index: 3; text-align: left; }
#pvTable tr.d1 th.rl { padding-left: 22px; } #pvTable tr.d2 th.rl { padding-left: 36px; } #pvTable tr.d3 th.rl { padding-left: 50px; }
#pvTable tr.sub th, #pvTable tr.sub td { font-weight: 700; }
#pvTable tr.tot th, #pvTable tr.tot td { font-weight: 700; border-top: 2px solid var(--line); }
#pvTable td.ct { font-weight: 600; background: var(--panel2); }
#pvTable .drill { background: none; border: 1px solid var(--line); color: var(--accent); border-radius: 4px; width: 18px; height: 18px; line-height: 14px; padding: 0; margin-right: 6px; cursor: pointer; font-size: 12px; }
#pvTable td.h0 { background: rgba(242, 200, 17, .06); } #pvTable td.h1 { background: rgba(242, 200, 17, .14); }
#pvTable td.h2 { background: rgba(242, 200, 17, .24); } #pvTable td.h3 { background: rgba(242, 200, 17, .36); }
#pvTable td.h4 { background: rgba(242, 200, 17, .5); } #pvTable td.h5 { background: rgba(242, 200, 17, .66); }
.desc .lg { font-family: inherit; color: var(--ink); }
.fsearch { width: 100%; margin-top: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); }
.fbtns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.fbtns .on { background: var(--accent); color: #000; }
.flistv { padding: 6px 10px; }
.fv { display: block; padding: 3px 0; font-size: 13px; cursor: pointer; }
@media (max-width: 1000px) { .fgrp { width: 100%; } .f.lv1, .f.lv2, .f.lv3, .f.lv4 { margin-left: 0; } }

/* dashboardy na żywo (Plan 5) */
.dash-status { font-size: 12px; color: var(--muted); min-height: 1em; }
.dash .tile.r1 { grid-row: span 1; } .dash .tile.r2 { grid-row: span 2; } .dash .tile.r3 { grid-row: span 3; } .dash .tile.r4 { grid-row: span 4; }
.dash .tile { display: flex; flex-direction: column; cursor: default; }
.dash .tile .th { cursor: grab; margin-bottom: 4px; }
.dash .tile .tb-body { flex: 1; min-height: 0; position: relative; }
.dash .tl-gantt .tb-body { overflow-y: auto; }
.dash .tl-table .tb-body { overflow: auto; }
.dash .tile .kpi { font-size: 28px; margin-top: 6px; }
.dash .tile .delta span { color: var(--muted); }
.dash .delta.up { color: #0ca30c; } .dash .delta.down { color: #d03b3b; }
.dash .wojtag { color: var(--accent); }
.dash table.pv.mini { font-size: 11.5px; }
.dash table.pv.mini td, .dash table.pv.mini th { padding: 3px 6px; }
.dash .add { gap: 8px; text-align: center; }
.dash .add .addsel { max-width: 100%; flex: 0 1 auto; font-size: 12px; }
.wojbtn { margin-left: 6px; padding: 2px 8px; font-size: 12px; }
@media (max-width: 520px) { .dash .tile.r4 { grid-row: span 3; } }

/* demo na całe okno: zostaje menu, pod nim zakładki; przewija się tylko wnętrze demo */
.tabs .demo-full-btn { flex: 0 0 auto; color: var(--accent); border-bottom-color: transparent; padding: 10px 16px; }
body.demo-full { overflow: hidden; }
body.demo-full main > *:not(#demo) { display: none; }
body.demo-full #demo { width: auto; position: fixed; top: var(--hh, 58px); left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; border: 0; overflow: auto; overscroll-behavior: contain; z-index: 25; min-height: 0; }
body.demo-full .tabs { top: 0; border-radius: 0; }

/* ===== zakładka 3: opisy rozszerzone (demo-opisy.js) ===== */
#p2 { position: relative; }
.desc.has-opis { position: relative; cursor: pointer; border: 1px solid var(--accent); border-left-width: 4px; border-left-style: solid; padding: 10px 14px 10px 46px; transition: background .15s, border-color .15s, box-shadow .15s; }
.desc.has-opis::before { content: "👆"; position: absolute; left: 12px; top: 8px; font-size: 22px; line-height: 1; animation: opisHand 1.6s ease-in-out infinite; }
.desc.has-opis::after { content: "ℹ️ Kliknij, by dowiedzieć się więcej o tym widoku"; display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--ink); text-decoration: underline dotted var(--accent); text-underline-offset: 3px; }
.desc.has-opis:hover, .desc.has-opis:focus-visible { background: var(--panel); border-color: var(--a2); box-shadow: 0 0 0 3px rgba(58, 160, 255, .18); outline: none; }
@keyframes opisHand { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .desc.has-opis::before { animation: none; } }

.opis { position: absolute; left: 0; right: 0; z-index: 15; max-height: calc(100vh - var(--hh, 58px) - 60px); max-height: calc(100dvh - var(--hh, 58px) - 60px); overflow: auto; overscroll-behavior: auto;
  background: var(--panel); color: var(--ink); border: 2px solid var(--accent); border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); cursor: pointer; animation: opisIn .25s ease-out; }
.opis[hidden] { display: none; }
@keyframes opisIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .opis { animation: none; } }
.opis-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 12px 20px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.opis-tt { min-width: 0; }
.opis-kind { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.opis-head h3 { margin: 2px 0 0; font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.opis-x { flex: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 20px; cursor: pointer; }
.opis-x:hover, .opis-x:focus-visible { background: var(--accent); color: #000; border-color: var(--accent); outline: none; }
.opis-short { margin: 12px 20px 0; font-size: 13px; color: var(--muted); background: var(--panel2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; }
.opis-short .lg { color: var(--ink); }
.opis-body { padding: 8px 20px 18px; }
.opis-lead { font-size: 21px; line-height: 1.5; margin: 10px 0 6px; font-weight: 500; }
.opis-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 8px 28px; align-items: start; }
.opis-txt h4 { margin: 16px 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--a2); }
.opis-ul { margin: 0; padding-left: 22px; font-size: 18px; line-height: 1.55; }
.opis-ul li { margin: 4px 0; }
.opis-ul li::marker { color: var(--accent); }
.opis-ul.try { list-style: none; padding-left: 0; }
.opis-ul.try li { position: relative; padding: 8px 12px 8px 40px; margin: 6px 0; background: var(--panel2); border-radius: 8px; }
.opis-ul.try li::before { content: "👉"; position: absolute; left: 12px; top: 8px; }
.opis-fig { margin: 18px 0 0; padding: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; position: sticky; top: 90px; }
.opis-fig svg { display: block; width: 100%; height: auto; }
.opis-fig figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.opis-fig .tx { fill: var(--muted); font-size: 9px; }
.opis-fig .c1 { fill: var(--a2); } .opis-fig .c2 { fill: var(--accent); } .opis-fig .c3 { fill: var(--a3); } .opis-fig .c4 { fill: var(--a5); }
.opis-fig .ln { stroke: var(--line); stroke-width: 1; }
.opis-fig .ref { stroke: var(--a4); stroke-width: 1.5; stroke-dasharray: 4 3; }
.opis-fig .band { fill: var(--a3); fill-opacity: .15; }
.opis-fig .pl1, .opis-fig .pl2 { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.opis-fig .pl1 { stroke: var(--a2); } .opis-fig .pl2 { stroke: var(--accent); }
.opis-fig .edge { stroke: var(--muted); stroke-opacity: .55; stroke-linecap: round; }
.opis-fig .hand { font-size: 22px; }
.opis-foot { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .opis-grid { grid-template-columns: 1fr; } .opis-fig { position: static; max-width: 420px; } }
@media (max-width: 760px) {
  .opis-head { padding: 10px 10px 10px 14px; } .opis-head h3 { font-size: 19px; }
  .opis-short { margin: 10px 14px 0; } .opis-body { padding: 6px 14px 16px; }
  .opis-lead { font-size: 18px; } .opis-ul { font-size: 16px; padding-left: 18px; }
  .desc.has-opis { padding-left: 40px; } .desc.has-opis::before { left: 9px; font-size: 20px; }
}
