:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1d232b;
  --muted: #66707c;
  --line: #dde1e6;
  --field: #f7f8fa;
  --accent: #e8590c;
  --accent-soft: #fff0e6;
  --ok: #2b8a3e;
  --warn: #c77700;
  --bad: #c92a2a;
  --ok-bg: #ebfbee;
  --warn-bg: #fff8e1;
  --bad-bg: #fff0f0;
  --body: #c9ced6;
  --fincan: #4c6ef5;
  --nose: #e8590c;
  --motor: #868e96;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151a; --card: #1b1f26; --ink: #e6e9ee; --muted: #9aa3ae; --line: #2c323b; --field: #232830;
    --accent: #ff7a2e; --accent-soft: #3a2416; --ok: #51cf66; --warn: #fcc419; --bad: #ff6b6b;
    --ok-bg: #16281b; --warn-bg: #2d2610; --bad-bg: #321617; --body: #59606b; --fincan: #748ffc; --nose: #ff7a2e; --motor: #8f979f;
  }
}
:root[data-theme="dark"] {
  --bg: #12151a; --card: #1b1f26; --ink: #e6e9ee; --muted: #9aa3ae; --line: #2c323b; --field: #232830;
  --accent: #ff7a2e; --accent-soft: #3a2416; --ok: #51cf66; --warn: #fcc419; --bad: #ff6b6b;
  --ok-bg: #16281b; --warn-bg: #2d2610; --bad-bg: #321617; --body: #59606b; --fincan: #748ffc; --nose: #ff7a2e; --motor: #8f979f;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, system-ui, sans-serif; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 600; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand h1 { font-size: 17px; margin: 0; letter-spacing: -0.01em; }
.brand p { margin: 0; color: var(--muted); font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.name { background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; width: 170px; }

button, .btn { cursor: pointer; border-radius: 8px; padding: 6px 12px; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { border-color: var(--accent); }
.ghost { background: transparent; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.primary:hover { filter: brightness(1.08); }
.small { padding: 3px 9px; font-size: 12px; }

.layout { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 16px; padding: 16px 20px 40px; max-width: 1700px; margin: 0 auto; }
.side { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px); display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.tree-card { padding: 12px; flex: 0 0 auto; max-height: 45vh; display: flex; flex-direction: column; min-height: 230px; }
.props-card { min-height: 260px; }
.props-card { padding: 12px 0 8px; flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.props-card h2 { padding: 0 14px; }
.main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* panel parametrów */
details.sec { border-bottom: 1px solid var(--line); }
details.sec:last-child { border-bottom: 0; }
details.sec > summary { list-style: none; cursor: pointer; padding: 11px 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
details.sec > summary::after { content: "▸"; color: var(--muted); transition: transform .15s; }
details.sec[open] > summary::after { transform: rotate(90deg); }
details.sec > summary::-webkit-details-marker { display: none; }
.fields { padding: 0 14px 12px; display: grid; gap: 7px; }
.f { display: grid; grid-template-columns: 1fr 104px; align-items: center; gap: 8px; }
.f > span { color: var(--muted); font-size: 13px; }
.f > span small { display: block; font-size: 11px; opacity: .8; }
.f .inp { display: flex; align-items: center; background: var(--field); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.f .inp:focus-within { border-color: var(--accent); }
.f input[type=number] { width: 100%; border: 0; background: transparent; padding: 5px 7px; text-align: right; font-family: "JetBrains Mono", monospace; font-size: 12.5px; outline: none; }
.f .u { padding-right: 7px; color: var(--muted); font-size: 11.5px; }
.f select { width: 100%; background: var(--field); border: 1px solid var(--line); border-radius: 7px; padding: 5px 6px; font-size: 13px; }
.f.wide { grid-template-columns: 1fr; }
.f.check { grid-template-columns: 1fr auto; }
.f input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.f.disabled { opacity: .4; pointer-events: none; }
.helper { margin-top: 4px; }

/* podgląd */
.viewer { padding: 0; overflow: hidden; }
.tabs { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; color: var(--muted); font-weight: 500; }
.tab.active { background: var(--accent-soft); color: var(--accent); }
.spacer { flex: 1; }
.opts3d, .legend2d { display: flex; gap: 12px; color: var(--muted); font-size: 12.5px; align-items: center; }
.opts3d input { accent-color: var(--accent); vertical-align: -2px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-left: 6px; vertical-align: -2px; }
.lg.cg { background: conic-gradient(var(--ink) 0 25%, var(--card) 0 50%, var(--ink) 0 75%, var(--card) 0); border: 1.5px solid var(--ink); }
.lg.cp { background: var(--bad); }
.stage { position: relative; height: 380px; }
.view2d, .view3d { width: 100%; height: 100%; display: block; }
.view3d[hidden] { display: none; }
.busy { position: absolute; top: 10px; right: 12px; background: var(--card); border: 1px solid var(--line); padding: 3px 10px; border-radius: 20px; font-size: 12px; color: var(--muted); }

.view2d .body { fill: var(--body); fill-opacity: .35; stroke: var(--ink); stroke-width: .5; }
.view2d .fincan { fill: var(--fincan); fill-opacity: .25; stroke: var(--fincan); stroke-width: .6; }
.view2d .nose { fill: var(--nose); fill-opacity: .25; stroke: var(--nose); stroke-width: .6; }
.view2d .fin { fill: var(--fincan); fill-opacity: .18; stroke: var(--fincan); stroke-width: .6; stroke-linejoin: round; }
.view2d .hidden { fill: none; stroke: var(--muted); stroke-width: .4; stroke-dasharray: 2 1.5; }
.view2d .motor { fill: var(--motor); fill-opacity: .45; stroke: var(--motor); stroke-width: .4; }
.view2d .axis { stroke: var(--muted); stroke-width: .3; stroke-dasharray: 6 2 1 2; }
.view2d .cg circle { fill: var(--card); stroke: var(--ink); stroke-width: .5; }
.view2d .cg path { fill: var(--ink); }
.view2d .cp circle { fill: var(--bad); stroke: var(--bad); stroke-width: .5; }
.view2d .cp .dot { fill: var(--card); }
.view2d .lbl { font-family: Inter, sans-serif; font-weight: 600; }
.view2d .cgt { fill: var(--ink); } .view2d .cpt { fill: var(--bad); }
.view2d .dim line { stroke: var(--muted); stroke-width: .35; }
.view2d .dim text { fill: var(--muted); font-family: Inter, sans-serif; }

/* statystyki */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat .s { font-size: 11.5px; color: var(--muted); }
.stat.ok { border-color: var(--ok); background: var(--ok-bg); } .stat.ok .v { color: var(--ok); }
.stat.warn { border-color: var(--warn); background: var(--warn-bg); } .stat.warn .v { color: var(--warn); }
.stat.bad { border-color: var(--bad); background: var(--bad-bg); } .stat.bad .v { color: var(--bad); }

.warnings { display: grid; gap: 6px; }
.warnings:empty { display: none; }
.wmsg { padding: 8px 12px; border-radius: 8px; font-size: 13px; display: flex; gap: 10px; align-items: center; justify-content: space-between; border: 1px solid; }
.wmsg.info { background: var(--field); border-color: var(--line); }
.wmsg.warn { background: var(--warn-bg); border-color: var(--warn); }
.wmsg.bad { background: var(--bad-bg); border-color: var(--bad); }

/* eksport */
.exports { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.exp { border: 1px solid var(--line); border-radius: 9px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.exp h3 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.exp h3 i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.exp dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12.5px; }
.exp dt { color: var(--muted); } .exp dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.exp p { margin: 0; font-size: 12px; color: var(--muted); }
.exp button { justify-content: center; }

/* silniki */
.motor-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.motor-tools { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 13px; }
.motor-tools input[type=checkbox] { accent-color: var(--accent); vertical-align: -2px; }
.picks { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pick { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; background: var(--field); font-size: 13px; }
.pick b { font-size: 15px; }
.pick .lbl { display: block; color: var(--muted); font-size: 11.5px; }
.table-wrap { overflow-x: auto; }
table.mt { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.mt th { text-align: right; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.mt td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mt th:nth-child(-n+2), .mt td:nth-child(-n+2) { text-align: left; }
.mt td.notes { text-align: left; white-space: normal; min-width: 200px; color: var(--muted); font-size: 12px; }
.mt tr.sel td { background: var(--accent-soft); }
.mt tr.unfit td { opacity: .5; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge.s2 { background: var(--ok-bg); color: var(--ok); }
.badge.s1 { background: var(--warn-bg); color: var(--warn); }
.badge.s0 { background: var(--bad-bg); color: var(--bad); }
.cls { font-weight: 700; font-family: "JetBrains Mono", monospace; }
.note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 12px 16px 32px; }
  .panel { position: static; max-height: none; }
  .stage { height: 300px; }
  .legend2d { display: none; }
}
.part-sel { background: var(--field); border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; font-size: 12.5px; }

:root { --series: #3b5bdb; --band: rgba(43,138,62,.10); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --series: #8ea2ff; --band: rgba(81,207,102,.12); } }
:root[data-theme="dark"] { --series: #8ea2ff; --band: rgba(81,207,102,.12); }
.muted { color: var(--muted); font-weight: 400; font-size: 12px; }
.icon { width: 28px; justify-content: center; padding: 3px 0; }
.tree-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.tree-head h2 { margin: 0; }
.tree-tools { display: flex; gap: 4px; }
.tree-tools select { max-width: 120px; background: var(--field); border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; padding: 3px 4px; }
.tree { list-style: none; margin: 0; padding: 0; overflow-y: auto; font-size: 13px; }
.tree li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.tree li:hover { background: var(--field); }
.tree li.sel { background: var(--accent-soft); color: var(--accent); }
.tree li .ic { width: 16px; text-align: center; color: var(--muted); }
.tree li.sel .ic { color: var(--accent); }
.tree li .sub { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.tree li.d1 { font-weight: 600; } .tree li.d0 { font-weight: 700; }
.tree li.d2 { padding-left: 20px; } .tree li.d3 { padding-left: 36px; }
.tree li .badge { margin-left: auto; }
.fhead { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 2px; font-weight: 600; }
.f input[type=text] { width: 100%; background: var(--field); border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; font-size: 13px; }
.f.text { grid-template-columns: 1fr 1.6fr; }
.fields { padding: 0 14px 6px; }
.hint { grid-column: 1 / -1; font-size: 11px; color: var(--muted); margin-top: -3px; line-height: 1.35; }
.view2d .sel { stroke: var(--accent) !important; stroke-width: 1.1 !important; }
.view2d [data-id] { cursor: pointer; }
.view2d .printed { fill: var(--nose); fill-opacity: .18; stroke: var(--nose); stroke-width: .6; }
.view2d .inner { fill: none; stroke: var(--fincan); stroke-width: .5; stroke-dasharray: 3 1.5; }
.view2d .solidin { fill: var(--fincan); fill-opacity: .5; stroke: var(--fincan); stroke-width: .3; }
.view2d .rec { fill: var(--warn); fill-opacity: .25; stroke: var(--warn); stroke-width: .4; }
.view2d .ico { fill: var(--warn); pointer-events: none; }
.view2d .cord { fill: none; stroke: var(--muted); stroke-width: .6; }
.view2d .massc { fill: var(--muted); fill-opacity: .4; stroke: var(--muted); stroke-width: .3; }
.view2d .stageline { stroke: var(--accent); stroke-width: .5; stroke-dasharray: 4 2; }
.view2d .stg { fill: var(--accent); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.recs { display: grid; gap: 8px; }
.rec { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; padding: 9px 10px; border-radius: 8px; background: var(--field); }
.rec .ri { font-weight: 700; text-align: center; border-radius: 50%; width: 20px; height: 20px; line-height: 20px; font-size: 12px; color: #fff; }
.rec.ok .ri { background: var(--ok); } .rec.warn .ri { background: var(--warn); } .rec.bad .ri { background: var(--bad); } .rec.info .ri { background: var(--series); }
.rec b { display: block; font-size: 13px; }
.rec span { font-size: 12.5px; color: var(--muted); }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 130px 1fr 46px; gap: 8px; align-items: center; font-size: 12.5px; }
.bar .tr { height: 10px; background: var(--field); border-radius: 4px; overflow: hidden; }
.bar .fl { height: 100%; background: var(--series); border-radius: 0 4px 4px 0; }
.bar .vl { text-align: right; font-variant-numeric: tabular-nums; }
.mt.compact td, .mt.compact th { padding: 4px 6px; }
.charts { position: relative; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 16px; }
.chart svg { display: block; width: 100%; }
.chart .ct { font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.chart .cu { fill: var(--muted); font-weight: 400; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .yl, .chart .xl { font-size: 10.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .ln { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; }
.chart .evl { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.chart .evt { font-size: 10px; fill: var(--muted); }
.chart .band { fill: var(--band); }
.chart .bandlbl { font-size: 10px; fill: var(--ok); }
.chart .xh { stroke: var(--ink); stroke-width: 1; opacity: .5; }
.chart .dotm { fill: var(--series); stroke: var(--card); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.12); min-width: 170px; }
.chart-tip table { border-collapse: collapse; width: 100%; margin-top: 4px; }
.chart-tip td { padding: 1px 0; } .chart-tip td:last-child { text-align: right; font-variant-numeric: tabular-nums; padding-left: 10px; }
.evdet { margin-top: 10px; } .evdet summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.stage-tabs { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.stage-tabs button { font-size: 12px; padding: 2px 9px; }
.stage-tabs button.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.guide div { background: var(--field); border-radius: 9px; padding: 12px; font-size: 13px; line-height: 1.5; }
.guide h3 { margin: 0 0 6px; font-size: 13.5px; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .side { position: static; max-height: none; } .tree-card { max-height: none; } }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: 420px; padding: 12px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.15); font-size: 13px; }
.toast.ok { border-color: var(--ok); } .toast.warn { border-color: var(--warn); } .toast.bad { border-color: var(--bad); }
.toast[hidden] { display: none; }
.traj-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-top: 12px; align-items: start; }
.traj svg { width: 100%; display: block; }
.windstudy h3 { font-size: 12.5px; margin: 6px 0 8px; }
.mt td.warn { color: var(--warn); font-weight: 600; } .mt td.bad { color: var(--bad); font-weight: 600; }
@media (max-width: 1100px) { .traj-row { grid-template-columns: 1fr; } }

.mode { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mode .seg { border: 0; border-radius: 0; padding: 6px 11px; background: transparent; color: var(--muted); }
.mode .seg.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
body.simple .adv { display: none !important; }
body:not(.simple) .simple-only { display: none; }
.wiz { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 40px); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.wiz::backdrop { background: rgba(10,14,20,.45); }
.wiz-body { padding: 18px 20px; overflow-y: auto; max-height: calc(100vh - 40px); }
.wiz-head { display: flex; justify-content: space-between; align-items: center; }
.wiz-head h2 { margin: 0; font-size: 18px; }
.wiz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 12px; }
.wiz-grid section { display: grid; gap: 7px; align-content: start; }
.wiz-grid h3 { font-size: 13px; margin: 6px 0 2px; }
.f > span small { display: block; font-size: 11px; opacity: .8; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 20px; font-size: 12.5px; cursor: pointer; }
.checks input { accent-color: var(--accent); }
.checks label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.wiz-actions { margin-top: 10px; display: grid; gap: 8px; }
.wiz-actions .primary { padding: 10px; justify-content: center; font-size: 14px; }
.wiz-progress { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.wiz-progress .bar { height: 8px; background: var(--field); border-radius: 4px; overflow: hidden; }
.wiz-progress .fl { height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.wiz-result { margin-top: 16px; }
.wiz-result:empty { display: none; }
.wiz-best { border: 1px solid var(--accent); border-radius: 12px; padding: 14px; background: var(--accent-soft); display: grid; gap: 10px; }
.wiz-best h3 { margin: 0; font-size: 16px; }
.wiz-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.wiz-kpis div { background: var(--card); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--muted); }
.wiz-kpis b { display: block; font-size: 17px; color: var(--ink); }
.wiz-log { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }
@media (max-width: 900px) { .wiz-grid { grid-template-columns: 1fr; } }
.wiz-progress[hidden] { display: none; }
body.simple .two-col { grid-template-columns: 1fr; }

.rec-guide { font-size: 13px; line-height: 1.5; }
.guide-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.guide-steps section { background: var(--field); border-radius: 9px; padding: 12px 14px; }
.guide-steps h3, .gs-h { margin: 0 0 6px; font-size: 13.5px; }
.gs-h { margin: 6px 0 8px; }
.guide-steps ul, .guide-steps ol { margin: 0; padding-left: 18px; }
.guide-steps li { margin: 3px 0; }
.guide-steps ul.check { list-style: none; padding-left: 0; }
.guide-steps ul.check li::before { content: "☐ "; color: var(--accent); }
.fold-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.fold-steps figure { margin: 0; background: var(--field); border-radius: 9px; padding: 10px; display: grid; gap: 6px; align-content: start; }
.fold-steps figcaption { font-size: 12.5px; }
.step-svg { width: 100%; height: 100px; }
.sv-fill { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.sv-edge { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 2; fill: none; }
.sv-line { stroke: var(--muted); stroke-width: 1; }
.sv-dot { fill: var(--ink); }
.sv-tube { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.sv-motor { fill: var(--motor); opacity: .6; }
.sv-wad { fill: var(--warn); opacity: .35; }
.sv-nose { fill: var(--nose); opacity: .5; }
.sv-t { font-size: 8px; fill: var(--muted); text-anchor: middle; }
.pad-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; margin-bottom: 12px; }
.pad-form { padding: 0; display: grid; gap: 7px; }
.pad-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pad-svg svg { width: 100%; height: 260px; }
@media (max-width: 900px) { .pad-grid { grid-template-columns: 1fr; } }
@media print {
  body.printing > *:not(.print-area) { display: none !important; }
  .print-area { padding: 10mm; color: #000; }
  .print-area .guide-steps section, .print-area .fold-steps figure { background: #fff; border: 1px solid #ccc; break-inside: avoid; }
}

.pv-ground { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; }
.pv-leg { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; } .pv-leg.back { opacity: .35; }
.pv-hub { fill: var(--nose); opacity: .8; }
.pv-plate { fill: var(--motor); }
.pv-rod { stroke: var(--ink); stroke-width: 2; }
.pv-stand { fill: var(--fincan); }
.pv-rocket { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.pv-ref { stroke: var(--ok); stroke-width: 1.2; fill: none; }
.pv-t { font-size: 10px; fill: var(--muted); }
.pad-legs { padding: 0; display: grid; gap: 7px; }
.pad-simple .pad-legs, .pad-simple .pad-legs-only { display: none !important; }
.pv-bucket { fill: var(--field); stroke: var(--ink); stroke-width: 1.5; }
.pv-sand { fill: var(--warn); opacity: .3; }
.rec-guide[hidden] { display: none; }
.rec-guide { margin-top: 12px; }
@media print { .print-area .rec-guide[hidden] { display: block !important; } }

.guide-det > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 8px; user-select: none; }
.guide-det > summary::-webkit-details-marker { display: none; }
.guide-det > summary::before { content: "▸"; transition: transform .15s; }
.guide-det[open] > summary::before { transform: rotate(90deg); }
.guide-det .hide, .guide-det[open] .show { display: none; }
.guide-det[open] .hide { display: inline; }
.guide-det > summary:hover { filter: brightness(1.08); }
@media print { .print-area .guide-det > summary { display: none; } }
