/* Step — стили сайта (основа взята из Makebase) */

:root {
  --bg: #f7f3ec;
  --bg-alt: #efe8dc;
  --surface: #ffffff;
  --ink: #1f1b16;
  --ink-2: #4a433a;
  --muted: #7a7166;
  --line: #e3d9c9;
  --accent: #7c4a1e;
  --accent-hover: #5f3815;
  --accent-soft: #f4e6d6;
  --wood: #e2b47c;
  --wood-dark: #b98446;
  --wood-light: #f3dcb9;
  --ok: #2f7a4b;
  --ok-soft: #e6f3ea;
  --warn: #a86400;
  --warn-soft: #fdf2dc;
  --err: #b42318;
  --err-soft: #fde8e6;
  --info: #3d5a80;
  --info-soft: #e8eef6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(60, 40, 10, .05), 0 8px 24px -12px rgba(60, 40, 10, .18);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "tnum" 1;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.lead.center { margin-left: auto; margin-right: auto; }
.page-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }

/* --- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .75em 1.3em; border-radius: 999px; border: 0;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.btn-small { padding: .5em 1em; font-size: .9rem; }
.btn-large { padding: .95em 1.8em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--surface); }

/* --- шапка */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 243, 236, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo-mark svg { width: 30px; height: 30px; }
.logo-mark rect { fill: var(--accent); }
.logo-mark path { fill: none; stroke: #fff; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:not(.btn):hover { color: var(--accent); }
@media (max-width: 860px) { .nav a:not(.btn) { display: none; } }

/* --- первый экран */
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } .hero { padding: 80px 0 96px; } }
.hero h1 { max-width: 12em; }
.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px 28px; color: var(--muted); font-size: .9rem; }
.hero-facts strong { display: block; color: var(--ink); font-size: 1.05rem; }
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgba(90, 60, 20, .18)); }
.hero-art .sheet { fill: var(--wood-light); }
.hero-art .grain { fill: none; stroke: var(--wood); stroke-width: .8; opacity: .35; }
.hero-art .part { fill: var(--wood); stroke: var(--wood-dark); stroke-width: 1.2; }
.hero-art .cut { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 5 4; }
.hero-art .tabs rect { fill: var(--wood-light); stroke: var(--wood-dark); stroke-width: .8; }
.hero-art .tool { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.hero-badge {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  background: var(--surface); border-radius: 999px; padding: 8px 16px; box-shadow: var(--shadow);
  font-size: .85rem; font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 8px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 480px) { .hero-badge { font-size: .75rem; padding: 6px 12px; } }

/* --- загрузка файла */
.dropzone { margin-top: 28px; }
.dropzone-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 32px 20px; border: 2px dashed var(--wood); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, transform .15s;
}
.dropzone-inner:hover, .dropzone.is-over .dropzone-inner { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.is-over .dropzone-inner { transform: scale(1.01); }
.dropzone-icon svg { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.dropzone-title { font-weight: 800; font-size: 1.15rem; }
.dropzone-sub { color: var(--muted); font-size: .92rem; }
.dropzone-busy { display: none; font-weight: 700; color: var(--accent); }
.dropzone.is-busy .dropzone-title, .dropzone.is-busy .dropzone-sub, .dropzone.is-busy .dropzone-icon { display: none; }
.dropzone.is-busy .dropzone-busy { display: block; }
.dropzone.is-busy .dropzone-inner { pointer-events: none; border-style: solid; }
.form-error { color: var(--err); font-weight: 600; font-size: .9rem; margin: .5em 0 0; }

/* --- секции */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--ink-2); max-width: 40em; margin-bottom: 28px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card-title { font-size: 1.15rem; margin-bottom: 16px; }

.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 20px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.steps p { color: var(--ink-2); margin: 0; }
.step-num {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; margin-bottom: 14px;
}

.material-card { padding: 0; overflow: hidden; }
.material-head { padding: 22px 24px 6px; }
.material-head h3 { margin-bottom: 2px; }
.table-scroll { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.price-table th, .price-table td { padding: 12px 24px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; }
.price-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.price-table tbody tr:hover { background: #fbf8f3; }
.price-notes { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 800px) { .price-notes { grid-template-columns: repeat(3, 1fr); } }
.price-notes div { display: flex; flex-direction: column; gap: 4px; padding-left: 14px; border-left: 3px solid var(--wood); }
.price-notes span { color: var(--ink-2); font-size: .93rem; }

.file-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .file-grid { grid-template-columns: 1fr 1.4fr; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding: 16px 18px 16px 52px; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); color: var(--ink-2); }
.checklist li::before {
  content: ""; position: absolute; left: 18px; top: 19px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%232f7a4b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.checklist strong { color: var(--ink); }

.cta { background: var(--ink); color: #fff; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta h2 { margin: 0; }

.footer { padding: 32px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }

/* --- страница расчёта */
.configure { padding-top: 36px; }
.configure-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.configure-head .page-title { margin: 0; }
.file-title { word-break: break-word; }
.configure-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 980px) {
  .configure-grid { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); }
  .order-col { position: sticky; top: 84px; }
}
.preview-col, .order-col { display: grid; gap: 24px; min-width: 0; }

.preview-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.segmented { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 4px; }
.segmented button {
  border: 0; background: transparent; font: inherit; font-weight: 700; font-size: .88rem;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--ink-2);
}
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.legend { display: flex; gap: 16px; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.sw-made { background: var(--wood); border: 1.5px solid var(--wood-dark); }
.sw-tool { border: 2px dashed var(--accent); border-radius: 50%; }

.preview {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm);
  background-color: #fcfaf6;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
  overflow: hidden;
}
.preview svg { width: 100%; height: 100%; }
.part-svg path, .part-svg line, .part-svg circle { vector-effect: non-scaling-stroke; }
.layer-drawing path { fill: var(--wood-light); stroke: var(--ink); stroke-width: 1.4; }
.layer-open path { fill: none; stroke: var(--err); stroke-width: 2.2; stroke-dasharray: 6 4; }
.layer-made path { fill: var(--wood); stroke: var(--wood-dark); stroke-width: 1.2; }
.layer-toolpath path { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 6 5; }
.layer-dims line { stroke: var(--muted); stroke-width: 1; }
.layer-dims text { fill: var(--ink-2); font-family: var(--font); font-weight: 700; }
.mark { stroke-width: 2; transition: opacity .15s; }
.mark-error { fill: rgba(180, 35, 24, .18); stroke: var(--err); }
.mark-warning { fill: rgba(168, 100, 0, .16); stroke: var(--warn); }
.preview.has-hot .mark:not(.is-hot) { opacity: .2; }
.mark.is-hot { stroke-width: 3.5; }
.mode-made .layer-drawing { display: none; }
.mode-drawing .layer-made, .mode-drawing .layer-toolpath { display: none; }
.mb-preview .layer-drawing { display: none; }

.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
@media (min-width: 600px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metrics div { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; }
.metrics span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.metrics strong { font-size: 1.02rem; }

.issues { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.issue { padding: 12px 14px 12px 42px; border-radius: var(--radius-sm); position: relative; font-size: .94rem; cursor: default; }
.issue::before {
  position: absolute; left: 13px; top: 11px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff;
}
.issue-error { background: var(--err-soft); }
.issue-error::before { content: "!"; background: var(--err); }
.issue-warning { background: var(--warn-soft); }
.issue-warning::before { content: "!"; background: var(--warn); }
.issue-info { background: var(--info-soft); }
.issue-info::before { content: "i"; background: var(--info); }
.issue-ok { background: var(--ok-soft); }
.issue-ok::before { content: "✓"; background: var(--ok); }

.field { margin: 0 0 18px; border: 0; padding: 0; }
.field > label, .field > legend { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 8px; padding: 0; }
.field input[type=text], .field input[type=tel], .field input[type=email], .field input[type=number], .field textarea {
  width: 100%; font: inherit; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-grid; place-items: center; min-width: 48px; padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); font-weight: 700; transition: all .15s; background: #fff;
}
.chip input:hover + span { border-color: var(--wood-dark); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.stepper button { border: 0; background: var(--bg); width: 44px; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--bg-alt); }
.field .stepper input { width: 84px; border: 0; border-radius: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field .stepper input:focus { box-shadow: none; }

.price-box { transition: opacity .15s; }
.price-box.is-loading { opacity: .5; }
.price-main { display: flex; flex-direction: column; gap: 2px; background: var(--bg); border-radius: var(--radius-sm); padding: 16px 18px; }
.price-label { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.price-value { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.price-sub { color: var(--ink-2); font-size: .9rem; }
.price-unknown .price-value { font-size: 1.5rem; color: var(--warn); }
.breakdown { margin-top: 12px; font-size: .92rem; }
.breakdown summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.breakdown dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 12px 0; }
.breakdown dt { color: var(--ink-2); }
.breakdown dd { margin: 0; font-weight: 700; text-align: right; }

/* --- страница заказа */
.done-badge svg { width: 64px; height: 64px; margin: 0 auto 16px; }
.done-badge circle { fill: var(--ok-soft); }
.done-badge path { fill: none; stroke: var(--ok); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.progress { list-style: none; padding: 0; margin: 32px 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; }
.progress li { position: relative; text-align: center; font-size: .8rem; font-weight: 600; color: var(--muted); padding-top: 34px; }
.progress li::before {
  counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%; background: var(--bg-alt); display: grid; place-items: center; z-index: 1;
}
.progress li + li::after { content: ""; position: absolute; top: 12px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.progress li.is-done { color: var(--ink); }
.progress li.is-done::before { background: var(--ok); color: #fff; content: "✓"; }
.progress li.is-done::after { background: var(--ok); }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; word-break: break-word; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; background: var(--bg-alt); }
.status-new, .status-confirmed, .status-in_work { background: var(--info-soft); color: var(--info); }
.status-clarifying { background: var(--warn-soft); color: var(--warn); }
.status-ready, .status-completed { background: var(--ok-soft); color: var(--ok); }
.status-cancelled { background: var(--err-soft); color: var(--err); }

/* --- шапка: заказ и кабинет */
.nav a.nav-keep { display: inline-flex !important; align-items: center; gap: 6px; }
.nav-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800;
}
@media (max-width: 520px) { .hide-sm { display: none; } .nav { gap: 14px; } .logo { font-size: 1.05rem; } }

.flash-wrap { padding-top: 16px; display: grid; gap: 8px; }
.flash { margin: 0; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: .94rem; background: var(--info-soft); color: var(--info); }
.flash-error { background: var(--err-soft); color: var(--err); }
.flash-success { background: var(--ok-soft); color: var(--ok); }

/* --- заказ из нескольких файлов */
.title-count { font-weight: 600; font-size: .6em; letter-spacing: 0; }
.configure-head .preview-toolbar { margin: 0; }
.items-col { display: grid; gap: 20px; min-width: 0; }
.item { padding: 20px; }
.item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.item-name { font-size: 1.08rem; margin: 0; display: flex; align-items: center; gap: 10px; word-break: break-word; min-width: 0; }
.item-num {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: .85rem; font-weight: 800;
}
.link-btn { border: 0; background: none; padding: 4px 0; font: inherit; font-size: .88rem; font-weight: 600; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--err); }
.item-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .item-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.item-visual { min-width: 0; }
.item-metrics { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
.item-metrics b, .item-metrics [data-m=size] { color: var(--ink); font-weight: 700; }
.item-controls .field { margin-bottom: 14px; }
.item-issues { margin: 16px 0 0; }
.price-item .price-value { font-size: 1.5rem; }
.price-item.price-unknown .price-value { font-size: 1.2rem; }
.order-card.is-loading { opacity: .6; transition: opacity .15s; }

.dropzone-compact { margin-top: 0; }
.dropzone-compact .dropzone-inner { padding: 20px; flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
.dropzone-compact .dropzone-icon svg { width: 30px; height: 30px; margin: 0; }
.dropzone-compact .dropzone-title { font-size: 1rem; }

.sum-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.sum-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .92rem; }
.sum-name { min-width: 0; word-break: break-word; }
.sum-name small { display: block; color: var(--muted); font-size: .8rem; }
.sum-list strong { white-space: nowrap; }
.sum-warn { color: var(--warn); }
.sum-note { margin: 10px 0 0; }
.login-hint { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--ink-2); }

/* --- страница заказа */
.sub-title { font-size: 1.2rem; margin: 32px 0 12px; }
.order-items { padding: 6px 20px; }
.order-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; }
.order-item + .order-item { border-top: 1px solid var(--line); }
.order-item-main { display: flex; flex-direction: column; min-width: 0; }
.order-item-name { word-break: break-word; }
.order-item-price { font-weight: 700; white-space: nowrap; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; display: grid; gap: 14px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.timeline li::before {
  content: ""; position: absolute; left: -22px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--line);
}
.timeline li.is-current::before { background: var(--accent); border-color: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.timeline time { color: var(--muted); font-size: .9rem; }
.claim-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 32px; padding: 18px 20px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* --- вход и кабинет */
.auth-wrap { max-width: 460px; }
.auth-card { padding: 32px 28px; }
.auth-card .page-title { margin-bottom: .3em; }
.auth-alt { margin: 18px 0 6px; text-align: center; font-weight: 600; }
.field-help { margin: 6px 0 0; }
.field input[type=password] {
  width: 100%; font: inherit; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.account-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.account-head .page-title { margin: 0; }
.account-head p { margin: 4px 0 0; }
.order-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px;
  margin-bottom: 14px; padding: 18px 22px; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.order-row:hover { transform: translateY(-1px); box-shadow: 0 1px 2px rgba(60, 40, 10, .05), 0 12px 28px -12px rgba(60, 40, 10, .28); }
.order-row-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; flex: 1 1 260px; }
.order-row-files { flex-basis: 100%; color: var(--ink-2); font-size: .9rem; word-break: break-word; }
.order-row-side { display: flex; align-items: center; gap: 14px; }
.empty-card { text-align: center; padding: 36px 24px; }


/* ============================ Step ============================ */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
.hero-art { padding: 18px; display: grid; gap: 10px; }
.hero-art svg { filter: none; }

/* калькулятор */
.calc { padding-top: 32px; }
.calc-head { margin-bottom: 20px; max-width: 46em; }
.calc-head .page-title { margin-bottom: .25em; }
.calc-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 980px) {
  .calc-grid { grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr); }
  .calc-visual { position: sticky; top: 84px; }
}
.visual-card { padding: 20px; }
.visual-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.visual-head .card-title { margin: 0 0 8px; }
.sw-nosing { background: #9b7442; opacity: .8; }
.plan { background: #fcfaf6; border-radius: var(--radius-sm); padding: 10px; transition: opacity .15s; }
.plan svg { width: 100%; height: auto; max-height: 340px; }
.plan.is-stale { opacity: .45; }
.plan-note { margin: 6px 0 14px; }
.section-view svg { width: 100%; height: auto; max-width: 520px; }
.dims-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.field-hint { margin: 6px 0 0; }
.field input.is-invalid { border-color: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.form-error:empty { display: none; }
.measure-link { margin: -6px 0 18px; }
.chip-wood span { gap: 8px; display: inline-flex; align-items: center; }
.wood-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); display: inline-block; }
.chip-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 700;
}
.chip-link svg { width: 34px; height: 20px; fill: var(--wood-light); stroke: var(--wood-dark); stroke-width: 1.5; }
.chip-link.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-link.is-active svg { fill: var(--wood); stroke: #fff; }
.calc-controls .price-box { margin: 6px 0 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.breakdown dt small { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; }
.mobile-bar { display: none; }
@media (max-width: 979px) {
  .mobile-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; align-items: center; justify-content: space-between;
    gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface);
    box-shadow: 0 -6px 20px -10px rgba(60, 40, 10, .35);
  }
  .mobile-bar div { display: flex; flex-direction: column; line-height: 1.2; }
  .mobile-bar strong { font-size: 1.3rem; }
  body:has(.mobile-bar) .footer { padding-bottom: 96px; }
}

/* корзина */
.cart-item-grid { display: grid; gap: 14px 18px; grid-template-columns: 120px minmax(0, 1fr); align-items: start; }
@media (min-width: 640px) { .cart-item-grid { grid-template-columns: 150px minmax(0, 1fr) auto; } }
.cart-thumb { background: #fcfaf6; border-radius: var(--radius-sm); padding: 6px; }
.cart-thumb svg { width: 100%; height: auto; }
.cart-thumb .dims text { display: none; }
.item-details { list-style: none; padding: 0; margin: 8px 0 12px; color: var(--ink-2); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.cart-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.cart-item-actions form { margin: 0; }
.link-edit { color: var(--accent); }
.link-edit:hover { color: var(--accent-hover); }
.cart-item-price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; grid-column: 1 / -1; }
@media (min-width: 640px) { .cart-item-price { grid-column: auto; } }
.row-total { font-size: 1.3rem; }
.stepper-small button { width: 36px; font-size: 1.1rem; }
.stepper-small input { width: 56px; border: 0; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.cart-item.is-broken { box-shadow: inset 0 0 0 2px var(--err-soft), var(--shadow); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field input[type=file] { font: inherit; font-size: .9rem; }
.timeline-note { flex-basis: 100%; color: var(--ink-2); font-size: .9rem; }

/* статусы */
.status-awaiting_payment { background: var(--warn-soft); color: var(--warn); }
.status-in_production { background: var(--info-soft); color: var(--info); }

/* информационные страницы */
.prose h2 { font-size: 1.35rem; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--ink-2); }
.prose li { margin-bottom: .4em; }
.prose p { color: var(--ink-2); }
.measure-figure { margin: 24px 0; }
.measure-figure svg { width: 100%; height: auto; }
.contact-card p { margin-bottom: 1.2em; }
.contact-big { font-size: 1.6rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.messengers-big { display: flex; flex-wrap: wrap; gap: 10px; }
.faq { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }

/* подвал */
.footer-grid { display: grid; gap: 20px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-links a, .messengers a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.footer-links a:hover, .messengers a:hover { color: var(--accent); }
.footer-contacts { display: flex; flex-direction: column; gap: 6px; }
.footer-phone { font-size: 1.15rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.messengers { display: flex; gap: 14px; }

[hidden] { display: none !important; }
.calc-grid, .configure-grid, .hero-grid, .file-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) {
  .calc-grid { grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr); }
  .configure-grid { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); }
}
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
@media (min-width: 900px) { .file-grid { grid-template-columns: 1fr 1.4fr; } }
@media (max-width: 520px) { .nav a.nav-keep.hide-sm { display: none !important; } }
