:root {
  --paper: #f5efe4;
  --paper-2: #ebe2d1;
  --paper-3: #dfd3bd;
  --ink: #22202a;
  --ink-2: #4d4852;
  --muted: #6e6770;
  --line: #cbbfa8;
  --accent: #a8392b;
  --accent-ink: #fbf6ee;
  --ok: #3f6b3a;
  --serif: "Brygada 1918", "Georgia", serif;
  --sans: "Finlandica", "Helvetica Neue", Arial, sans-serif;
  --step--1: clamp(.84rem, .82rem + .1vw, .9rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + .45vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.25rem + .9vw, 2rem);
  --step-3: clamp(1.8rem, 1.4rem + 1.9vw, 3rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.4vw, 4.6rem);
  --gut: clamp(16px, 4vw, 56px);
  --wrap: 1240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: oklch(19% .022 30);
    --paper-2: oklch(23% .024 30);
    --paper-3: oklch(28% .026 30);
    --ink: oklch(93% .015 70);
    --ink-2: oklch(82% .016 70);
    --muted: oklch(70% .018 60);
    --line: oklch(38% .025 40);
    --accent: oklch(64% .17 38);
    --accent-ink: oklch(17% .02 30);
    --ok: oklch(72% .12 140);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--accent) var(--paper-2); scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--sans);
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
h1 { font-size: var(--step-4); font-weight: 500; letter-spacing: -.02em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

.demo-bar {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: space-between;
  padding: 7px var(--gut);
  background: var(--ink); color: var(--paper);
  font-size: var(--step--1);
}
.demo-bar nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.demo-bar a { text-decoration: none; opacity: .8; }
.demo-bar a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.demo-bar a:hover { opacity: 1; }
.demo-log-btn {
  font: inherit; color: var(--ink); background: var(--paper); border: 0; border-radius: 3px;
  padding: 3px 9px; cursor: pointer;
}
.demo-log-btn span { display: inline-block; min-width: 1.4em; padding: 0 4px; border-radius: 2px; background: var(--accent); color: var(--accent-ink); text-align: center; }

.tape {
  position: sticky; top: 0; z-index: 30; height: 14px;
  background:
    repeating-linear-gradient(90deg, transparent 0 9px, color-mix(in oklab, var(--ink) 45%, transparent) 9px 10px) 0 100% / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 49px, var(--ink) 49px 50px) 0 100% / 100% 8px no-repeat,
    #e9c46a;
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 30%, transparent);
}
@media (prefers-color-scheme: dark) { .tape { background-color: oklch(70% .11 85); } }
.tape-in { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in oklab, var(--accent) 60%, transparent); mix-blend-mode: multiply; }
.tape-mark {
  position: absolute; top: 14px; right: 8px; padding: 1px 6px;
  font: 600 11px/1.4 var(--sans); background: var(--ink); color: var(--paper); border-radius: 0 0 3px 3px;
  font-variant-numeric: tabular-nums;
}

.top {
  position: sticky; top: 14px; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px var(--gut);
  background: var(--paper);
  border-bottom: 1px dashed var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo b { display: block; font: 700 1.35rem/1 var(--serif); }
.logo small { display: block; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.top-nav { display: flex; gap: 22px; }
.top-nav a, .top-phone { text-decoration: none; font-weight: 500; }
.top-nav a:hover, .top-phone:hover { color: var(--accent); }
.top-phone { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 1060px) { .top-nav { display: none; } }
@media (max-width: 640px) { .top-phone { display: none; } .top .btn-sm { padding: 8px 12px; } .logo small { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border: 0; border-radius: 3px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 var(--step-0)/1.1 var(--sans); text-decoration: none; cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 3px color-mix(in oklab, var(--accent-ink) 55%, transparent);
  transition: transform .2s, background .25s;
}
.btn:hover { background: color-mix(in oklab, var(--accent) 86%, var(--ink)); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 15px; font-size: var(--step--1); white-space: nowrap; }
.u-link { font-weight: 600; text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 5px; text-decoration-color: var(--accent); }
.u-link:hover { color: var(--accent); }

.mat { background: var(--paper); }
.hero { position: relative; }
.hero::after {
  content: ""; position: absolute; left: var(--gut); right: var(--gut); bottom: 0; height: 12px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 10px) 0 100% / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 50px) 0 100% / 100% 12px no-repeat;
  opacity: .5;
}

.piece {
  display: inline-flex; gap: 12px; align-items: baseline;
  font: italic 500 var(--step-0)/1.3 var(--serif);
  color: var(--accent);
  padding: 4px 10px 4px 0;
  border-bottom: 1px dashed currentColor;
  margin-bottom: 18px;
}
.piece span { color: var(--muted); font: 400 var(--step--1)/1.3 var(--sans); }

section { padding-inline: var(--gut); }
.sec-head { max-width: 860px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-lead { margin-top: 14px; color: var(--ink-2); max-width: 60ch; }
.sec-head-row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; }
.sec-head-row > div:first-child { max-width: 760px; }

/* hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 72px);
  padding-top: clamp(36px, 6vw, 84px); padding-bottom: clamp(44px, 7vw, 100px);
  border-bottom: 1px solid var(--line);
}
.hero h1 { max-width: 13ch; }
.lead { margin-top: 22px; font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); max-width: 36ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; margin-top: 30px; }
.facts { display: flex; flex-wrap: wrap; gap: 0; margin: 40px 0 0; border-top: 1px solid var(--line); }
.facts > div { padding: 14px 26px 0 0; margin-right: 26px; border-right: 1px dashed var(--line); }
.facts > div:last-child { border-right: 0; }
.facts dt { font: 700 var(--step-2)/1 var(--serif); font-variant-numeric: tabular-nums; }
.facts dd { margin: 6px 0 0; font-size: var(--step--1); color: var(--muted); }
.hero-media { position: relative; min-height: 460px; }
.hero-main img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 40% 50%; border-radius: 2px; }
.hero-main { width: 82%; margin-left: auto; outline: 1px dashed var(--line); outline-offset: 8px; }
.hero-sub { position: absolute; left: 0; bottom: 70px; width: 42%; border: 6px solid var(--paper); box-shadow: 0 10px 30px -18px rgb(0 0 0 / .5); }
.hero-sub img { aspect-ratio: 1; object-fit: cover; }
.ticket {
  position: absolute; right: -6px; bottom: -26px; width: min(300px, 70%);
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--ink);
  padding: 12px 14px 10px;
  font-size: 13px;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-1.5deg);
}
.ticket-h { font-family: var(--serif); font-size: 15px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
.ticket ul { list-style: none; margin: 0; padding: 0; }
.ticket li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.ticket li span { color: var(--muted); }
.ticket .ok { color: var(--ok); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { min-height: 0; margin-bottom: 30px; }
  .hero-main { width: 88%; }
  .hero-main img { aspect-ratio: 4/3.4; }
  .hero-sub { width: 38%; bottom: 40px; }
  .ticket { right: 0; width: min(270px, 74%); }
}

/* services */
.services { position: relative; padding-top: clamp(64px, 9vw, 128px); padding-bottom: clamp(34px, 5vw, 64px); }
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); max-width: 1100px; }
.svc {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 340px); gap: 22px;
  padding: 24px 0; border-bottom: 1px dashed var(--line);
  transition: background .2s;
}
.svc:hover { background: color-mix(in oklab, var(--paper-2) 70%, transparent); }
.svc-n { font: 600 var(--step-1)/1.2 var(--serif); color: var(--accent); }
.svc-main p { margin-top: 8px; color: var(--ink-2); max-width: 52ch; }
.svc-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; align-content: start; }
.svc-meta dt { font-size: 13px; color: var(--muted); }
.svc-meta dd { margin: 2px 0 0; font-weight: 600; white-space: nowrap; }
.svc-preview { position: fixed; z-index: 15; width: 240px; margin: 0; pointer-events: none; opacity: 0; transform: rotate(2deg) scale(.96); transition: opacity .18s, transform .18s; border: 6px solid var(--paper); box-shadow: 0 16px 40px -20px rgb(0 0 0 / .6); }
.svc-preview.on { opacity: 1; transform: rotate(2deg) scale(1); }
.svc-preview img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
@media (hover: none), (max-width: 860px) { .svc-preview { display: none; } }
@media (max-width: 760px) {
  .svc { grid-template-columns: 38px minmax(0, 1fr); gap: 10px 14px; }
  .svc-meta { grid-column: 2; }
}

/* route */
.route { padding-top: clamp(44px, 5.5vw, 76px); padding-bottom: clamp(48px, 6.5vw, 92px); background: var(--paper-2); }
.route-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0;
  position: relative;
}
.route-list::before {
  content: ""; position: absolute; left: 0; right: 0; top: 9px;
  border-top: 2px dashed var(--accent);
}
.route-list li { position: relative; padding: 34px 22px 0 0; }
.route-list li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper-2); border: 2px solid var(--accent);
}
.route-list b { font-size: var(--step--1); color: var(--accent); }
.route-list h3 { margin: 6px 0 8px; }
.route-list p { color: var(--ink-2); font-size: .96em; }
@media (max-width: 900px) {
  .route-list { grid-template-columns: 1fr; }
  .route-list::before { left: 7px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 2px dashed var(--accent); }
  .route-list li { padding: 0 0 26px 38px; }
}

/* cases */
.cases { padding-top: clamp(56px, 8vw, 110px); padding-bottom: clamp(40px, 6vw, 80px); }
.case {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(22px, 4vw, 56px); align-items: center;
  margin-bottom: clamp(44px, 7vw, 90px);
}
.case picture img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.case:first-of-type picture img { aspect-ratio: 5/4; object-position: 50% 30%; }
.case-r picture { order: 2; }
.case-who { font-size: var(--step--1); color: var(--muted); margin-bottom: 8px; }
.sample { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px dashed var(--accent); color: var(--accent); font-size: 12px; font-style: italic; }
.case h3 { font-size: var(--step-2); }
.case-body > p:not(.case-who) { margin-top: 12px; color: var(--ink-2); }
.case dl { display: flex; flex-wrap: wrap; gap: 0; margin: 20px 0 0; border-top: 1px solid var(--line); }
.case dl > div { padding: 10px 22px 0 0; }
.case dt { font-size: 12px; color: var(--muted); }
.case dd { margin: 2px 0 0; font: 600 var(--step-1)/1.2 var(--serif); }
@media (max-width: 800px) { .case { grid-template-columns: 1fr; } .case-r picture { order: 0; } }

/* shop */
.shop { padding-top: clamp(52px, 7vw, 96px); padding-bottom: clamp(72px, 9vw, 136px); background: var(--paper-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 var(--step--1)/1 var(--sans); color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 30px; padding: 9px 14px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tags {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: clamp(16px, 2.4vw, 30px);
}
.tag { display: flex; flex-direction: column; background: var(--paper); position: relative; }
.tag[hidden] { display: none; }
.tag img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.tag-label {
  position: relative; flex: 1; display: flex; flex-direction: column;
  margin: -22px 12px 12px; padding: 14px 14px 12px;
  background: var(--paper); border: 1px dashed var(--ink-2);
  outline: 4px solid var(--paper);
}
.tag-label::before { content: ""; position: absolute; top: 8px; right: 10px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink-2); }
.tag-kind { font-size: 13px; font-style: italic; font-family: var(--serif); color: var(--muted); }
.tag h3 { font-size: 1.12rem; margin: 4px 0 6px; }
.tag-spec { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.tag-price { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 12px 0 10px; padding-top: 8px; border-top: 1px solid var(--line); margin-top: auto; }
.tag-price b { font: 700 1.2rem/1 var(--serif); }
.tag-price small { font-size: 12px; color: var(--muted); text-align: right; }
.tag-buy { display: flex; gap: 8px; }
.step { display: flex; border: 1px solid var(--line); border-radius: 3px; }
.step button { width: 34px; border: 0; background: none; font: 600 1.1rem var(--sans); color: var(--ink); cursor: pointer; }
.step input { width: 46px; border: 0; text-align: center; font: 600 15px var(--sans); background: none; color: var(--ink); -moz-appearance: textfield; }
.step input::-webkit-inner-spin-button { -webkit-appearance: none; }
.tag-add { flex: 1; padding: 9px 10px; font-size: 14px; }
.tag-add.in { background: var(--ok); box-shadow: none; }

/* calc */
.calc { padding-top: clamp(60px, 8.5vw, 118px); padding-bottom: clamp(40px, 5vw, 70px); }
.calc-form {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 22px 48px;
  max-width: 1120px;
}
.calc-form > *:not(.calc-out) { grid-column: 1; }
.calc-out { grid-column: 2; grid-row: 1 / span 4; align-self: start; position: sticky; top: 100px;
  background: var(--ink); color: var(--paper); padding: 22px; border-radius: 2px;
}
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .field > span { display: block; font-weight: 600; margin-bottom: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg label {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; background: var(--paper);
  font-size: .96em;
}
.seg label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper-2); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.checks label { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
output { font-variant-numeric: tabular-nums; }
.calc-k { font-size: 13px; opacity: .72; }
.calc-unit, .calc-total, .calc-days { font: 700 var(--step-2)/1.15 var(--serif); margin: 2px 0 14px; font-variant-numeric: tabular-nums; }
.calc-total { font-size: var(--step-3); }
.calc-out .btn { width: 100%; margin-top: 4px; }
.calc-note { margin-top: 10px; font-size: 13px; opacity: .75; }
@media (max-width: 860px) {
  .calc-form { grid-template-columns: 1fr; }
  .calc-out { grid-column: 1; grid-row: auto; position: static; }
}

/* faq */
.faq { padding-top: clamp(36px, 5vw, 66px); padding-bottom: clamp(50px, 7vw, 88px); border-top: 1px solid var(--line); }
.faq-list { max-width: 860px; border-top: 2px solid var(--ink); }
details { border-bottom: 1px dashed var(--line); }
summary { cursor: pointer; padding: 18px 40px 18px 0; font: 600 var(--step-1)/1.3 var(--serif); list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 400 1.6rem var(--sans); color: var(--accent); }
details[open] summary::after { content: "−"; }
details p { padding: 0 0 20px; color: var(--ink-2); max-width: 64ch; }

/* contacts */
.contacts {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(28px, 5vw, 72px);
  padding-top: clamp(58px, 7.5vw, 104px); padding-bottom: clamp(64px, 10vw, 140px);
  border-top: 1px solid var(--line);
}
.contacts h2 { max-width: 18ch; }
.contact-list { list-style: none; padding: 0; margin: 30px 0 0; }
.contact-list li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.contact-list span { color: var(--muted); font-size: var(--step--1); padding-top: 2px; }
.contact-list a, .contact-list b { font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--accent); }
.lead-inline { background: var(--paper); border: 1px solid var(--ink); padding: clamp(18px, 3vw, 30px); box-shadow: 6px 6px 0 var(--ink); align-self: start; }
.lead-inline h3 { font-size: var(--step-2); margin-bottom: 16px; }
.field { display: block; margin-bottom: 14px; }
.field > span { margin-bottom: 6px; font-size: .95em; }
.field input, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 2px;
  background: var(--paper); color: var(--ink); font: inherit;
}
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 35%, transparent); }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 4px 0 16px; }
.lead-inline .btn { width: 100%; }
@media (max-width: 860px) { .contacts { grid-template-columns: 1fr; } .contact-list li { grid-template-columns: 104px 1fr; } }

.foot { display: flex; flex-wrap: wrap; gap: 8px 30px; justify-content: space-between; padding: 26px var(--gut) 90px; font-size: var(--step--1); color: var(--muted); border-top: 2px solid var(--ink); }

/* basket */
.basket { position: fixed; z-index: 25; left: 50%; bottom: 16px; transform: translateX(-50%); }
.basket button {
  font: 600 var(--step-0)/1 var(--sans); background: var(--ink); color: var(--paper); border: 0; border-radius: 40px;
  padding: 14px 22px; cursor: pointer; box-shadow: 0 10px 30px -10px rgb(0 0 0 / .5); white-space: nowrap;
}
.basket b { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: 20px; padding: 2px 8px; margin: 0 2px; }

/* dialogs */
dialog { border: 1px solid var(--ink); padding: 0; background: var(--paper); color: var(--ink); max-width: min(520px, calc(100vw - 32px)); width: 100%; box-shadow: 8px 8px 0 var(--ink); }
dialog::backdrop { background: rgb(20 16 14 / .55); }
.lead-in, .sent-in { padding: 26px; position: relative; }
.lead-in h3, .sent-in h3 { font-size: var(--step-2); margin-bottom: 14px; padding-right: 30px; }
.x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; background: none; font-size: 1.7rem; line-height: 1; color: var(--ink); cursor: pointer; }
.lead-sum { font-size: 14px; background: var(--paper-2); padding: 10px 12px; margin-bottom: 16px; border-left: 3px solid var(--accent); }
.lead-sum:empty { display: none; }
.lead-sum ul { margin: 0; padding-left: 18px; }
.lead-in .btn { width: 100%; }
.sent { max-width: min(560px, calc(100vw - 32px)); }
.tg, .code { white-space: pre-wrap; word-break: break-word; font: 13px/1.5 ui-monospace, Menlo, monospace; margin: 0 0 14px; padding: 12px 14px; }
.tg { background: oklch(94% .03 230); color: #12202c; border-radius: 10px 10px 10px 2px; }
.code { background: var(--ink); color: var(--paper); }
.sent-k { font-weight: 600; margin-bottom: 6px; }
.sent-note { font-size: 13px; color: var(--muted); }

/* log */
.log {
  position: fixed; z-index: 40; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); max-height: 60vh;
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); font-size: 13px;
}
.log[hidden] { display: none; }
.log-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.log-h button { border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--ink); }
.log ol { list-style: none; margin: 0; padding: 0; overflow: auto; }
.log li { padding: 9px 12px; border-bottom: 1px dashed var(--line); }
.log li b { color: var(--accent); }
.log li code { font: 12px ui-monospace, Menlo, monospace; }
.log-empty { color: var(--muted); }

[data-reveal] { transition: opacity .7s, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(18px); }

/* how.html */
.how { max-width: var(--wrap); margin: 0 auto; padding: clamp(36px, 6vw, 80px) var(--gut) 80px; }
.how section { padding-inline: 0; margin-bottom: clamp(52px, 7vw, 90px); }
.how h1 { font-size: var(--step-4); max-width: 18ch; }
.how .lead { max-width: 52ch; }
.how h2 { margin-bottom: 18px; }
.how p + p { margin-top: 12px; }
.how .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px 36px; }
.box { border: 1px dashed var(--ink-2); padding: 18px 20px; background: var(--paper); }
.box h3 { margin-bottom: 8px; }
.box p, .box li { color: var(--ink-2); }
.box ul { margin: 8px 0 0; padding-left: 18px; }
.alt { background: var(--paper-2); border-style: solid; border-color: var(--line); }
.scheme { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 10px; }
.node {
  font: inherit; text-align: left; color: var(--ink); background: var(--paper); cursor: pointer;
  border: 1px solid var(--ink); margin: 0 -1px -1px 0; padding: 14px 16px;
}
.node b { display: block; font: 600 var(--step-0)/1.2 var(--serif); }
.node small { color: var(--muted); }
.node[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.node[aria-pressed="true"] small { color: var(--paper-3); }
.node-info { margin-top: 16px; padding: 16px 18px; background: var(--paper-2); border-left: 3px solid var(--accent); min-height: 90px; }
@media (max-width: 760px) { .scheme { grid-template-columns: 1fr 1fr; } }
.flow { list-style: none; margin: 0; padding: 0; border-left: 2px dashed var(--accent); }
.flow li { position: relative; padding: 0 0 20px 26px; }
.flow li::before { content: ""; position: absolute; left: -8px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.flow time { font-size: 13px; color: var(--accent); font-weight: 600; }
.pages { columns: 2 260px; column-gap: 40px; padding: 0; list-style: none; margin: 0; }
.pages li { break-inside: avoid; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pages small { display: block; color: var(--muted); }
.mock { border: 1px solid var(--ink); background: var(--paper); max-width: 560px; font-size: 14px; }
.mock-bar { background: #23282d; color: #eee; padding: 7px 12px; font-size: 12px; }
.mock-body { padding: 16px; display: grid; gap: 10px; }
.mock-body label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.mock-body span.inp { display: block; border: 1px solid var(--line); padding: 7px 9px; color: var(--ink); font-size: 14px; background: var(--paper); }
.mock-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mock-btn { justify-self: start; background: #2271b1; color: #fff; padding: 6px 12px; border-radius: 3px; }
.stages { width: 100%; border-collapse: collapse; }
.stages th, .stages td { text-align: left; padding: 12px 10px 12px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.stages th { font-size: 13px; color: var(--muted); border-bottom: 2px solid var(--ink); }
.stages td:nth-child(n+3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.stages tfoot td { font-weight: 700; border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.pay { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--ink); margin-top: 18px; }
.pay > div { padding: 16px; border-right: 1px dashed var(--line); }
.pay > div:last-child { border-right: 0; }
.pay b { display: block; font: 700 var(--step-2)/1.1 var(--serif); }
.pay small { color: var(--muted); }
@media (max-width: 760px) { .pay { grid-template-columns: 1fr 1fr; } .pay > div:nth-child(2) { border-right: 0; } .pay > div:nth-child(-n+2) { border-bottom: 1px dashed var(--line); } }
.need { columns: 2 260px; column-gap: 40px; padding-left: 18px; }
.need li { margin-bottom: 6px; }

@media (max-width: 640px) {
  .demo-bar p { font-size: 12px; }
  .foot { padding-bottom: 100px; }
}
@media print { .demo-bar, .tape, .basket, .log, .top { display: none; } }

/* выкройка: срезанный угол как надсечка на детали */
.hero-main img, .case picture img { clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.js .hero-main img { animation: cut 1.1s cubic-bezier(.6, .05, .2, 1) .15s both; }
@keyframes cut { from { clip-path: polygon(0 0, 0 0, 0 0, 0 100%, 0 100%); } }
.how-photo { margin: 30px 0 0; }
.how-photo img { width: 100%; max-height: 460px; object-fit: cover; clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.how-photo figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
