#layers {
  background: var(--paper);
  color: var(--ink);
  padding-block: clamp(3.5rem, 6.3vw, 7rem);
}
#layers [hidden] { display: none !important; }
.ly-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ly-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ly-heading { display: grid; gap: .65rem 2rem; margin-bottom: clamp(1.4rem, 2.6vw, 2.4rem); }
.ly-kicker { margin: 0; color: var(--accent-dark); font-size: .8125rem; font-weight: 720; letter-spacing: .1em; text-transform: uppercase; }
.ly-title { margin: 0; font-size: clamp(2.6rem, 5.2vw, 5.6rem); font-weight: 780; letter-spacing: -.065em; line-height: .98; }
.ly-intro { max-width: 33em; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.5; }
.ly-zones { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.1rem; }
.ly-zone {
  min-height: 2.75rem; padding: .45rem 1.05rem; border: 1px solid color-mix(in srgb, var(--accent-dark) 30%, var(--paper));
  border-radius: 2rem; background: transparent; color: var(--ink); font-size: .98rem; font-weight: 620; transition: background .2s, color .2s, border-color .2s;
}
.ly-zone[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.ly-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(16rem, .8fr); gap: clamp(1.4rem, 3.6vw, 4.2rem); align-items: start; }
.ly-stage-box {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; min-width: 0; padding: clamp(.8rem, 1.6vw, 1.2rem); overflow: hidden; border-radius: .65rem;
  color: var(--on-dark);
  background: radial-gradient(110% 85% at 28% 18%, color-mix(in srgb, var(--accent) 26%, var(--night)) 0%, var(--night) 58%, var(--night-deep) 100%);
}
.ly-stage-box::after {
  content: ''; position: absolute; inset: auto 8% 6% 8%; height: 22%; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
}
.ly-packages { position: relative; z-index: 2; display: inline-flex; flex-wrap: wrap; justify-self: start; gap: .25rem; padding: .25rem; border-radius: 2rem; background: color-mix(in srgb, var(--night) 70%, transparent); border: 1px solid var(--line-dark); }
.ly-package { min-height: 2.35rem; max-width: 100%; padding: .3rem .95rem; border: 0; border-radius: 2rem; background: transparent; color: var(--muted-on-dark); font-size: .9rem; font-weight: 620; }
.ly-package[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.ly-stage { position: relative; z-index: 1; aspect-ratio: 4 / 3; perspective: 1500px; perspective-origin: 50% 32%; }
/* The script measures the stage right after it changes its box: these two never animate (site.css gives every element a short transition when motion is reduced). */
.ly-stage, .ly-scene { transition-property: none; }
/* Each zone has its own angle. Sheets fan out sideways (doors, arches, panel) or upwards (floor, roof, trunk). */
.ly-scene { position: absolute; inset: 15% 51% 17% 3%; pointer-events: none; transform-style: preserve-3d; transform: translate(var(--ly-x, 0px), var(--ly-y, 0px)) var(--ly-view); --dx: 20%; --dy: 0%; --dz: 22px; --mid: 0; }
.ly-scene[data-fan="up"] { inset: 33% 17% 5% 17%; }
.ly-scene[data-shape="arch"] { inset: 6% 42% 10% 0%; }
.ly-layer {
  position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; will-change: transform;
  /* --p — place of the sheet in the opened stack: sheets keep close to the part of the body they are glued to.
     --mid — the place that stays where the scene is: a sideways fan of body parts opens both ways from its middle. */
  --at: calc(var(--p, var(--i)) - var(--mid));
  transform: translate3d(calc(var(--at) * var(--dx) * var(--spread, 0)), calc(var(--at) * var(--dy) * var(--spread, 0)),
    calc(var(--at) * var(--dz) * var(--spread, 0) + var(--i) * 5px));
  transition: transform .72s cubic-bezier(.2, .85, .25, 1.12);
  transition-delay: calc(var(--i) * 130ms);
}
.ly-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; transition: opacity .3s ease, filter .3s ease; transition-delay: inherit; }
/* Only the painted sheet answers the pointer, never the empty box around it. A chosen sheet does not move, so the mouse never loses it. */
.ly-art > g { pointer-events: auto; cursor: pointer; }
/* Under a finger the ghosts above the chosen sheet let the tap through to what is seen. A mouse looks at the sheets as they lie. */
@media (hover: none) { .ly-scene.has-active .ly-layer.is-above .ly-art > g { pointer-events: none; } }
.ly-stage[data-phase="fly"] .ly-layer { transform: translate3d(calc(var(--at) * var(--dx)), calc(var(--at) * var(--dy)), calc(180px + var(--i) * 30px)); transition: none; }
.ly-stage[data-phase="fly"] :is(.ly-art, .ly-badge) { opacity: 0; transition: none; }
.ly-stage[data-phase="closed"] { --spread: 0; }
.ly-stage[data-phase="open"] { --spread: 1; }
/* The stack opens from the top sheet down, so a lower sheet never slides over the ones above it. */
.ly-stage[data-phase="open"] .ly-layer { transition-delay: calc((var(--n) - 1 - var(--i)) * 55ms); }
/* Every state of a sheet lists the same filters in the same order, so the change from one state to another is smooth. */
.ly-layer[data-type="base"] .ly-art { filter: brightness(1) saturate(1) drop-shadow(0 18px 18px rgb(0 0 0 / .45)); }
.ly-scene.has-active .ly-layer, .ly-scene.has-active .ly-art { transition-delay: 0s; }
/* The shown sheet and the part it is glued to stay lit. Sheets below dim, everything laid above turns into a ghost;
   trim over its own sheet stays half see-through, so the sheet is seen on its back. */
.ly-scene.has-active .ly-layer:not(.is-active, .is-host) .ly-art { filter: brightness(.45) saturate(.55) drop-shadow(0 0 0 color-mix(in srgb, var(--accent) 0%, transparent)); }
.ly-scene.has-active .ly-layer.is-above .ly-art { opacity: .13; }
.ly-layer.is-active .ly-art { filter: brightness(1) saturate(1) drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 80%, transparent)); }
.ly-layer.is-host .ly-art { filter: brightness(1) saturate(1) drop-shadow(0 0 1.5px var(--accent)) drop-shadow(0 0 1.5px var(--accent)) drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 55%, transparent)); }
.ly-scene.has-active .ly-layer.is-host.is-above .ly-art { opacity: .46; }
/* Numbers: round for a sheet of material, square and plain for a part of the body or the trim — as in the list. */
.ly-badge {
  position: absolute; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  transform: translate(-50%, -50%) var(--ly-billboard) translate3d(calc(var(--sx, 0px) + var(--ly-nx, 0px)), calc(var(--sy, 0px) + var(--ly-ny, 0px)), calc(var(--clear, 0px) + var(--ly-pop, 0px))); color: var(--on-dark); background: var(--night);
  border: 1.5px solid var(--accent); font-size: .8rem; font-weight: 760; box-shadow: 0 4px 10px rgb(0 0 0 / .4); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .2s, color .2s, box-shadow .2s;
}
.ly-layer:is([data-type="base"], [data-type="cover"]) .ly-badge {
  width: 1.5rem; height: 1.5rem; border-radius: .4rem; border-color: color-mix(in srgb, var(--on-dark) 46%, transparent);
  background: color-mix(in srgb, var(--night) 82%, var(--on-dark)); color: color-mix(in srgb, var(--on-dark) 82%, transparent); font-size: .74rem; font-weight: 700;
}
.ly-stage[data-phase="closed"] .ly-badge { opacity: 0 !important; }
/* Numbers appear once their sheet has moved apart from the others. */
.ly-stage[data-phase="open"] .ly-badge { transition: opacity .3s ease calc(.42s + (var(--n) - 1 - var(--i)) * 55ms), transform .3s ease, background .2s, color .2s, box-shadow .2s; }
.ly-scene.has-active .ly-badge { transition-delay: 0s; }
.ly-stage[data-phase="open"] .ly-scene.has-active .ly-layer.is-above:not(.is-host) .ly-badge { opacity: .38; }
/* The number of a sheet laid above would hang over the shown sheet: it hides. --sx and --sy move a number off its neighbour. */
.ly-stage[data-phase="open"] .ly-scene.has-active .ly-layer.is-above.is-over:not(.is-host) .ly-badge { opacity: 0; }
.ly-layer.is-active .ly-badge { --ly-pop: var(--pop, 0px); --ly-nx: var(--nx, 0px); --ly-ny: var(--ny, 0px); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ly-layer.is-host .ly-badge { border-color: var(--accent); color: var(--on-dark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent), 0 4px 10px rgb(0 0 0 / .4); }
/* Names of the materials on the shown sheet. They face the viewer like the numbers; --nx and --ny move a name off its neighbours. */
.ly-label {
  position: absolute; display: inline-flex; align-items: center; gap: .34rem; padding: .16rem .52rem .16rem .4rem; border-radius: 1rem;
  transform: translate(-50%, -50%) var(--ly-billboard) translate3d(var(--nx, 0px), var(--ny, 0px), calc(var(--clear, 0px) + var(--pop, 0px)));
  color: var(--on-dark); background: color-mix(in srgb, var(--night-deep) 88%, transparent); border: 1px solid var(--line-dark-strong);
  font-size: .72rem; font-weight: 640; line-height: 1.25; letter-spacing: .005em; white-space: nowrap; box-shadow: 0 4px 12px rgb(0 0 0 / .45);
  pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s .2s;
}
.ly-layer.is-active .ly-label { opacity: 1; visibility: visible; transition: opacity .25s ease .1s, visibility 0s; }
.ly-stage[data-phase="fly"] .ly-label { opacity: 0; }
/* The colour of a sheet; the colour of its print sits in the middle. */
.ly-swatch { flex: none; display: inline-block; width: .62rem; height: .62rem; border-radius: 50%; background: var(--ly-ink, var(--accent-dark)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--on-dark) 60%, transparent); }
.ly-swatch[data-print] { background: radial-gradient(circle, var(--ly-print) 0 27%, var(--ly-ink, var(--accent-dark)) 34%); }
.ly-controls { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; }
.ly-toggle { min-height: 2.6rem; padding: .3rem .95rem; border: 1px solid var(--line-dark-strong); border-radius: 2rem; background: transparent; color: var(--on-dark); font-size: .88rem; font-weight: 620; }
.ly-toggle:hover { border-color: var(--accent); color: var(--accent); }
.ly-hint { color: var(--muted-on-dark); font-size: .82rem; }
.ly-side { min-width: 0; }
.ly-list-title { margin: 0 0 .6rem; color: var(--muted); font-size: .86rem; font-weight: 600; }
.ly-list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.ly-item { border-bottom: 1px solid var(--rule); }
.ly-item-button {
  display: grid; grid-template-columns: 1.65rem minmax(0, 1fr) auto; align-items: center; gap: .22rem .75rem; width: 100%;
  padding: .78rem 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.ly-num { display: grid; place-items: center; justify-self: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; border: 1.5px solid var(--accent-dark); color: var(--accent-dark); font-size: .78rem; font-weight: 760; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }
.ly-item:is(.is-active, .is-peek) .ly-num { background: var(--accent-dark); color: var(--white); }
.ly-item-name { font-size: clamp(1rem, 1.25vw, 1.14rem); font-weight: 660; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; transition: color .2s; }
.ly-item.is-peek .ly-item-name { color: var(--accent-dark); }
/* A part of the body or the trim is not a material: a square plain number and a calmer name, as on the drawing. */
.ly-item:is([data-type="base"], [data-type="cover"]) .ly-item-button { padding-block: .56rem; }
.ly-item:is([data-type="base"], [data-type="cover"]) .ly-num { width: 1.42rem; height: 1.42rem; border-radius: .38rem; border-color: color-mix(in srgb, var(--muted) 62%, transparent); color: var(--muted); font-size: .74rem; font-weight: 700; }
.ly-item:is([data-type="base"], [data-type="cover"]):is(.is-active, .is-peek) .ly-num { background: var(--muted); border-color: var(--muted); color: var(--white); }
.ly-item:is([data-type="base"], [data-type="cover"]) .ly-item-name { color: color-mix(in srgb, var(--ink) 70%, var(--paper)); font-size: .96rem; font-weight: 560; letter-spacing: -.01em; }
.ly-item:is([data-type="base"], [data-type="cover"]):is(.is-active, .is-peek) .ly-item-name { color: var(--ink); }
/* The part the shown sheet is glued to. */
.ly-item.is-host .ly-num { border-color: var(--accent-dark); color: var(--accent-dark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 70%, transparent); }
.ly-item.is-host .ly-item-name { color: var(--ink); }
.ly-item-where { grid-column: 2 / -1; display: grid; gap: .2rem; color: var(--muted); font-size: .86rem; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
.ly-where.is-named { padding-left: 1.08rem; text-indent: -1.08rem; }
.ly-where b { color: var(--ink); font-weight: 620; }
.ly-where .ly-swatch { margin-right: .46rem; box-shadow: 0 0 0 1px var(--paper), 0 0 0 2px color-mix(in srgb, var(--ink) 34%, transparent); }
.ly-tag { padding: .2rem .55rem; border-radius: 1rem; background: var(--paper-2); color: color-mix(in srgb, var(--ink) 75%, var(--accent-dark)); font-size: .74rem; font-weight: 600; white-space: nowrap; }
.ly-tag[data-kind="damper"] { background: color-mix(in srgb, var(--accent) 45%, var(--paper)); }
.ly-tag[data-kind="insulator"], .ly-tag[data-kind="membrane"] { background: color-mix(in srgb, var(--accent-alt) 20%, var(--paper)); }
.ly-tag[data-kind="absorber"] { background: color-mix(in srgb, var(--spark) 14%, var(--paper)); }
.ly-tag[data-kind="base"], .ly-tag[data-kind="cover"] { background: transparent; border: 1px solid var(--rule); }
.ly-panel { padding: 0 0 .9rem 2.4rem; animation: ly-reading .26s ease both; }
.ly-panel p { margin: 0 0 .45rem; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.ly-panel strong { color: var(--ink); }
.ly-panel .ly-note { color: var(--ink); }
.ly-panel .ly-meta { color: var(--accent-dark); font-size: .86rem; font-weight: 560; }
@keyframes ly-reading { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ly-summary { margin-top: 1.2rem; padding: 1rem 1.1rem; border-radius: .5rem; background: var(--paper-2); }
.ly-facts { display: grid; gap: .45rem; margin: 0; }
.ly-facts > div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.ly-facts dt { color: var(--muted); font-size: .9rem; }
.ly-facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ly-facts > div:last-child dd { font-size: 1.25rem; letter-spacing: -.03em; }
.ly-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; margin-top: .9rem; }
.ly-add { min-height: 2.9rem; padding: .55rem 1.2rem; border: 0; border-radius: .3rem; background: var(--ink); color: var(--white); font-weight: 650; }
.ly-add:hover { background: var(--accent-dark); }
.ly-more { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); font-size: .95rem; font-weight: 620; text-underline-offset: .22em; }
.ly-more:hover { color: var(--accent-dark); }
.ly-gallery { margin-top: clamp(1.8rem, 3.5vw, 3rem); }
.ly-gallery-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin-bottom: .9rem; }
.ly-gallery-title { margin: 0; font-size: clamp(1.3rem, 2vw, 1.9rem); font-weight: 700; letter-spacing: -.04em; }
.ly-gallery-note { margin: 0; color: var(--muted); font-size: .9rem; }
.ly-item-repeat { color: var(--muted); font-size: .86em; font-weight: 500; }
.ly-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(clamp(10.5rem, 17vw, 14.5rem), 20rem); gap: .7rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.ly-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; padding: 0; border: 0; border-radius: .45rem; background: var(--night); cursor: zoom-in; scroll-snap-align: start; }
.ly-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.22, .67, .26, 1); }
.ly-photo-caption { position: absolute; inset: auto 0 0; padding: 2.2rem .7rem .6rem; color: #fff; background: linear-gradient(transparent, rgb(8 7 12 / .82)); font-size: .82rem; line-height: 1.3; text-align: left; }
.ly-lightbox { width: min(60rem, 94vw); max-width: 94vw; max-height: 94vh; padding: 0; overflow: hidden; border: 1px solid var(--line-dark); border-radius: .5rem; background: var(--night-deep); color: var(--on-dark); }
.ly-lightbox::backdrop { background: rgb(9 8 14 / .88); }
.ly-lightbox-figure { display: grid; margin: 0; }
.ly-lightbox img { display: block; width: 100%; max-height: 82vh; object-fit: contain; background: #000; }
.ly-lightbox figcaption { min-height: 3rem; padding: .8rem 1rem; color: var(--muted-on-dark); font-size: .95rem; }
.ly-lightbox-close { position: absolute; top: .6rem; right: .6rem; z-index: 2; min-height: 2.6rem; padding: .3rem .9rem; border: 0; border-radius: 2rem; background: rgb(12 10 18 / .78); color: #fff; font-weight: 620; }
.ly-lightbox-nav { position: absolute; top: 42%; z-index: 2; width: 2.9rem; height: 2.9rem; border: 0; border-radius: 50%; background: rgb(12 10 18 / .72); color: #fff; }
.ly-lightbox-nav::before { content: ''; display: block; width: .7rem; height: .7rem; margin: auto; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(135deg); }
.ly-next::before { transform: rotate(-45deg); }
.ly-prev { left: .6rem; }
.ly-next { right: .6rem; }
.ly-lightbox-count { position: absolute; right: 1rem; bottom: 1rem; color: var(--muted-on-dark); font-size: .85rem; font-variant-numeric: tabular-nums; }
.ly-lightbox-open { overflow: hidden; }
#layers :is(button, a):focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 3px; }
#layers .ly-stage-box :is(button):focus-visible, .ly-lightbox :is(button):focus-visible { outline-color: var(--accent); }
@media (hover: hover) {
  .ly-zone:not([aria-pressed="true"]):hover { border-color: var(--accent-dark); color: var(--accent-dark); }
  .ly-package:not([aria-pressed="true"]):hover { color: var(--on-dark); }
  .ly-item-button:hover .ly-item-name { color: var(--accent-dark); }
  .ly-photo:hover img { transform: scale(1.05); }
}
@media (min-width: 52rem) {
  .ly-heading { grid-template-columns: 1.55fr .8fr; align-items: end; }
  .ly-heading .ly-kicker { grid-column: 1 / -1; }
}
@media (max-width: 58rem) {
  .ly-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 34rem) {
  .ly-zones { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .ly-zone { flex: none; }
  .ly-stage { aspect-ratio: 1 / 1.02; }
  .ly-scene[data-fan="up"] { inset: 40% 11% 3% 11%; }
  .ly-packages { display: flex; justify-self: stretch; flex-wrap: nowrap; }
  .ly-package { flex: 1 1 auto; min-width: 0; padding-inline: .25rem; font-size: .8rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ly-hint { display: none; }
  .ly-badge { width: 1.45rem; height: 1.45rem; font-size: .7rem; }
  .ly-layer:is([data-type="base"], [data-type="cover"]) .ly-badge { width: 1.28rem; height: 1.28rem; border-radius: .34rem; font-size: .66rem; }
  .ly-label { padding: .12rem .44rem .12rem .34rem; font-size: .66rem; }
}
/* On touch screens the kit switch and «Собрать слои» get a finger-sized height. */
@media (pointer: coarse) { .ly-package, .ly-toggle { min-height: 2.75rem; } }
@media (prefers-reduced-motion: reduce) {
  .ly-layer, .ly-art, .ly-badge, .ly-label, .ly-photo img { transition: none !important; }
  .ly-panel { animation: none; }
}
/* The narrowest phones: package names keep their whole words. */
@media (max-width: 22rem) {
  .ly-packages { display: flex; }
  .ly-package { padding-inline: .2rem; font-size: .74rem; letter-spacing: -.02em; }
}
/* door */
/* The door opens as a cascade: every next sheet steps right and down along the stiffening beams of the outer skin, so the beams
   show between the pieces of the first damper. The number in --dy is the slope of DOOR_BEAMS (layers.js) for a 4:3 box.
   The cascade opens to both sides of the closed door (doorSpread in layers.js), so the box of the scene stands in the middle
   of the stage; the depth of the fan is set in pixels and does not shrink with the stage, hence the pixels in the margins. */
.ly-scene[data-shape="door"][data-fan="side"] { top: 28%; bottom: auto; aspect-ratio: 4 / 3; margin: 0 calc(24px - 18.2%) 0 calc(18.2% - 24px); --dy: calc(var(--dx) * .7467); }
/* Only the drawing answers the pointer, so a sheet seen through an opening or beside the corner of the next one can be chosen
   (the box of the scene itself would hide the sheets that stand behind its plane). */
.ly-scene[data-shape="door"], .ly-scene[data-shape="door"] .ly-layer { pointer-events: none; }
.ly-scene[data-shape="door"] .ly-art > g { pointer-events: visiblePainted; }
/* A number sits on the corner of its own sheet and lies in its plane: turned to the viewer, it would be cut by the sheet. */
.ly-scene[data-shape="door"][data-fan="side"] .ly-badge { transform: translate(-50%, -50%) translateZ(6px); }
