/* A native, guided visit: a single next action and the company's real result. */
body.demo-visit-page { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.6 var(--sans); }
.demo-visit { max-width: 1180px; margin: 0 auto; padding: 28px 32px 48px; overflow-wrap: anywhere; }
.demo-visit *, .demo-visit *::before, .demo-visit *::after { box-sizing: border-box; }
.dv-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.dv-top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.dv-top form { margin: 0; }
.dv-intro { max-width: 800px; padding-top: 28px; }
.demo-visit h1 { max-width: 22em; font-size: clamp(28px, 4vw, 42px); line-height: 1.18; letter-spacing: -.025em; text-wrap: balance; }
.demo-visit h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.015em; }
.demo-visit h3 { font-size: 18px; line-height: 1.35; }
.dv-lead, .dv-hint { color: var(--muted); }
.dv-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 24px; margin: 24px 0 28px; padding: 0; list-style: none; counter-reset: demo-step; }
.dv-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); counter-increment: demo-step; }
.dv-steps li::before { content: counter(demo-step); display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--shade); color: var(--forest); font: 600 13px/1 var(--mono); }
.dv-steps [aria-current=step] { color: var(--forest); font-weight: 700; }
.dv-steps [aria-current=step]::before { color: var(--on-forest); background: var(--forest); }
.dv-columns { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; gap: 24px; }
.dv-columns > * { min-width: 0; }
.dv-card { padding: 26px; border: 1px solid var(--card-edge); border-radius: 16px; background: var(--sheet); box-shadow: var(--card-shadow); }
.dv-card > :last-child { margin-bottom: 0; }
.dv-card label { display: block; margin-block: 12px; font-weight: 600; }
.dv-card textarea, .dv-card input:not([type=checkbox]):not([type=radio]), .dv-card select { display: block; width: 100%; max-width: 100%; padding: 12px; margin-top: 8px; border: 1px solid var(--card-edge); border-radius: 10px; color: var(--ink); background: var(--sheet); font: inherit; font-weight: 400; }
.dv-card textarea { min-height: 112px; resize: vertical; }
.dv-card .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.dv-card .check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--forest); }
.dv-card ol:not(.dv-steps), .dv-card ul { padding-left: 24px; }
.dv-card li { margin-block: 12px; }
.dv-card details > summary { min-height: 44px; padding-block: 10px; cursor: pointer; }
.dv-card form + form { margin-top: 16px; }
.demo-visit .btn, .demo-visit button { max-width: 100%; white-space: normal; text-align: center; }
/* the next action's forest face; its outline and shimmer are every demo's own (brand.css .dv-next) — the client's lime
   «Согласовать выбранное» keeps its lime */
.demo-visit .dv-next:not(.lime) { background-color: var(--forest); color: var(--on-forest); border-color: var(--forest); }
.demo-visit .dv-next:not(.lime):hover { background-color: var(--forest-deep); }
.dv-summary { padding-top: 16px; border-top: 1px solid var(--rule); }
.dv-summary strong, .dv-time { font-family: var(--mono); font-weight: 600; }
.dv-result { padding: 16px 20px; border-radius: 12px; background: var(--ok-tint); color: var(--ok); }
.dv-result p, .dv-error p { color: inherit; }
.dv-error { padding: 16px 20px; border: 1px solid var(--error-edge); border-radius: 12px; background: var(--error-tint); color: var(--error); }
.dv-finale { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin-top: 24px; padding: 24px 26px; border: 1px solid var(--card-edge); border-radius: 16px; background: var(--sheet); }
.dv-finale p { margin: 0; }
.demo-site .dv-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-layouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ds-layout-card { display: flex; flex-direction: column; min-width: 0; }
.ds-layout-card .site-layout-sketch { width: 108px; height: 112px; gap: 8px; padding: 10px; }
.ds-layout-card form { margin-top: auto; padding-top: 16px; }
.ds-layout-card .btn { width: 100%; }
.ds-preview-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block: 20px; }
.ds-preview-controls form { margin: 0; }
.ds-preview-controls [data-demo-site-width] { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.ds-preview-controls [data-demo-site-width] label { margin: 0; }
.ds-preview { max-width: 100%; margin: 24px auto; overflow: auto; background: var(--sheet); border: 1px solid var(--card-edge); border-radius: 16px; }
.ds-preview:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.ds-preview iframe { display: block; width: 100%; height: 760px; border: 0; background: var(--sheet); }
.ds-preview.ds-phone { width: 390px; border: 8px solid var(--forest); border-radius: 28px; }
.ds-preview.ds-desktop iframe { min-width: 960px; }
/* The decision demo: an hours table that scrolls inside itself, an inert message example. */
.demo-decision .dd-table { max-width: 100%; margin: 20px 0; overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; }
.demo-decision .dd-table:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.demo-decision .dd-table table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; }
.demo-decision .dd-table th, .demo-decision .dd-table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--sheet); text-align: left; vertical-align: top; white-space: nowrap; }
.demo-decision .dd-table thead th { background: var(--shade); color: var(--forest); font-weight: 600; }
.demo-decision .dd-table tr > :first-child { position: sticky; left: 0; z-index: 1; min-width: 8.5em; white-space: normal; box-shadow: 1px 0 0 var(--rule); }
.demo-decision .dd-table tbody tr:last-child > * { border-bottom: 0; }
.demo-decision .dd-table small { display: block; color: var(--muted); font-size: 13px; }
.dd-section { margin-top: 32px; }
.dd-windows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dd-windows .dv-card { display: flex; flex-direction: column; }
.demo-decision .dd-windows h3 { margin-top: 0; }
.dd-windows form { margin-top: auto; padding-top: 12px; }
.dd-windows .btn { width: 100%; }
.demo-decision .dv-card h3 { margin: 24px 0 10px; }
.dd-starts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 10px; }
.demo-decision .dd-starts form, .dd-finale-actions form { margin: 0; }
.dd-starts .btn { width: 100%; min-height: 44px; padding: 9px 14px; font-size: 15px; }
.demo-decision .dv-card .check { font-size: 15px; }
.dd-note { padding: 14px 18px; border-radius: 12px; background: var(--warn-tint); color: var(--warn); }
.dd-message { max-width: 34em; margin: 20px 0 8px; padding: 16px 18px; border: 1px solid var(--card-edge); border-radius: 16px 16px 16px 4px; background: var(--shade); }
.dd-message p { margin: 0; white-space: pre-line; }
.dd-message .dd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dd-chip { display: inline-block; padding: 8px 14px; border: 1px dashed var(--card-edge); border-radius: 8px; background: var(--sheet); color: var(--muted); font-weight: 600; }
.dd-finale-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
@media (max-width: 760px) {
  .demo-visit { padding: 20px 16px 32px; }
  .dv-top { align-items: flex-start; gap: 16px; }
  .dv-intro { padding-top: 24px; }
  .dv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 20px; }
  .dv-steps li { font-size: 14px; gap: 8px; }
  .dv-columns { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dv-card { padding: 20px; }
  .dv-finale { padding: 20px; }
  .demo-visit .dv-next { width: 100%; }
  .ds-layouts { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ds-layout-card { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 8px 12px; }
  .ds-layout-card .site-layout-sketch { grid-row: 1 / 3; width: 60px; height: 72px; gap: 5px; padding: 6px; }
  .ds-layout-card h3, .ds-layout-card p { margin: 0; }
  .ds-layout-card p { font-size: 14px; line-height: 1.5; }
  .ds-layout-card form { grid-column: 1 / -1; padding-top: 8px; }
  .ds-preview.ds-phone { border-width: 6px; }
  .demo-site .dv-steps { gap: 10px; }
  .demo-site .dv-steps li { flex-direction: column; align-items: flex-start; font-size: 13px; }
  .dd-windows { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .demo-decision .dd-table th, .demo-decision .dd-table td { padding: 8px 10px; }
  .demo-decision .dd-table tr > :first-child { min-width: 7em; max-width: 7.5em; }
}
/* The guided estimate (app/demo_estimate.py): the mechanic's screen beside the client's phone, the current side marked first on a phone. */
.de-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); align-items: start; gap: 24px; }
.de-columns > * { min-width: 0; }
.de-client { padding: 26px; border: 1px solid var(--card-edge); border-radius: 16px; background: var(--sheet); box-shadow: var(--card-shadow); }
.de-active { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest), var(--card-shadow); }
.de-hint { padding: 10px 14px; border-left: 3px solid var(--forest); border-radius: 4px; background: var(--shade); color: var(--ink); font-weight: 600; }
.de-voice { padding: 12px 16px; border-radius: 12px; background: var(--shade); }
.de-voice span, .de-wait { color: var(--muted); }
.dv-card .de-lines { padding: 0; list-style: none; }
.dv-card .de-lines li { margin-block: 6px; }
.de-total { color: var(--ink); font-weight: 700; }
.de-message { padding: 14px 16px; border: 1px solid var(--card-edge); border-radius: 12px; background: var(--paper); }
.de-test { padding: 10px 14px; border: 1px dashed var(--card-edge); border-radius: 10px; color: var(--muted); font-size: 15px; }
.de-phone { max-width: 390px; margin: 16px auto 0; padding: 18px 14px; border: 8px solid var(--forest); border-radius: 28px; background: var(--paper); }
.de-phone .est-head h3 { margin: 4px 0 0; font-size: 21px; }
.de-phone .est-sheet { margin-top: 14px; padding: 16px 14px; }
.de-phone .est-actions { grid-template-columns: minmax(0, 1fr); }
.de-phone .est-actions .btn { width: 100%; padding-inline: 12px; }
.de-phone .est-line > .est-what { grid-row: span 2; }
.de-phone .payment-methods { margin: 12px 0; padding: 8px 12px; }
.de-phone .payment-methods label.check { margin: 6px 0; }
@media (max-width: 760px) {
  .de-columns { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .de-active { order: -1; }
  html:has(.demo-estimate) { scroll-padding-top: 8px; scroll-behavior: auto; }
  .de-client { padding: 16px 12px; }
  .de-hint { padding: 8px 12px; font-size: 15px; line-height: 1.45; }
  .de-phone { padding: 10px 8px; border-width: 6px; border-radius: 22px; }
  .de-phone .est-head h3 { font-size: 18px; line-height: 1.25; }
  .de-phone .est-sheet { margin-top: 10px; padding: 12px 10px; }
  .de-phone .est-line { padding: 6px 0; }
  .de-phone .est-total { margin-top: 10px; padding-top: 8px; }
  .de-phone .est-consent { padding: 8px 12px; }
  .de-phone .est-actions .btn { padding-inline: 8px; font-size: 15px; }
}
@media (max-width: 360px) {
  .de-client { padding: 14px 6px; }
  .de-phone { padding: 6px 2px; border-width: 3px; border-radius: 16px; }
  .de-phone .est-sheet { padding: 10px 8px; }
  .de-phone .est-line { column-gap: 8px; }
  .de-phone .est-pick { gap: 8px; }
  .de-phone .est-title { font-size: 15px; }
  .de-phone .est-price { font-size: 14px; }
  .de-phone .est-line.later .est-what { padding-left: 30px; }
}
