/* ============================================================
   WORKS GALLERY — /works/, /works/<field>/, /works/<work>/
   ============================================================
   Loaded only on the gallery pages, after styles.css, so it reuses the
   site's tokens (colours, radii, spacing, type) and never touches the rest
   of the site. Order: tokens → head and fields → tiles → archive → shared
   blocks → work page → gallery → lightbox → diagrams → motion → print.

   Contracts kept from styles.css: no text truncation, no fixed heights on
   text, every interactive target at least 44px, both themes through tokens
   only, everything readable with motion reduced and without JavaScript.
   ============================================================ */

.page-works {
  --w-gap: clamp(16px, 2vw, 28px);
  --w-row-gap: clamp(28px, 3.4vw, 44px);
  --w-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --w-scrim: rgba(17, 17, 15, 0.66);
  --w-lift: 0 2px 4px rgba(0, 0, 0, 0.05), 0 22px 44px -26px rgba(28, 26, 23, 0.42);
}
html.dark .page-works {
  --w-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 22px 44px -26px rgba(0, 0, 0, 0.8);
}

/* ---------------------------------------------------------- head */
.works-head { padding-block: clamp(28px, 4vw, 64px) clamp(20px, 2.6vw, 36px); }
.works-head h1 { max-width: 17ch; }
.works-head .page-head__lead { margin-bottom: 0; }
.works-head__stats { margin: var(--s-5) 0 0; color: var(--ink-3); }

/* ---------------------------------------------------------- fields */
.works-groups { border-block: var(--line-w-1) solid var(--line); }
.works-groups__row {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  padding-block: var(--s-4);
}
.works-groups a {
  flex: none;
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4);
  border: var(--line-w-1) solid var(--line-strong); border-radius: var(--radius-pill);
  color: var(--ink-2); text-decoration: none;
  font-size: var(--text-sm); line-height: 1.2; white-space: nowrap;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}
.works-groups a .mono { color: var(--ink-3); font-size: 0.75rem; letter-spacing: 0.04em; }
.works-groups a:hover { border-color: var(--ink); color: var(--ink); }
.works-groups a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.works-groups a[aria-current="page"] .mono { color: color-mix(in srgb, var(--bg) 72%, transparent); }

@media (max-width: 760px) {
  /* One swipeable row on phones: seven fields would otherwise take half a screen. */
  .works-groups__row {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent);
  }
  .works-groups__row::-webkit-scrollbar { display: none; }
}

/* ---------------------------------------------------------- tiles */
.works-showcase { padding-block: clamp(28px, 4vw, 56px) var(--space); }
.works-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--w-row-gap) var(--w-gap);
}
.work-tile { grid-column: span 2; min-width: 0; }
.work-tile--lead { grid-column: span 3; }
/* Tiles after the two leads are laid out when they come near the viewport:
   the gallery's layout work at load halves on a phone. `auto` keeps the
   real height once a tile has been rendered, so the scrollbar stays put. */
.work-tile:not(.work-tile--lead) { content-visibility: auto; contain-intrinsic-size: auto 440px; }
.work-tile--cta { grid-column: span var(--cta-span, 2); }

@media (max-width: 1099px) {
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-tile, .work-tile--lead { grid-column: span 1; }
  /* The call-to-action closes the grid: it fills the last free cell, or takes
     a full row when the tiles already end on an even row. */
  .work-tile--cta { grid-column: span 1; }
  .work-tile--cta:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .works-grid { grid-template-columns: minmax(0, 1fr); }
  .work-tile--cta, .work-tile--cta:nth-child(odd) { grid-column: auto; }
}

.work-tile__link {
  display: grid; gap: var(--s-4); align-content: start;
  height: 100%;
  color: inherit; text-decoration: none;
  border-radius: var(--radius);
}
.work-tile__link:focus-visible { outline: none; }
.work-tile__link:focus-visible .work-tile__media { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.work-tile__media {
  position: relative; display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden; isolation: isolate;
  background: var(--media-color, var(--bg-sunken));
  box-shadow: var(--shadow);
  transition: box-shadow 260ms var(--w-ease), transform 260ms var(--w-ease);
}
.work-tile__media picture { display: block; width: 100%; height: 100%; }
.work-tile__media img {
  width: 100%; height: 100%; max-inline-size: none;
  object-fit: cover;
  transition: transform 700ms var(--w-ease);
}
.work-tile__link:hover .work-tile__media { box-shadow: var(--w-lift); }

/* Live preview layers sit over the cover and fade in only once they can play. */
.work-tile__video,
.work-tile__frames {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; transition: opacity 320ms ease;
  pointer-events: none;
}
.work-tile__video { object-fit: cover; }
.work-tile.is-previewing .work-tile__video.is-ready,
.work-tile.is-previewing .work-tile__frames { opacity: 1; }
.work-tile__frames picture { position: absolute; inset: 0; opacity: 0; transition: opacity 420ms ease; }
.work-tile__frames picture.is-active { opacity: 1; }

.work-tile__cue {
  position: absolute; right: var(--s-3); bottom: var(--s-3); z-index: 2;
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--w-scrim); color: #fff;
  transition: opacity 200ms ease;
}
.work-tile__cue svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.work-tile.is-previewing .work-tile__cue { opacity: 0; }
html:not(.js) .work-tile__cue { display: none; }

.work-tile__badge {
  position: absolute; left: var(--s-3); top: var(--s-3); z-index: 2;
  padding: 5px 10px; border-radius: var(--radius-pill);
  background: rgba(250, 248, 242, 0.94); color: #1c1a17;
  font: 600 0.72rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.work-tile--diagram .work-tile__media { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.work-tile--diagram .work-tile__link:hover .work-tile__media { box-shadow: inset 0 0 0 1px var(--line-strong), var(--w-lift); }
.work-tile__media--diagram .work-diagram { width: 100%; height: 100%; }

.work-tile__body { display: grid; gap: 6px; align-content: start; padding-inline: 2px; }
.work-tile__meta {
  display: flex; flex-wrap: wrap; gap: 2px 0;
  color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em;
}
.work-tile__meta span + span::before { content: '·'; margin-inline: 0.6em; }
.work-tile__title {
  margin: 0;
  font-size: clamp(1.14rem, 1.1vw + 0.5rem, 1.34rem); line-height: 1.22; letter-spacing: -0.016em;
  color: var(--ink);
  transition: color 160ms ease;
}
.work-tile--lead .work-tile__title { font-size: clamp(1.28rem, 1.5vw + 0.5rem, 1.7rem); line-height: 1.16; }
.work-tile__link:hover .work-tile__title { color: var(--signal-ink); }
.work-tile__hook { color: var(--ink-2); font-size: var(--text-sm); line-height: 1.5; max-width: 56ch; }

.work-tile--cta {
  display: grid; align-content: center; justify-items: start; gap: var(--s-3);
  padding: clamp(24px, 3vw, 40px);
  border: var(--line-w-1) dashed var(--line-strong); border-radius: var(--radius);
}
.work-tile__cta-title { margin: 0; font-size: clamp(1.3rem, 1.5vw + 0.4rem, 1.7rem); font-weight: 650; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.work-tile__cta-text { margin: 0; color: var(--ink-2); }
.work-tile--cta .text-link { min-height: 44px; }

/* ---------------------------------------------------------- archive */
.works-archive { padding-block: var(--space) 0; border-top: var(--line-w-1) solid var(--line); }
.works-archive .section-heading h2 { max-width: 22ch; }
.archive-group + .archive-group { margin-top: clamp(36px, 4.4vw, 60px); }
.archive-group__title {
  display: flex; align-items: baseline; gap: var(--s-3);
  margin: 0 0 var(--s-4); font-size: var(--text-xl);
}
.archive-group__title a { color: var(--ink); text-decoration: none; }
.archive-group__title a:hover { color: var(--signal-ink); }
.archive-group__title .mono { color: var(--ink-3); font-weight: 400; }
.archive-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 0 var(--w-gap);
  border-top: var(--line-w-1) solid var(--line);
}
.archive-row {
  display: grid; gap: 6px; align-content: start;
  max-width: none; padding: var(--s-5) 0;
  border-bottom: var(--line-w-1) solid var(--line);
  scroll-margin-top: 96px;
}
.archive-row:target { box-shadow: inset 3px 0 0 var(--signal); padding-left: var(--s-4); }
.archive-row__title { margin: 0; font-size: var(--text-md); font-weight: 620; line-height: 1.3; letter-spacing: -0.01em; }
.archive-row__text { margin: 0; color: var(--ink-2); font-size: var(--text-sm); line-height: 1.55; }
.archive-row__kind { margin: 0; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.archive-row__related { margin: var(--s-1) 0 0; font-size: var(--text-sm); }
.archive-row__related .text-link { display: inline; }
.archive-row__related .text-link svg { display: inline-block; vertical-align: -3px; }

/* ---------------------------------------------------------- shared blocks */
.works-similar { padding-block: clamp(56px, 7vw, 104px); border-top: var(--line-w-1) solid var(--line); }
.works-similar__inner {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--s-6) clamp(32px, 6vw, 96px); align-items: start;
}
.works-similar__inner h2 { grid-row: span 2; margin: 0; max-width: 15ch; font-size: clamp(1.7rem, 2.4vw + 0.4rem, 2.6rem); }
.works-similar__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.works-similar__list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--s-3); max-width: none; font-size: var(--text-md); line-height: 1.5; }
.works-similar__list svg { width: 20px; height: 20px; margin-top: 3px; fill: none; stroke: var(--signal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.works-similar__inner .btn { justify-self: start; }
@media (max-width: 860px) {
  .works-similar__inner { grid-template-columns: minmax(0, 1fr); }
  .works-similar__inner h2 { grid-row: auto; }
}

.works-custom { padding-block: var(--space); }
.works-custom__inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--s-6) clamp(32px, 5vw, 88px); align-items: start;
  padding: clamp(24px, 4.4vw, 64px);
  border-radius: var(--radius-lg);
  background: var(--bg-elev); box-shadow: var(--shadow);
}
.works-custom__text h2 { margin-bottom: var(--s-4); font-size: clamp(1.7rem, 2.4vw + 0.4rem, 2.6rem); max-width: 16ch; }
.works-custom__text p { color: var(--ink-2); }
.works-custom__note { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--s-3); margin: var(--s-5) 0 0; font-size: var(--text-sm); line-height: 1.5; }
.works-custom__note svg { width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--outcome); stroke-width: 2; }
.works-custom__form { display: grid; gap: var(--s-5); }
.works-custom__form .btn { justify-self: start; }
.works-custom__noscript { margin: 0; }
html:not(.js) .works-custom__form { display: none; }
.works-field { display: grid; gap: var(--s-2); }
.works-field label { font-size: var(--text-sm); font-weight: 600; }
.works-field select,
.works-field textarea,
.works-field input {
  width: 100%; min-height: 48px;
  padding: 12px 14px;
  border: var(--line-w-1) solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.45;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.works-field textarea { resize: vertical; min-height: 120px; }
.works-field select {
  appearance: none; padding-right: 44px; cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
.works-field select:hover, .works-field textarea:hover, .works-field input:hover { border-color: var(--ink-3); }
.works-field select:focus-visible, .works-field textarea:focus-visible, .works-field input:focus-visible {
  outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft);
}
.works-field textarea[aria-invalid="true"] { border-color: var(--signal-ink); }
.works-field__error { margin: 0; color: var(--signal-ink); font-size: var(--text-sm); }
@media (max-width: 860px) {
  .works-custom__inner { grid-template-columns: minmax(0, 1fr); }
}

.works-cases { padding-block: 0 var(--space); }
.works-cases__link {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-4) var(--s-6);
  padding: clamp(20px, 3vw, 32px);
  border: var(--line-w-1) solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.works-cases__link:hover { border-color: var(--signal); background: var(--signal-soft); }
.works-cases__text { display: grid; gap: var(--s-2); max-width: 72ch; }
.works-cases__text strong { font-size: var(--text-lg); line-height: 1.3; letter-spacing: -0.01em; }
.works-cases__text span { color: var(--ink-2); font-size: var(--text-sm); line-height: 1.55; }

/* ---------------------------------------------------------- work page */
.work-head { padding-block: clamp(28px, 4vw, 56px) clamp(28px, 3.4vw, 48px); }
.work-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin: 0 0 var(--s-5); max-width: none; }
.work-head__meta a { color: var(--ink-2); text-decoration: none; text-transform: uppercase; letter-spacing: 0.08em; min-height: 32px; display: inline-flex; align-items: center; }
.work-head__meta a:hover { color: var(--signal-ink); }
.work-kind {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px;
  border-radius: var(--radius-pill);
  font: 600 0.72rem/1 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap;
}
.work-kind--client { background: var(--ink); color: var(--bg); }
.work-kind--own { background: var(--signal-soft); color: var(--signal-ink); }
.work-kind--demo { border: var(--line-w-1) solid var(--line-strong); color: var(--ink); }
.work-head__title { max-width: 22ch; margin-bottom: var(--s-5); font-size: clamp(2.1rem, 3.6vw + 0.6rem, 3.9rem); }
.work-head__lead { max-width: 66ch; margin: 0; color: var(--ink-2); font-size: var(--text-md); }
.work-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: var(--s-4) var(--s-5);
  max-width: 1000px; margin: clamp(28px, 3.4vw, 44px) 0 0; padding: 0;
}
.work-facts > div { padding-left: var(--s-4); border-left: 2px solid var(--line-strong); min-width: 0; }
.work-facts > div:first-child { border-left-color: var(--signal); }
.work-facts dt { font-size: clamp(1.5rem, 1.6vw + 0.8rem, 2.15rem); font-weight: 680; line-height: 1.1; letter-spacing: -0.03em; }
.work-facts dd { margin: 6px 0 0; color: var(--ink-2); font-size: var(--text-sm); line-height: 1.4; }
.work-head__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: clamp(28px, 3.4vw, 40px); }
@media (max-width: 560px) {
  .work-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-head__actions .btn { flex: 1 1 100%; justify-content: center; }
}

.work-stage-wrap { margin-bottom: clamp(48px, 6vw, 96px); }
.work-stage { margin: 0; }
.work-stage__frame {
  position: relative; display: block;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--media-color, var(--bg-sunken));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 34px 70px -40px rgba(0, 0, 0, 0.5);
}
.work-stage__frame picture, .work-stage__frame img, .work-stage__frame video { display: block; width: 100%; height: auto; }
.work-stage__frame--zoom { cursor: zoom-in; }
.work-stage__frame--zoom:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px; }
.work-stage--video .work-stage__frame { background: #0d0d0c; }
.work-stage__video { width: 100%; height: 100%; object-fit: contain; }
.work-stage--diagram .work-stage__frame { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.work-stage--diagram .work-diagram { width: 100%; height: auto; }
.work-stage__scroll-hint { display: none; }
@media (max-width: 760px) {
  /* Scaled to a phone, the labels would be 5–8 px. The diagram keeps a
     legible width instead and scrolls sideways inside its frame. */
  .work-stage--diagram .work-stage__frame { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .work-stage--diagram .work-diagram { width: 760px; max-inline-size: none; }
  .work-stage__scroll-hint { display: block; margin: var(--s-2) 0 0; color: var(--ink-3); font-size: var(--text-sm); }
}

.work-stage__frame--demo { aspect-ratio: 16 / 10; }
.work-stage__frame--demo .work-stage__poster,
.work-stage__frame--demo .work-stage__poster img { width: 100%; height: 100%; object-fit: cover; }
.work-stage__frame--demo.is-launchable { cursor: pointer; }
.work-stage__frame--demo.is-launchable::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.32));
}
.work-stage__launch {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  translate: -50% -50%; white-space: nowrap;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.6);
}
.work-stage__launch[aria-busy="true"] { cursor: progress; }
/* Mounted demos bring their own surface (the avatar adds its button row). */
.work-stage__frame--demo[data-mounted] { aspect-ratio: auto; background: transparent; box-shadow: none; overflow: visible; border-radius: 0; }
.work-stage__frame--demo[data-mounted="house-viewer"] { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-lg); background: #1a1a18; }
/* The 3D viewer fills the 16:10 frame; it measures its container on mount. */
.work-stage__demo--house-viewer { position: absolute; inset: 0; }
.work-stage__frame--demo[data-mounted="house-viewer"]:has(canvas:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
/* The drawing viewer brings its own toolbar, layer list and status bar. */
.work-stage__frame--demo[data-mounted="cad-viewer"] { overflow: hidden; border-radius: var(--radius-lg); background: var(--bg-elev); box-shadow: var(--shadow); }
/* The editor desk is a dark app window: monitor, inspector, transport, timeline. */
.work-stage__frame--demo[data-mounted="video-editor"] { overflow: hidden; border-radius: var(--radius-lg); background: #101215; box-shadow: var(--shadow); }
.work-stage__frame--demo[data-mounted] .work-stage__poster,
.work-stage__frame--demo[data-mounted] .work-stage__launch { display: none; }
.work-stage__frame--demo[data-mounted]::after { display: none; }
.work-stage__hint { margin: var(--s-3) 0 0; color: var(--ink-3); font-size: var(--text-sm); line-height: 1.5; max-width: 90ch; }
html:not(.js) .work-stage__hint { display: none; }
.work-stage__fallback { margin: var(--s-2) 0 0; color: var(--risk); font-size: var(--text-sm); }
@media (max-width: 639px) {
  .work-stage__frame { border-radius: var(--radius); }
  .work-stage__launch { font-size: var(--text-sm); }
}

.work-body { padding-block: 0 clamp(56px, 7vw, 104px); }
.work-body__grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(260px, 4fr);
  gap: var(--s-7) clamp(40px, 6vw, 112px); align-items: start;
}
.work-block + .work-block { margin-top: clamp(36px, 4vw, 56px); }
.work-block h2 { margin-bottom: var(--s-4); font-size: clamp(1.4rem, 1.2vw + 0.8rem, 1.85rem); }
.work-block > p { margin: 0; font-size: var(--text-md); }
.work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.work-list > li { position: relative; padding-left: 28px; font-size: var(--text-md); line-height: 1.55; }
.work-list > li::before {
  content: ''; position: absolute; left: 3px; top: 0.62em;
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--signal);
}
.work-list--proof > li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--s-3); padding-left: 0; }
.work-list--proof > li::before { display: none; }
.work-list--proof svg { width: 20px; height: 20px; margin-top: 4px; fill: none; stroke: var(--outcome); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.work-body__aside { display: grid; gap: var(--s-6); position: sticky; top: 96px; }
.work-aside__item h2 {
  margin: 0 0 var(--s-3);
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500; line-height: 1.4;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
}
.work-aside__item p { margin: 0; font-size: var(--text-base); line-height: 1.55; }
.work-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.work-tools li { padding: 4px 10px; border: var(--line-w-1) solid var(--line-strong); border-radius: var(--radius-sm); font-size: var(--text-sm); line-height: 1.4; }
.work-files, .work-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.work-file {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: var(--s-3); align-items: center;
  padding: 10px 14px 10px 10px;
  border-radius: var(--radius); background: var(--bg-elev); box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
  transition: box-shadow 200ms ease;
}
.work-file:hover { box-shadow: var(--w-lift); }
.work-file__icon {
  display: grid; place-items: center; height: 52px;
  border-radius: var(--radius-sm); background: var(--signal-soft); color: var(--signal-ink);
  font-weight: 700; letter-spacing: 0.04em;
}
.work-file__text { display: grid; gap: 2px; min-width: 0; }
.work-file__text strong { font-size: var(--text-sm); line-height: 1.35; }
.work-file__text .mono { color: var(--ink-3); }
.work-file:hover strong { color: var(--signal-ink); }
.work-links .text-link { min-height: 44px; }
.work-aside__note {
  display: grid; gap: var(--s-2);
  padding: var(--s-4); border-left: 2px solid var(--line-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-sunken); color: var(--ink-2); font-size: var(--text-sm); line-height: 1.55;
}
.work-aside__note p { margin: 0; }
@media (max-width: 960px) {
  .work-body__grid { grid-template-columns: minmax(0, 1fr); }
  .work-body__aside { position: static; }
}

.work-excerpt { padding-block: clamp(48px, 6vw, 88px); background: var(--bg-sunken); }
.work-excerpt h2 { margin-bottom: var(--s-6); font-size: clamp(1.6rem, 2vw + 0.6rem, 2.4rem); }
.work-excerpt__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--w-gap); }
.work-excerpt blockquote { margin: 0; padding: var(--s-5); border-radius: var(--radius); background: var(--bg-elev); box-shadow: var(--shadow); }
.work-excerpt blockquote .mono { margin: 0 0 var(--s-3); color: var(--signal-ink); text-transform: uppercase; letter-spacing: 0.08em; }
.work-excerpt blockquote p:last-child { margin: 0; font-size: var(--text-md); line-height: 1.6; }

/* Justified rows: every item is as wide as its aspect ratio allows at one
   shared row height, so pictures keep their proportions and read in order. */
.work-gallery { padding-block: clamp(48px, 6vw, 96px); }
.work-gallery__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-5); margin-bottom: var(--s-5); }
.work-gallery__head h2 { margin: 0; font-size: clamp(1.6rem, 2vw + 0.6rem, 2.4rem); }
.work-gallery__head .mono { margin: 0; color: var(--ink-3); }
.work-gallery__grid {
  --row: clamp(110px, 15vw, 210px);
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--s-3);
}
.work-gallery__grid::after { content: ''; flex: 999 1 0; }
.work-gallery__item { flex: var(--ar) 1 calc(var(--ar) * var(--row)); min-width: 0; max-width: 100%; }
.work-gallery__item a {
  position: relative; display: block;
  aspect-ratio: var(--ar);
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--media-color, var(--bg-sunken));
  cursor: zoom-in;
}
.work-gallery__item a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.work-gallery__item picture { display: block; width: 100%; height: 100%; }
.work-gallery__item img { width: 100%; height: 100%; max-inline-size: none; object-fit: cover; transition: transform 600ms var(--w-ease); }
.work-gallery__item a:hover img { transform: scale(1.035); }
.work-gallery__item--crop img { object-position: top center; }
.work-gallery__item--letterbox a { background: var(--paper); }
.work-gallery__item--letterbox img { object-fit: contain; }
.work-gallery__item--video a { cursor: pointer; }
.work-gallery__play {
  position: absolute; inset: 0; margin: auto;
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--w-scrim); color: #fff;
  transition: transform 200ms var(--w-ease), background-color 200ms ease;
}
.work-gallery__play svg { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; }
.work-gallery__item a:hover .work-gallery__play { transform: scale(1.08); background: var(--signal); }
.work-gallery__badge {
  position: absolute; left: var(--s-2); bottom: var(--s-2);
  padding: 3px 8px; border-radius: var(--radius-pill);
  background: var(--w-scrim); color: #fff;
}
@media (max-width: 640px) {
  .work-gallery__badge-text { display: none; }
}

.works-related { padding-block: clamp(56px, 7vw, 104px); border-top: var(--line-w-1) solid var(--line); }
.works-related__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-3) var(--s-6); margin-bottom: var(--s-6); }
.works-related__head h2 { margin: 0; font-size: clamp(1.6rem, 2vw + 0.6rem, 2.4rem); }

.work-pager { border-top: var(--line-w-1) solid var(--line); }
.work-pager__inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-pager__link {
  display: grid; gap: var(--s-2); align-content: start;
  padding: var(--s-6) var(--s-5) var(--s-6) 0;
  color: inherit; text-decoration: none; min-width: 0;
}
.work-pager__link--next { padding: var(--s-6) 0 var(--s-6) var(--s-5); text-align: right; box-shadow: inset 1px 0 0 var(--line); }
.work-pager__link .mono { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.work-pager__link strong { font-size: var(--text-lg); line-height: 1.25; letter-spacing: -0.012em; transition: color 160ms ease; }
.work-pager__link:hover strong { color: var(--signal-ink); }
@media (max-width: 640px) {
  .work-pager__inner { grid-template-columns: minmax(0, 1fr); }
  .work-pager__link, .work-pager__link--next { padding: var(--s-5) 0; text-align: left; }
  .work-pager__link--next { box-shadow: inset 0 1px 0 var(--line); }
}

/* ---------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: #0d0d0c; color: #f2f0ec;
  overscroll-behavior: contain;
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox::backdrop { background: rgba(12, 12, 11, 0.6); }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 10px 12px 10px 20px; }
.lightbox__counter { font: 500 0.82rem/1 var(--mono); letter-spacing: 0.06em; color: rgba(242, 240, 236, 0.72); }
.lightbox__actions { display: flex; gap: var(--s-2); }
.lightbox__btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); color: #fff; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.32); }
.lightbox__btn:focus-visible { outline: 2px solid #ff8b73; outline-offset: 2px; }
.lightbox__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__btn[aria-pressed="true"] { background: #f2f0ec; color: #11110f; }
.lightbox__stage {
  position: relative; min-height: 0;
  display: grid; place-items: center;
  padding: 0 clamp(8px, 7vw, 96px);
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.lightbox__media { display: grid; place-items: center; max-width: 100%; max-height: 100%; min-height: 0; }
.lightbox__media picture { display: contents; }
.lightbox__media img,
.lightbox__media video {
  display: block; width: auto; height: auto;
  max-width: 100%; max-height: calc(100dvh - 148px);
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.04);
  background-position: center; background-size: cover; background-repeat: no-repeat;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.7);
}
.lightbox__media video { background: #000; }
.lightbox__nav {
  position: absolute; top: 50%; z-index: 2; translate: 0 -50%;
  width: 52px; height: 52px;
}
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
.lightbox__caption {
  margin: 0 auto; padding: 12px 20px 20px; max-width: 86ch;
  text-align: center; color: rgba(242, 240, 236, 0.84); font-size: var(--text-sm); line-height: 1.5;
}
/* Actual size: the picture at its own pixel width, panned by scroll or drag. */
.lightbox.is-zoomed .lightbox__stage { display: block; overflow: auto; padding: 0; cursor: grab; touch-action: pan-x pan-y pinch-zoom; }
.lightbox.is-zoomed .lightbox__stage.is-dragging { cursor: grabbing; }
.lightbox.is-zoomed .lightbox__media { display: block; max-width: none; max-height: none; width: max-content; margin: auto; }
.lightbox.is-zoomed .lightbox__media img { max-width: none; max-height: none; width: var(--zoom-w); border-radius: 0; box-shadow: none; }
.lightbox.is-zoomed .lightbox__nav { display: none; }
/* Long page captures scroll vertically at a readable width. */
.lightbox.is-tall .lightbox__stage { display: block; overflow-y: auto; padding-block: 0 24px; }
.lightbox.is-tall .lightbox__media { display: block; margin-inline: auto; width: min(100%, 1100px); max-height: none; }
.lightbox.is-tall .lightbox__media img { width: 100%; max-height: none; }
.lightbox.is-tall .lightbox__nav { position: fixed; }
@media (max-width: 640px) {
  .lightbox__stage { padding: 0 6px; }
  .lightbox__nav { top: auto; bottom: 8px; translate: none; width: 44px; height: 44px; }
  .lightbox.is-tall .lightbox__nav { bottom: 76px; }
  .lightbox__media img, .lightbox__media video { max-height: calc(100dvh - 190px); }
  .lightbox__caption { padding-inline: 60px; }
}

/* ---------------------------------------------------------- diagrams */
/* Solution diagrams are inline SVG: colours come from the theme tokens. */
.work-diagram {
  display: block; font-family: var(--font);
  /* Text tones for green/amber labels: the stroke colours themselves are too
     light for small text on paper (3.6:1), these keep 5:1 and more. */
  --wd-outcome-ink: color-mix(in srgb, var(--outcome) 70%, var(--ink));
  --wd-risk-ink: color-mix(in srgb, var(--risk) 70%, var(--ink));
}
html.dark .work-diagram { --wd-outcome-ink: var(--outcome); --wd-risk-ink: var(--risk); }
.work-diagram .wd-dot { fill: var(--line); }
.work-diagram .wd-node rect { fill: var(--bg-elev); stroke: var(--line-strong); stroke-width: 2; }
.work-diagram .wd-node--accent rect { stroke: var(--signal); stroke-width: 2.5; }
.work-diagram .wd-node--outcome rect { stroke: var(--outcome); stroke-width: 2.5; fill: color-mix(in srgb, var(--outcome) 10%, var(--bg-elev)); }
.work-diagram .wd-node--risk rect { stroke: var(--risk); stroke-width: 2.5; fill: color-mix(in srgb, var(--risk) 10%, var(--bg-elev)); }
.work-diagram .wd-node--dashed rect { fill: transparent; stroke-dasharray: 9 9; }
.work-diagram .wd-title { fill: var(--ink); font-weight: 650; letter-spacing: -0.01em; }
.work-diagram .wd-display { fill: var(--ink); font-weight: 700; letter-spacing: -0.035em; }
.work-diagram .wd-sub { fill: var(--ink-2); }
.work-diagram .wd-mono { fill: var(--ink-3); font-family: var(--mono); letter-spacing: 0.06em; }
.work-diagram .wd-mono--accent,
.work-diagram .wd-node--accent .wd-mono { fill: var(--signal-ink); }
.work-diagram .wd-node--outcome .wd-mono { fill: var(--wd-outcome-ink); }
.work-diagram .wd-node--risk .wd-mono { fill: var(--wd-risk-ink); }
.work-diagram .wd-edge path { fill: none; stroke: var(--line-strong); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.work-diagram .wd-edge--accent path { stroke: var(--signal); }
.work-diagram .wd-edge--outcome path { stroke: var(--outcome); }
.work-diagram .wd-edge--risk path { stroke: var(--risk); }
.work-diagram .wd-edge--dashed path:not(.wd-head) { stroke-dasharray: 10 10; }
.work-diagram .wd-edge--soft path { stroke-width: 2; }
.work-diagram .wd-edge-label text { paint-order: stroke; stroke: var(--paper); stroke-width: 12px; stroke-linejoin: round; }
.work-diagram .wd-edge-label--accent text { fill: var(--signal-ink); }
.work-diagram .wd-edge-label--outcome text { fill: var(--wd-outcome-ink); }
.work-diagram .wd-edge-label--risk text { fill: var(--wd-risk-ink); }
.work-diagram .wd-chip rect { fill: var(--bg); stroke: var(--line-strong); stroke-width: 2; }
.work-diagram .wd-break path { fill: none; stroke: var(--risk); stroke-width: 4; stroke-linecap: round; }

/* ---------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  /* Cross-document view transitions between gallery pages only: the rest of
     the site does not load this file, so it keeps its plain navigation. The
     opened tile's picture morphs into the stage of the work page and back. */
  @view-transition { navigation: auto; }
  .work-stage__frame { view-transition-name: var(--vt-name, none); view-transition-class: work-media; }
  .work-tile__media { view-transition-class: work-media; }
  ::view-transition-group(.work-media) { animation-duration: 380ms; animation-timing-function: var(--w-ease, ease); }
  ::view-transition-old(.work-media),
  ::view-transition-new(.work-media) { height: 100%; object-fit: cover; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 200ms; }

  .work-tile__link:hover .work-tile__media img { transform: scale(1.03); }

  /* Tiles rise in as they enter the viewport — CSS only, and only where the
     browser supports scroll-driven animations; elsewhere they simply show. */
  @supports (animation-timeline: view()) {
    .works-grid > .work-tile,
    .work-gallery__item {
      animation: works-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 36%;
    }
  }
  @keyframes works-rise {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .work-tile__media img, .work-gallery__item img { transition: none; }
  .work-tile__cue { display: none; }
}

/* ---------------------------------------------------------- print */
@media print {
  .works-groups, .works-custom, .works-cases, .work-head__actions, .works-similar .btn, .work-pager,
  .work-tile__video, .work-tile__frames, .work-tile__cue, .work-stage__launch, .work-stage__hint, .lightbox { display: none !important; }
  .work-tile, .archive-row, .work-gallery__item { break-inside: avoid; }
  .work-body__aside { position: static; }
}

/* ---------- drawing viewer (cad-viewer demo) ---------- */
/* AutoCAD's model-space background; layer colours come from the DXF (ACI). */
.cadv {
  --cad-bg: #212830;
  position: relative;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  height: clamp(480px, 76vh, 840px);
  background: var(--bg-elev); color: var(--ink);
  font-size: var(--text-sm);
}
.cadv button { font: inherit; color: inherit; }
.cadv__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3);
  padding: 10px 12px; border-bottom: var(--line-w-1) solid var(--line);
}
.cadv__tabs { display: flex; gap: 2px; flex: 1 1 420px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cadv__tabs::-webkit-scrollbar { display: none; }
.cadv__tab {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 38px; padding: 6px 12px;
  border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--ink-2); white-space: nowrap; cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.cadv__tab:hover { background: var(--bg-sunken); color: var(--ink); }
.cadv__tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.cadv__tab:focus-visible, .cadv__mode:focus-visible, .cadv__lbtn:focus-visible, .cadv__zbtn:focus-visible,
.cadv__file:focus-visible, .cadv__showall:focus-visible, .cadv__layers-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.cadv__tab-no { font-family: var(--mono); font-size: var(--text-xs); opacity: 0.65; }
.cadv__modes { display: inline-flex; flex: none; padding: 3px; border-radius: var(--radius-pill); background: var(--bg-sunken); }
.cadv__mode {
  min-height: 32px; padding: 4px 14px; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--ink-2); font-weight: 600; cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.cadv__mode[aria-pressed="true"] { background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow); }
.cadv[data-mode="cad"] .cadv__mode[aria-pressed="true"] { background: var(--cad-bg); color: #e9eef3; }
.cadv__layers-toggle {
  display: none; align-items: center; gap: 6px; flex: none;
  min-height: 38px; padding: 6px 12px; border: var(--line-w-1) solid var(--line-strong); border-radius: var(--radius-pill);
  background: transparent; cursor: pointer;
}
.cadv__layers-toggle[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.cadv__body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 288px; min-height: 0; }
.cadv__canvas {
  position: relative; min-width: 0; overflow: hidden;
  background: var(--bg-sunken); touch-action: none; cursor: grab; outline: none;
  transition: background-color 240ms ease;
}
.cadv.is-grabbing .cadv__canvas { cursor: grabbing; }
.cadv__canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--focus-ring); }
.cadv[data-mode="cad"] .cadv__canvas { background: var(--cad-bg); }
.cadv__stage { position: absolute; inset: 0; }
.cadv__stage > svg { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; }
.cadv__veil {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: var(--s-5);
  background: color-mix(in srgb, var(--bg-sunken) 82%, transparent); color: var(--ink-2); text-align: center;
}
.cadv__veil[hidden] { display: none; }
.cadv__hint {
  position: absolute; left: 50%; bottom: 70px; z-index: 3;
  max-width: calc(100% - 32px); padding: 8px 14px; border-radius: var(--radius-pill);
  background: rgba(20, 22, 26, 0.9); color: #fff; font-size: var(--text-sm); text-align: center;
  opacity: 0; translate: -50% 8px; pointer-events: none;
  transition: opacity 180ms ease, translate 180ms ease;
}
.cadv__hint.is-on { opacity: 1; translate: -50% 0; }
.cadv__zoom { display: inline-flex; gap: 4px; }
.cadv__zbtn {
  display: grid; place-items: center; width: 34px; height: 32px;
  border: var(--line-w-1) solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--ink); cursor: pointer;
}
.cadv__zbtn:hover { border-color: var(--line-strong); background: var(--bg-sunken); }
.cadv__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.cadv__panel {
  display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0;
  border-left: var(--line-w-1) solid var(--line); background: var(--bg-elev);
}
.cadv__panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: 12px 14px 6px; }
.cadv__panel-title { margin: 0; font-family: var(--mono); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.cadv__showall { min-height: 32px; padding: 4px 6px; border: 0; background: none; color: var(--signal-ink); font-size: var(--text-xs); font-weight: 600; cursor: pointer; }
.cadv__showall:disabled { color: var(--ink-3); opacity: 0.55; cursor: default; }
.cadv__list { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.cadv__layer--paper:not(.cadv__layer--paper ~ .cadv__layer--paper) { margin-top: 6px; padding-top: 6px; border-top: var(--line-w-1) solid var(--line); }
.cadv__lbtn {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) 18px; column-gap: 10px; align-items: center;
  width: 100%; padding: 7px 8px; border: 0; border-radius: var(--radius-sm);
  background: transparent; text-align: left; cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.cadv__lbtn:hover { background: var(--bg-sunken); }
.cadv__swatch { grid-row: 1 / span 2; width: 14px; height: 14px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28); }
.cadv__lname { font-family: var(--mono); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.cadv__lnote { grid-column: 2; font-size: 12px; line-height: 1.3; color: var(--ink-3); }
.cadv__eye { grid-column: 3; grid-row: 1 / span 2; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; opacity: 0.6; }
.cadv__lbtn[aria-pressed="false"] { color: var(--ink-3); }
.cadv__lbtn[aria-pressed="false"] .cadv__lname { text-decoration: line-through; text-decoration-thickness: 1px; }
.cadv__lbtn[aria-pressed="false"] .cadv__swatch { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.cadv__lbtn[aria-pressed="false"] .cadv__eye { opacity: 0.22; }

.cadv__status {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 8px 12px; border-top: var(--line-w-1) solid var(--line);
  font-family: var(--mono); font-size: var(--text-xs); color: var(--ink-2);
}
.cadv__space { padding: 3px 8px; border-radius: 4px; background: var(--bg-sunken); letter-spacing: 0.08em; text-transform: uppercase; }
.cadv__xy { min-width: 24ch; font-variant-numeric: tabular-nums; white-space: pre; }
.cadv__files { display: flex; gap: 6px; margin-left: auto; }
.cadv__file {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px;
  border-radius: var(--radius-sm); background: var(--signal-soft); color: var(--signal-ink);
  font-weight: 700; text-decoration: none;
}
.cadv__file:hover { background: color-mix(in srgb, var(--signal) 22%, transparent); }
.cadv__file .cadv__icon { width: 16px; height: 16px; }
.cadv__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* sheet SVG: paper colours are attributes; the CAD screen repaints by class */
.cadsheet text { font-variant-numeric: lining-nums tabular-nums; }
.cadsheet .ko, .cadsheet .vp { stroke: none; }
.cadsheet .vp { display: none; }
.cadsheet g[data-ly] { transition: opacity 160ms ease; }
.cadsheet.is-solo g[data-ly] { opacity: 0.1; }
.cadsheet.is-solo g[data-ly].is-hl { opacity: 1; }
.cadsheet.is-cad .bg, .cadsheet.is-cad .m { fill: var(--cad-bg); }
.cadsheet.is-cad .tt { fill: none; }
.cadsheet.is-cad .s, .cadsheet.is-cad .x { fill: var(--c); }
.cadsheet.is-cad .h { stroke: var(--cad-bg); }
.cadsheet.is-cad .k, .cadsheet.is-cad .ko, .cadsheet.is-cad .vp { stroke: var(--c); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.cadsheet.is-cad .tc { stroke: #8d97a3; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.cadsheet.is-cad text:not(.x) { fill: #a4adb8; }
.cadsheet.is-cad .kw { stroke-width: 2px; }
/* 1 px strokes take their dashes in screen pixels */
.cadsheet.is-cad .lt-ax { stroke-dasharray: 18 4 3 4; }
.cadsheet.is-cad .lt-bd { stroke-dasharray: 16 4 3 4 3 4; }
.cadsheet.is-cad .lt-da { stroke-dasharray: 7 4; }
.cadsheet.is-cad .lt-do { stroke-dasharray: 2 3; }
.cadsheet.is-cad .vp { display: inline; stroke-dasharray: 6 4; }

@media (max-width: 760px) {
  /* on a phone the sheet gets a landscape-ish canvas, not a tall empty one */
  .cadv { height: auto; grid-template-rows: auto auto auto; }
  .cadv__canvas { height: clamp(260px, 84vw, 62vh); }
  .cadv__tabs { flex-basis: 100%; }
  .cadv__space { display: none; }
  .cadv__layers-toggle { display: inline-flex; margin-left: auto; }
  .cadv__body { grid-template-columns: minmax(0, 1fr); }
  .cadv__panel {
    position: absolute; top: 0; right: 0; bottom: 0; z-index: 4;
    width: min(88%, 320px); border-left: var(--line-w-1) solid var(--line);
    box-shadow: -18px 0 36px -24px rgba(0, 0, 0, 0.45);
    translate: 104% 0; visibility: hidden;
    transition: translate 220ms ease, visibility 0s linear 220ms;
  }
  .cadv.is-panel-open .cadv__panel { translate: 0 0; visibility: visible; transition: translate 220ms ease; }
  .cadv__xy { display: none; }
  .cadv__zoom { right: 8px; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .cadv *, .cadsheet g[data-ly] { transition: none !important; }
}

/* ---------- editor desk (video-editor demo) ---------- */
.vedit {
  --ve-bg: #101215; --ve-panel: #161a1f; --ve-panel-2: #1c2027; --ve-line: #2a2f38; --ve-line-2: #353b45;
  --ve-text: #ebe8e2; --ve-text-2: #a9afb9; --ve-text-3: #8d95a1;
  --ve-head: 164px; --ve-ruler: 28px; --ve-titles: 30px; --ve-video: 56px; --ve-music: 46px; --ve-amb: 40px; --ve-sfx: 40px;
  --ve-playhead: #ff6a55; --ve-accent: #f2a65a;
  --ve-titles-c: #b9a2ff; --ve-video-c: #6ea8ff; --ve-music-c: #5fd3a0; --ve-amb-c: #59c3d8; --ve-sfx-c: #f2a65a;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(250px, 27%, 330px);
  grid-template-areas: "monitor inspector" "bar bar" "timeline timeline" "hint hint";
  background: var(--ve-bg); color: var(--ve-text);
  font-size: var(--text-sm); line-height: 1.4;
  outline: none;
}
.vedit :where(button) { font: inherit; color: inherit; }
.vedit p { max-width: none; }
.vedit [hidden] { display: none !important; }
.vedit :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* program monitor */
.vedit__monitor { grid-area: monitor; position: relative; background: #000; aspect-ratio: 16 / 9; overflow: hidden; --split: 0.5; }
.vedit__video, .vedit__raw { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.vedit__video { cursor: pointer; }
.vedit__before { position: absolute; inset: 0; pointer-events: none; display: none; clip-path: inset(0 calc((1 - var(--split)) * 100%) 0 0); }
.vedit.is-compare .vedit__before { display: block; }
.vedit__split {
  position: absolute; top: 0; bottom: 0; left: calc(var(--split) * 100%); width: 44px; margin-left: -22px;
  cursor: ew-resize; touch-action: none; z-index: 2;
}
.vedit__split::before { content: ''; position: absolute; top: 0; bottom: 0; left: 21px; width: 2px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.vedit__split-grip {
  position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; translate: -50% -50%;
  border-radius: 50%; background: rgba(16, 18, 21, 0.72); border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.vedit__split-grip::before, .vedit__split-grip::after {
  content: ''; position: absolute; top: 50%; width: 0; height: 0; translate: 0 -50%;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
.vedit__split-grip::before { left: 7px; border-right: 6px solid #fff; }
.vedit__split-grip::after { right: 7px; border-left: 6px solid #fff; }
.vedit__split:focus-visible { outline: none; }
.vedit__split:focus-visible .vedit__split-grip { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.vedit__tag {
  position: absolute; top: 12px; z-index: 1; padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(16, 18, 21, 0.72); color: #fff; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.04em;
  pointer-events: none;
}
.vedit__tag--before { left: 12px; }
.vedit__tag--after { right: 12px; }
.vedit__big {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; translate: -50% -50%; z-index: 2;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(16, 18, 21, 0.62); color: #fff; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); backdrop-filter: blur(6px);
  transition: background-color 160ms ease, scale 160ms ease;
}
.vedit__big svg { width: 34px; height: 34px; }
.vedit__big:hover { background: rgba(16, 18, 21, 0.8); scale: 1.05; }

/* inspector */
.vedit__inspector {
  grid-area: inspector; min-width: 0; display: flex; flex-direction: column; gap: 12px;
  padding: 16px; background: var(--ve-panel); border-left: 1px solid var(--ve-line); overflow: auto;
}
.vedit__ins-head { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ve-text-3); }
.vedit__ins-foot { margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--ve-line); color: var(--ve-text-3); font-size: var(--text-xs); }
.vedit__ins-thumb {
  display: block; flex: none; height: 74px; border-radius: 6px; background-color: #000;
  background-size: auto 100%; background-repeat: repeat-x; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.vedit__ins-body { display: grid; gap: 8px; min-width: 0; }
.vedit__ins-body p { margin: 0; }
.vedit__ins-body p:empty { display: none; }
.vedit__ins-title { font-size: var(--text-base); font-weight: 650; color: #fff; }
.vedit__ins-meta { color: var(--ve-text-2); font-size: var(--text-xs); font-family: var(--mono); letter-spacing: -0.01em; }
.vedit__ins-note { color: var(--ve-text); }
.vedit__ins-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vedit__ins-chip {
  padding: 3px 8px; border-radius: var(--radius-pill); font-size: var(--text-xs);
  background: rgba(242, 166, 90, 0.12); color: #f6c08c; box-shadow: inset 0 0 0 1px rgba(242, 166, 90, 0.28);
}
.vedit__inspector[data-kind="titles"] .vedit__ins-title { color: var(--ve-titles-c); }
.vedit__inspector[data-kind="music"] .vedit__ins-title { color: var(--ve-music-c); }
.vedit__inspector[data-kind="amb"] .vedit__ins-title { color: var(--ve-amb-c); }
.vedit__inspector[data-kind="sfx"] .vedit__ins-title { color: var(--ve-sfx-c); }

/* transport */
.vedit__bar {
  grid-area: bar; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--ve-panel-2); border-top: 1px solid var(--ve-line); border-bottom: 1px solid var(--ve-line);
}
.vedit__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none;
  min-width: 38px; height: 38px; padding: 0 9px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ve-text); cursor: pointer; transition: background-color 140ms ease, color 140ms ease;
}
.vedit__btn:hover { background: rgba(255, 255, 255, 0.07); }
.vedit__btn[aria-pressed="true"] { background: rgba(242, 166, 90, 0.16); color: #f8c896; }
.vedit__btn--play { width: 42px; height: 42px; border-radius: 50%; background: var(--ve-text); color: #111; }
.vedit__btn--play:hover { background: #fff; }
.vedit__btn--text { padding: 0 12px; font-weight: 600; }
.vedit__clock { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.vedit__tc { font-size: 1.125rem; font-weight: 600; letter-spacing: 0.02em; }
.vedit__tc--total { font-size: var(--text-xs); font-weight: 500; color: var(--ve-text-2); }
.vedit__meter { display: inline-flex; align-items: center; gap: 8px; color: var(--ve-text-2); font-size: var(--text-xs); white-space: nowrap; }
.vedit__beats { display: inline-flex; gap: 4px; }
.vedit__beats i { width: 7px; height: 7px; border-radius: 50%; background: var(--ve-line-2); transition: background-color 80ms linear; }
.vedit__beats i.is-on { background: var(--ve-accent); box-shadow: 0 0 8px rgba(242, 166, 90, 0.7); }
.vedit__beats i:first-child.is-on { background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, 0.6); }
.vedit__chips { display: inline-flex; gap: 6px; }
.vedit__chip { padding: 2px 8px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.06); color: var(--ve-text-2); font-size: var(--text-xs); white-space: nowrap; }
.vedit__spacer { flex: 1 1 auto; }

/* timeline */
.vedit__timeline { grid-area: timeline; display: grid; grid-template-columns: var(--ve-head) minmax(0, 1fr); background: var(--ve-panel); min-width: 0; }
.vedit__heads { display: flex; flex-direction: column; border-right: 1px solid var(--ve-line); background: var(--ve-panel-2); }
.vedit__head {
  display: flex; align-items: center; gap: 6px; padding: 0 8px; border-bottom: 1px solid var(--ve-line);
  font-size: var(--text-xs); color: var(--ve-text-2); white-space: nowrap; overflow: hidden;
}
.vedit__head-id { font-family: var(--mono); font-weight: 700; color: var(--ve-text); }
.vedit__head-name { overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; }
.vedit__head--ruler { height: var(--ve-ruler); }
.vedit__head--titles, .vedit__lane--titles { height: var(--ve-titles); }
.vedit__head--video, .vedit__lane--video { height: var(--ve-video); }
.vedit__head--music, .vedit__lane--music { height: var(--ve-music); }
.vedit__head--amb, .vedit__lane--amb { height: var(--ve-amb); }
.vedit__head--sfx, .vedit__lane--sfx { height: var(--ve-sfx); }
.vedit__head--titles .vedit__head-id { color: var(--ve-titles-c); }
.vedit__head--video .vedit__head-id { color: var(--ve-video-c); }
.vedit__head--music .vedit__head-id { color: var(--ve-music-c); }
.vedit__head--amb .vedit__head-id { color: var(--ve-amb-c); }
.vedit__head--sfx .vedit__head-id { color: var(--ve-sfx-c); }
.vedit__head.is-silent .vedit__head-name { color: var(--ve-text-3); text-decoration: line-through; text-decoration-color: rgba(141, 149, 161, 0.6); }
.vedit__ms-group { display: inline-flex; gap: 3px; flex: none; }
.vedit__ms {
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); color: var(--ve-text-2); font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.vedit__ms:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.vedit__ms[aria-pressed="true"] { background: #e2584a; color: #fff; }
.vedit__ms--solo[aria-pressed="true"] { background: #e8c547; color: #111; }
.vedit.is-stems-loading .vedit__ms { cursor: progress; opacity: 0.6; }
.vedit__scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--ve-line-2) transparent; min-width: 0; }
.vedit__lanes { position: relative; min-width: 100%; cursor: text; touch-action: pan-y; --p: 0; }
.vedit.is-scrubbing .vedit__lanes { cursor: ew-resize; }
.vedit__ruler { position: relative; height: var(--ve-ruler); background: #13161a; border-bottom: 1px solid var(--ve-line); cursor: ew-resize; }
.vedit__tick { position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--ve-line-2); }
.vedit__tick--major { height: 11px; background: var(--ve-text-3); }
.vedit__tick b { position: absolute; left: 4px; bottom: 0; font-weight: 500; font-size: 10px; color: var(--ve-text-3); font-family: var(--mono); }
.vedit__barmark { position: absolute; top: 1px; translate: -50% 0; font-size: 9px; font-family: var(--mono); color: rgba(242, 166, 90, 0.75); }
.vedit__grid { position: absolute; left: 0; right: 0; top: var(--ve-ruler); bottom: 0; pointer-events: none; z-index: 2; }
.vedit__barline { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(242, 166, 90, 0.16); }
.vedit__barline.is-hit { animation: vedit-hit 600ms ease-out; }
@keyframes vedit-hit { from { background: rgba(255, 220, 170, 0.95); box-shadow: 0 0 10px 2px rgba(242, 166, 90, 0.55); } to { background: rgba(242, 166, 90, 0.16); box-shadow: none; } }
.vedit__lane { position: relative; border-bottom: 1px solid var(--ve-line); background: #12151a; }
.vedit__lane:nth-of-type(even) { background: #14171c; }
/* a muted track: the sound fades out of the picture, its labels stay readable */
.vedit__lane.is-silent .vedit__wave { opacity: 0.22; filter: grayscale(1); }
.vedit__lane.is-silent .vedit__clip { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.vedit__lane.is-silent .vedit__clip-label { color: var(--ve-text-3); text-shadow: none; }
.vedit__clip {
  position: absolute; top: 3px; bottom: 3px; min-width: 2px; overflow: hidden; border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.vedit__clip-label {
  position: absolute; left: 6px; right: 4px; top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; color: #fff; pointer-events: none;
}
.vedit__lane--video .vedit__clip { background-color: #20304a; background-size: auto 100%; background-repeat: repeat-x; background-position: 0 0; }
.vedit__lane--video .vedit__clip::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 12, 16, 0.72), rgba(10, 12, 16, 0) 55%); pointer-events: none; }
.vedit__lane--video .vedit__clip-label { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.vedit__lane--video .vedit__clip.is-current { box-shadow: inset 0 0 0 2px var(--ve-accent); }
.vedit__lane--titles .vedit__clip { background: rgba(185, 162, 255, 0.2); box-shadow: inset 2px 0 0 var(--ve-titles-c), inset 0 0 0 1px rgba(185, 162, 255, 0.35); }
.vedit__lane--titles .vedit__clip-label { top: 50%; translate: 0 -50%; color: #e1d6ff; }
.vedit__wave { position: absolute; inset: 2px 0; width: 100%; height: calc(100% - 4px); pointer-events: none; }
.vedit__lane--music .vedit__wave path { fill: rgba(95, 211, 160, 0.55); }
.vedit__lane--amb .vedit__wave path { fill: rgba(89, 195, 216, 0.5); }
.vedit__lane--sfx .vedit__wave path { fill: rgba(242, 166, 90, 0.6); }
.vedit__lane--music .vedit__clip { box-shadow: inset 0 0 0 1px rgba(95, 211, 160, 0.45); background: rgba(95, 211, 160, 0.06); }
.vedit__lane--amb .vedit__clip { box-shadow: inset 0 0 0 1px rgba(89, 195, 216, 0.45); background: rgba(89, 195, 216, 0.06); }
.vedit__lane--sfx .vedit__clip { box-shadow: inset 0 0 0 1px rgba(242, 166, 90, 0.5); background: rgba(242, 166, 90, 0.07); }
.vedit__lane--sfx .vedit__clip--fx { box-shadow: inset 0 0 0 1px rgba(255, 106, 85, 0.6); background: rgba(255, 106, 85, 0.1); }
/* overlapping sounds share the lane: the second row takes the lower half */
.vedit__lane.has-rows .vedit__clip { top: 2px; bottom: auto; height: calc(50% - 3px); }
.vedit__lane.has-rows .vedit__clip.is-row-1 { top: auto; bottom: 2px; }
.vedit__lane.has-rows .vedit__clip-label { top: 1px; font-size: 10px; }
.vedit__lane--music .vedit__clip-label, .vedit__lane--amb .vedit__clip-label, .vedit__lane--sfx .vedit__clip-label { font-weight: 500; color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.vedit__trans {
  position: absolute; top: 3px; bottom: 3px; min-width: 9px; z-index: 1; border-radius: 3px; pointer-events: auto;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0 2px, rgba(255, 255, 255, 0.25) 2px 5px);
  box-shadow: 0 0 0 1px rgba(16, 18, 21, 0.6);
}
.vedit__trans--fade { background: linear-gradient(90deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0)); box-shadow: none; }
.vedit__trans--fade:last-child { background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.85)); }
.vedit__playhead { position: absolute; top: 0; bottom: 0; left: calc(var(--p) * 100%); width: 2px; margin-left: -1px; background: var(--ve-playhead); z-index: 3; pointer-events: none; box-shadow: 0 0 8px rgba(255, 106, 85, 0.5); }
.vedit__playhead::before {
  content: ''; position: absolute; top: 0; left: 50%; translate: -50% 0; width: 12px; height: 12px;
  background: var(--ve-playhead); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}
.vedit__hint { grid-area: hint; margin: 0; padding: 8px 14px 10px; color: var(--ve-text-3); font-size: var(--text-xs); background: var(--ve-panel); border-top: 1px solid var(--ve-line); }
.vedit__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* full screen: the monitor takes the free height */
.vedit.is-fullscreen { height: 100vh; grid-template-rows: minmax(0, 1fr) auto auto auto; }
.vedit.is-fullscreen .vedit__monitor { aspect-ratio: auto; height: 100%; }

@media (max-width: 960px) {
  .vedit { grid-template-columns: minmax(0, 1fr); grid-template-areas: "monitor" "bar" "timeline" "inspector" "hint"; }
  .vedit__inspector { border-left: 0; border-top: 1px solid var(--ve-line); flex-direction: row; align-items: flex-start; }
  .vedit__ins-thumb { width: 38%; max-width: 220px; height: 64px; }
  .vedit__ins-body { flex: 1 1 auto; }
  .vedit.is-fullscreen { grid-template-rows: minmax(0, 1fr) auto auto auto auto; }
}
@media (max-width: 640px) {
  .vedit { --ve-head: 44px; --ve-video: 48px; --ve-music: 40px; --ve-amb: 34px; --ve-sfx: 34px; }
  .vedit__head { flex-direction: column; justify-content: center; gap: 2px; padding: 0 4px; }
  .vedit__head-name { display: none; }
  .vedit__ms { width: 18px; height: 15px; font-size: 9px; }
  .vedit__lanes { min-width: 720px; }
  .vedit__chips, .vedit__meter-text, .vedit__hint, .vedit__barmark { display: none; }
  .vedit__bar { gap: 6px 8px; padding: 8px 10px; }
  .vedit__btn--text span { display: none; }
  .vedit__inspector { flex-direction: column; }
  .vedit__ins-thumb { width: 100%; max-width: none; height: 56px; }
  .vedit__big { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .vedit *, .vedit *::before { transition: none !important; animation: none !important; }
}

/* ===================================================================== walk player (FPV film + live plan) */
.work-stage__frame--demo[data-mounted="walk-player"] { overflow: hidden; border-radius: var(--radius-lg); background: #0e1013; box-shadow: var(--shadow); }
.wplay {
  --wp-bg: #0e1013; --wp-panel: #14171c; --wp-line: #262b33; --wp-line-2: #323843;
  --wp-text: #ebe8e2; --wp-text-2: #a9afb9; --wp-text-3: #8d95a1; --wp-accent: #f2a65a; --wp-accent-2: #ffc285;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(270px, 31%, 380px);
  grid-template-areas: "monitor side" "bar bar" "chapters chapters" "hint hint";
  background: var(--wp-bg); color: var(--wp-text);
  font-size: var(--text-sm); line-height: 1.4; outline: none;
}
.wplay :where(button) { font: inherit; color: inherit; }
.wplay p { max-width: none; margin: 0; }
.wplay [hidden] { display: none !important; }
.wplay :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.wplay__monitor { grid-area: monitor; position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.wplay__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #000; cursor: pointer; }
.wplay__big {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; translate: -50% -50%;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(14, 16, 19, 0.62); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 10px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px); transition: transform .2s ease, background .2s ease;
}
.wplay__big svg { width: 34px; height: 34px; margin-left: 4px; }
.wplay__big:hover { transform: scale(1.06); background: rgba(242, 166, 90, 0.85); }
/* chapter caption over the film */
.wplay__caption {
  position: absolute; left: clamp(14px, 3.2%, 32px); bottom: clamp(14px, 6%, 40px); pointer-events: none;
  padding: 7px 12px 7px 14px; border-left: 2px solid var(--wp-accent); background: linear-gradient(90deg, rgba(10, 11, 13, 0.62), rgba(10, 11, 13, 0));
  font-size: clamp(12px, 1.6vw, 16px); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: #fff; opacity: 0;
}
.wplay__caption.is-in { animation: wplay-cap 3.4s ease forwards; }
.wplay.is-osd .wplay__caption { display: none; }
@keyframes wplay-cap { 0% { opacity: 0; transform: translateX(-10px); } 12% { opacity: 1; transform: none; } 78% { opacity: 1; } 100% { opacity: 0; } }
/* OSD */
.wplay__osd { position: absolute; inset: 0; pointer-events: none; color: #eafff4; font: 600 12px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85); letter-spacing: 0.04em; }
.wplay__horizon { position: absolute; left: 22%; right: 22%; top: 50%; height: 0; transform-origin: 50% 0; }
.wplay__horizon::before, .wplay__horizon::after { content: ''; position: absolute; top: -1px; width: 38%; height: 2px; background: rgba(234, 255, 244, 0.85); box-shadow: 0 0 2px rgba(0, 0, 0, 0.6); }
.wplay__horizon::before { left: 0; } .wplay__horizon::after { right: 0; }
.wplay__cross { position: absolute; left: 50%; top: 50%; width: 30px; height: 12px; translate: -50% -50%; border: 2px solid rgba(234, 255, 244, 0.9); border-top: 0; border-radius: 0 0 14px 14px; }
.wplay__tape { position: absolute; left: 50%; top: 4%; width: min(46%, 300px); height: 28px; translate: -50% 0; overflow: hidden; border-bottom: 1px solid rgba(234, 255, 244, 0.5); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.wplay__tape-inner { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; }
.wplay__tape-tick { position: absolute; bottom: 0; width: 1px; height: 6px; background: rgba(234, 255, 244, 0.75); }
.wplay__tape-tick.is-major { height: 10px; }
.wplay__tape-tick b { position: absolute; bottom: 12px; left: 0; translate: -50% 0; font-size: 11px; font-weight: 700; color: #eafff4; white-space: nowrap; }
.wplay__tape-mark { position: absolute; left: 50%; bottom: 0; width: 0; height: 0; translate: -5px 0; border: 5px solid transparent; border-bottom-color: var(--wp-accent-2); }
.wplay__readout { position: absolute; top: 50%; translate: 0 -50%; display: grid; gap: 3px; padding: 6px 8px; border: 1px solid rgba(234, 255, 244, 0.55); border-radius: 4px; background: rgba(0, 0, 0, 0.18); min-width: 64px; text-align: center; }
.wplay__readout span { font-size: 10px; opacity: 0.8; text-transform: uppercase; }
.wplay__readout b { font-size: 18px; font-variant-numeric: tabular-nums; }
.wplay__readout em { font-style: normal; font-size: 10px; opacity: 0.8; }
.wplay__readout--l { left: 5%; } .wplay__readout--r { right: 5%; }
.wplay__osd-chap { position: absolute; left: 4%; bottom: 6%; }
.wplay__osd-time { position: absolute; right: 4%; bottom: 6%; font-variant-numeric: tabular-nums; }
/* side: the live plan */
.wplay__side { grid-area: side; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--wp-line); background: var(--wp-panel); }
.wplay__plan { position: relative; flex: 1 1 auto; min-height: 220px; overflow: hidden; background: radial-gradient(120% 90% at 50% 40%, #191d23, #111317); }
.wplay__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.wplay__plan-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--wp-text-3); }
.wplay__site polyline { fill: none; stroke: #2a2f37; stroke-linecap: round; stroke-linejoin: round; }
.wplay__parking { fill: #1f232a; }
.wplay__deck { fill: #2c2721; }
.wplay__rooms polygon { fill: rgba(255, 255, 255, 0.025); transition: fill .45s ease; }
.wplay__rooms polygon.is-here { fill: rgba(242, 166, 90, 0.17); }
.wplay__furn rect { fill: none; stroke: #4a515c; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wplay__walls rect { fill: #cfc9be; } .wplay__walls rect.is-outer { fill: #ece6db; }
.wplay__glass line { stroke: #86c8ee; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.wplay__doors line, .wplay__doors path { fill: none; stroke: #8b929c; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wplay__doors .wplay__arc { stroke-dasharray: 3 3; }
.wplay__labels text { fill: #9aa3ae; letter-spacing: 0.02em; transition: opacity .3s ease; }
.wplay.is-wide .wplay__labels text { opacity: 0; }
.wplay__route { fill: none; stroke: var(--wp-accent); stroke-opacity: 0.32; stroke-width: 1.4; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.wplay__trail { fill: none; stroke: var(--wp-accent-2); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.wplay__mark circle { fill: #0e1013; stroke: var(--wp-accent); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.wplay__mark text { fill: var(--wp-accent-2); font-weight: 700; }
.wplay__cone { fill: rgba(255, 194, 133, 0.2); stroke: rgba(255, 194, 133, 0.65); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wplay__dot { fill: #fff; stroke: var(--wp-accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.wplay__plan-tools { position: absolute; right: 8px; top: 8px; display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(14, 16, 19, 0.82); box-shadow: 0 0 0 1px var(--wp-line); }
.wplay__seg { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--wp-text-2); font-size: 12px; }
.wplay__seg svg { width: 15px; height: 15px; }
.wplay__seg[aria-pressed="true"] { background: var(--wp-line-2); color: #fff; }
.wplay__tip { position: absolute; z-index: 3; translate: -50% calc(-100% - 12px); display: grid; gap: 4px; padding: 4px; border-radius: 8px; background: #0b0c0e; box-shadow: 0 0 0 1px var(--wp-line-2), 0 8px 24px rgba(0, 0, 0, 0.5); pointer-events: none; }
.wplay__tip-thumb { display: block; width: 136px; aspect-ratio: 16 / 9; border-radius: 5px; background-repeat: no-repeat; background-color: #000; }
.wplay__tip-text { text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--wp-text); }
.wplay__room { padding: 10px 14px 2px; font-weight: 600; color: #fff; min-height: 1.4em; }
.wplay__stats { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 2px 14px 12px; color: var(--wp-text-2); font-variant-numeric: tabular-nums; }
.wplay__stats b { color: var(--wp-accent-2); font-weight: 700; }
.wplay__stats i { font-style: normal; color: var(--wp-text-3); }
/* transport */
.wplay__bar { grid-area: bar; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--wp-line); background: #12151a; }
.wplay__btn { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--wp-text); }
.wplay__btn:hover { background: var(--wp-line); }
.wplay__btn--play { background: var(--wp-accent); color: #18120c; }
.wplay__btn--play:hover { background: var(--wp-accent-2); }
.wplay__btn--text { display: inline-flex; gap: 6px; padding: 0 12px; color: var(--wp-text-2); }
.wplay__btn--text[aria-pressed="true"] { background: rgba(242, 166, 90, 0.16); color: var(--wp-accent-2); box-shadow: inset 0 0 0 1px rgba(242, 166, 90, 0.5); }
.wplay__clock { min-width: 86px; color: var(--wp-text-2); font-variant-numeric: tabular-nums; }
.wplay__scrub { position: relative; flex: 1 1 auto; height: 34px; cursor: pointer; touch-action: none; }
.wplay__scrub::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 4px; translate: 0 -50%; border-radius: 2px; background: var(--wp-line-2); }
.wplay__scrub-fill { position: absolute; left: 0; top: 50%; height: 4px; translate: 0 -50%; border-radius: 2px; background: var(--wp-accent); }
.wplay__scrub-head { position: absolute; top: 50%; width: 14px; height: 14px; translate: -50% -50%; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(242, 166, 90, 0.45); }
.wplay__scrub-tick { position: absolute; top: 50%; width: 2px; height: 12px; translate: -1px -50%; background: #0e1013; }
/* chapters */
.wplay__chapters { grid-area: chapters; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--wp-line); border-top: 1px solid var(--wp-line); }
.wplay__chap { margin: 0; }
.wplay__chap-btn { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "n t" "name name"; gap: 2px 8px; width: 100%; padding: 10px 12px 12px; border: 0; text-align: left; cursor: pointer; background: var(--wp-panel); overflow: hidden; }
.wplay__chap-btn:hover { background: #191d23; }
.wplay__chap-n { grid-area: n; color: var(--wp-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.wplay__chap-t { grid-area: t; justify-self: end; color: var(--wp-text-3); font-variant-numeric: tabular-nums; }
.wplay__chap-name { grid-area: name; color: var(--wp-text-2); }
.wplay__chap-fill { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--k, 0) * 100%); background: var(--wp-accent); }
.wplay__chap.is-current .wplay__chap-name { color: #fff; }
.wplay__chap.is-done .wplay__chap-fill { background: rgba(242, 166, 90, 0.45); }
.wplay__hint { grid-area: hint; padding: 8px 14px 12px; color: var(--wp-text-3); font-size: 12px; border-top: 1px solid var(--wp-line); }
.wplay__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wplay.is-full { grid-template-columns: minmax(0, 1fr) clamp(300px, 26%, 420px); height: 100%; grid-template-rows: minmax(0, 1fr) auto auto auto; }
.wplay.is-full .wplay__monitor { aspect-ratio: auto; }
@media (max-width: 959px) {
  .wplay { grid-template-columns: minmax(0, 1fr); grid-template-areas: "monitor" "bar" "side" "chapters" "hint"; }
  .wplay__side { border-left: 0; border-top: 1px solid var(--wp-line); }
  .wplay__plan { flex: none; height: clamp(240px, 62vw, 380px); }
  .wplay__chapters { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; }
}
@media (max-width: 639px) {
  .wplay__clock { display: none; }
  .wplay__btn--text span { display: none; }
  .wplay__readout { min-width: 52px; padding: 4px 6px; }
  .wplay__readout b { font-size: 15px; }
  .wplay__tape { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wplay__caption.is-in { animation: none; opacity: 1; }
  .wplay__rooms polygon, .wplay__labels text, .wplay__big { transition: none; }
}

/* ===================================================================== 1C ↔ shop exchange bench */
.work-stage__frame--demo[data-mounted="onec-exchange"] { overflow: hidden; border-radius: var(--radius-lg); background: #f7f5f0; box-shadow: var(--shadow); }
.onec {
  --o-bg: #f7f5f0; --o-line: #ddd7cb; --o-ink: #1f1d1a; --o-ink-2: #5d594f; --o-ink-3: #66625a;
  --o-accent: #c2421f; --o-accent-ink: #a3331a; --o-ok: #25683f; --o-warn: #94500f;
  --o-1c-bar: #f6efcf; --o-1c-line: #d9d9d9; --o-1c-head: #eeeeee; --o-1c-field: #fffbe6;
  --o-wire: #1b1e24; --o-wire-2: #252932; --o-wire-ink: #e9e6df; --o-wire-ink-2: #a5adb9;
  position: relative; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  background: var(--o-bg); color: var(--o-ink); font-size: 13px; line-height: 1.4; outline: none;
}
.onec :where(button, input) { font: inherit; color: inherit; }
.onec p { max-width: none; margin: 0; }
.onec [hidden] { display: none !important; }
.onec :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.onec__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px; border-bottom: 1px solid var(--o-line); background: #fbfaf6; }
.onec__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--o-line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
.onec__btn:hover { border-color: #b9b09c; }
.onec__btn:disabled { opacity: .5; cursor: default; }
.onec__btn--primary { background: var(--o-accent); border-color: var(--o-accent); color: #fff; }
.onec__btn--primary:hover { background: #a9391a; border-color: #a9391a; }
.onec__btn--ghost { background: transparent; }
.onec__sep { width: 1px; height: 24px; background: var(--o-line); margin: 0 4px; }
.onec__spacer { flex: 1 1 auto; }
.onec__switch { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px 0 8px; border-radius: 999px; cursor: pointer; color: var(--o-ink-2); user-select: none; }
.onec__switch input { appearance: none; width: 30px; height: 18px; margin: 0; border-radius: 999px; background: #cfc8b9; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.onec__switch input::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.onec__switch input:checked { background: var(--o-ok); }
.onec__switch input:checked::after { transform: translateX(12px); }
.onec__switch-ico { display: inline-flex; color: var(--o-ink-3); }
.onec__switch--bridge.is-on { color: var(--o-ok); background: rgba(47, 125, 79, 0.08); }
.onec__switch--bridge.is-on .onec__switch-ico { color: var(--o-ok); }
.onec .is-coach { animation: onec-coach 1.2s ease 2; }
@keyframes onec-coach { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 93, 61, 0); } 50% { box-shadow: 0 0 0 4px rgba(232, 93, 61, 0.35); } }
.onec__coach { display: grid; gap: 2px; padding: 10px 14px; border-bottom: 1px solid var(--o-line); background: #fff5ef; border-left: 3px solid var(--o-accent); }
.onec__coach-step { font-weight: 700; color: var(--o-accent-ink); font-size: 12px; letter-spacing: .02em; }
.onec__coach-text { color: var(--o-ink); }
.onec__tabs { display: none; }
.onec__panes { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(210px, 0.56fr) minmax(0, 1.04fr); min-height: 0; height: clamp(420px, 44vw, 540px); }
.onec__one, .onec__wire, .onec__shop { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
/* 1C */
.onec__one { background: #fff; border-right: 1px solid var(--o-line); font-size: 12.5px; }
.onec-1c__top { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--o-1c-bar); border-bottom: 1px solid #e6dcb0; }
.onec-1c__logo { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: #2b2b2b; color: #ffd84d; font-weight: 800; font-size: 11px; }
.onec-1c__title { font-weight: 600; color: #3c3a33; }
.onec-1c__main { display: grid; grid-template-columns: 74px minmax(0, 1fr); min-height: 0; flex: 1 1 auto; }
.onec-1c__sections { display: flex; flex-direction: column; padding: 6px 0; background: #f4f4f2; border-right: 1px solid var(--o-1c-line); }
.onec-1c__section { padding: 6px 8px; color: #4b4b4b; font-size: 12px; }
.onec-1c__section.is-active { background: #fff; color: #000; font-weight: 600; box-shadow: inset 3px 0 0 #e1b400; }
.onec-1c__body { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.onec-1c__tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--o-1c-line); background: #fafafa; }
.onec-1c__tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; background: transparent; cursor: pointer; color: #555; }
.onec-1c__tab.is-active { background: #fff; border-color: var(--o-1c-line); color: #111; font-weight: 600; margin-bottom: -1px; }
.onec-1c__tab.is-ping { animation: onec-coach 0.8s ease 2; }
.onec-1c__badge { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--o-accent); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.onec-1c__view { flex: 1 1 auto; overflow: auto; min-height: 0; }
.onec-1c__table { width: 100%; border-collapse: collapse; }
.onec-1c__table th { position: sticky; top: 0; z-index: 1; padding: 6px 6px; background: var(--o-1c-head); border-bottom: 1px solid var(--o-1c-line); font-weight: 600; text-align: left; color: #444; font-size: 11.5px; }
.onec-1c__table td { padding: 4px 6px; border-bottom: 1px solid #ececec; vertical-align: middle; }
.onec-1c__table tr.is-dirty td { background: #fffdf2; }
.onec-1c__table tr.is-coach td { background: #fff1d6; }
.onec-1c__table .c-num { text-align: right; width: 1%; white-space: nowrap; }
.onec-1c__table .c-pic { width: 40px; }
.onec-1c__table .c-sku { color: #666; white-space: nowrap; font-variant-numeric: tabular-nums; }
.onec-1c__table .c-free { color: #666; }
.onec-1c__table .c-name span:first-child { display: inline; }
.onec-1c__dirty { margin-left: 5px; color: #e08a00; font-size: 10px; vertical-align: 1px; }
.onec-1c__thumb { display: block; width: 32px; height: 32px; border-radius: 4px; object-fit: cover; background: #f1ede6; }
.onec-1c__thumb.is-empty, .onec-1c__addphoto { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; color: #6b6b6b; background: #f6f6f6; border: 1px dashed #c9c9c9; }
.onec-1c__addphoto { cursor: pointer; padding: 0; }
.onec-1c__addphoto:hover { color: var(--o-accent); border-color: var(--o-accent); }
.onec-1c__num { width: 64px; padding: 3px 6px; border: 1px solid transparent; border-radius: 3px; background: transparent; text-align: right; font-variant-numeric: tabular-nums; }
.onec-1c__num:hover { border-color: #d0d0d0; background: #fff; }
.onec-1c__num:focus, .onec-1c__num.is-typing { border-color: #d6b300; background: var(--o-1c-field); outline: none; box-shadow: 0 0 0 2px rgba(214, 179, 0, 0.25); }
.onec-1c__empty { padding: 18px 14px; color: #666; }
.onec-1c__doc { margin: 10px; padding: 10px 12px; border: 1px solid var(--o-1c-line); border-radius: 6px; background: #fff; }
.onec-1c__doc.is-fresh { animation: onec-fresh 1.6s ease; }
@keyframes onec-fresh { from { background: #fff4c2; } to { background: #fff; } }
.onec-1c__doc-title { font-weight: 700; }
.onec-1c__doc-meta { color: #666; font-size: 12px; margin-top: 2px; }
.onec-1c__doc-lines { margin: 6px 0; padding-left: 16px; }
.onec-1c__doc-sum { font-weight: 600; color: var(--o-ok); }
/* the wire */
.onec__wire { background: var(--o-wire); color: var(--o-wire-ink); border-right: 1px solid #111; }
.onec-w__head { padding: 10px 12px 6px; font: 600 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--o-wire-ink-2); }
.onec-w__lanes { display: grid; gap: 6px; padding: 0 12px 6px; }
.onec-w__lane { position: relative; height: 22px; border-radius: 6px; background: var(--o-wire-2); overflow: hidden; }
.onec-w__lane::before { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; border-top: 1px dashed #4a515e; }
.onec-w__lane-label { position: absolute; right: 8px; top: 3px; font: 10px/16px var(--mono); color: #a5adb9; background: var(--o-wire-2); padding-left: 6px; }
.onec-w__lane--up .onec-w__lane-label { right: auto; left: 8px; padding: 0 6px 0 0; }
.onec-w__packet { position: absolute; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #ffb36b; box-shadow: 0 0 10px 2px rgba(255, 170, 90, 0.6); }
.onec-w__lane--down .onec-w__packet { left: 6px; animation: onec-down .52s linear forwards; }
.onec-w__lane--up .onec-w__packet { right: 6px; background: #7fd0a0; box-shadow: 0 0 10px 2px rgba(110, 210, 150, 0.55); animation: onec-up .52s linear forwards; }
@keyframes onec-down { to { left: calc(100% - 16px); } }
@keyframes onec-up { to { right: calc(100% - 16px); } }
.onec-w__state { padding: 0 12px 6px; color: var(--o-wire-ink-2); font-size: 12px; }
.onec.is-busy .onec-w__state { color: #ffc285; }
.onec-w__log { flex: 1 1 auto; overflow: auto; margin: 0; padding: 0 6px 8px; list-style: none; min-height: 0; }
.onec-w__item { margin: 0; }
.onec-w__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 6px; width: 100%; padding: 5px 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: left; font: 11.5px/1.35 var(--mono); color: var(--o-wire-ink); }
.onec-w__row:hover { background: #262b34; }
.onec-w__item.is-selected .onec-w__row { background: #2e3440; box-shadow: inset 2px 0 0 #ffb36b; }
.onec-w__method { color: #8ab4ff; }
.onec-w__item--up .onec-w__method { color: #7fd0a0; }
.onec-w__url { overflow-wrap: anywhere; }
.onec-w__status { color: #7fd0a0; }
.onec-w__status.is-warn { color: #ffb36b; }
.onec-w__note { grid-column: 2 / -1; color: var(--o-wire-ink-2); font-size: 11px; white-space: normal; }
.onec-w__item.is-warn .onec-w__note { color: #ffb36b; }
.onec-w__empty { order: -1; padding: 4px 14px 10px; color: var(--o-wire-ink-2); font-size: 12px; }
/* the shop */
.onec__shop { background: #fff; overflow: hidden; }
.onec-s__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #eee9df; }
.onec-s__brand { display: flex; align-items: center; gap: 8px; color: #2e4a35; }
.onec-s__brand b { font-size: 16px; letter-spacing: .01em; color: #22362a; }
.onec-s__brand span { color: #6f6a5f; font-size: 12px; }
.onec-s__cart { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid #e6e1d6; border-radius: 50%; background: #fff; cursor: pointer; color: #22362a; }
.onec-s__count { position: absolute; right: -4px; top: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #c9c3b6; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; }
.onec-s__cart.has-items .onec-s__count { background: var(--o-accent); }
.onec-s__grid { flex: 1 1 auto; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px 10px; padding: 12px 14px 40px; align-content: start; }
.onec-s__card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.onec-s__pic { position: relative; aspect-ratio: 1; border-radius: 10px; background: #f1ede6; overflow: hidden; }
.onec-s__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.onec-s__nophoto { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 4px; color: #6f6a5f; font-size: 11px; }
.onec-s__card.is-out .onec-s__pic { opacity: .45; filter: grayscale(.6); }
.onec-s__name { font-weight: 600; font-size: 12.5px; line-height: 1.3; }
.onec-s__price { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.onec-s__price b { font-size: 14px; }
.onec-s__price s { color: #6f6a5f; font-size: 12px; }
.onec-s__stock { color: #4f6354; font-size: 11.5px; }
.onec-s__card.is-out .onec-s__stock { color: var(--o-warn); }
.onec-s__buy { margin-top: auto; min-height: 32px; border: 0; border-radius: 8px; background: #22362a; color: #fff; font-weight: 600; font-size: 12px; cursor: pointer; }
.onec-s__buy:hover { background: #2f4a39; }
.onec-s__buy.is-in { background: #e3ede5; color: #22362a; }
.onec-s__buy:disabled { background: #ece8df; color: #66625a; cursor: default; }
.onec-s__card.is-flash-price .onec-s__price b, .onec-s__card.is-flash-stock .onec-s__stock { animation: onec-flash 1.6s ease; border-radius: 4px; }
.onec-s__card.is-flash-photo .onec-s__pic { animation: onec-photo 1.4s ease; }
@keyframes onec-flash { 0% { background: rgba(232, 93, 61, 0.28); } 100% { background: transparent; } }
@keyframes onec-photo { 0% { opacity: 0; transform: scale(.94); } 100% { opacity: 1; transform: none; } }
.onec-s__cartpanel { position: absolute; right: 12px; top: 58px; z-index: 3; width: min(280px, calc(100% - 24px)); padding: 12px; border-radius: 12px; background: #fff; box-shadow: 0 12px 40px rgba(30, 26, 18, 0.22), 0 0 0 1px #ebe5d9; }
.onec-s__cart-title { font-weight: 700; margin-bottom: 6px; }
.onec-s__cart-empty { color: #6f6a5f; }
.onec-s__cart-lines { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 4px; }
.onec-s__cart-lines li { display: flex; justify-content: space-between; gap: 8px; }
.onec-s__cart-who { color: #6f6a5f; font-size: 12px; margin-bottom: 8px; }
.onec-s__checkout { width: 100%; min-height: 38px; border: 0; border-radius: 10px; background: var(--o-accent); color: #fff; font-weight: 700; cursor: pointer; }
.onec-s__toast { position: absolute; left: 12px; right: 12px; bottom: 30px; z-index: 2; padding: 10px 12px; border-radius: 10px; background: #22362a; color: #fff; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.onec-s__note { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 14px; background: linear-gradient(rgba(255, 255, 255, 0), #fff 40%); color: #66625a; font-size: 11px; }
/* XML drawer */
.onec__drawer { background: #15171b; color: #e3e0d8; border-top: 1px solid #111; }
.onec-d__head { padding: 8px 12px; border-bottom: 1px solid #262a31; }
.onec-d__title { font: 11.5px/1.4 var(--mono); color: #a5adb9; overflow-wrap: anywhere; }
.onec-d__body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); height: 0; overflow: hidden; transition: height .3s ease; }
.onec.has-xml .onec-d__body { height: 176px; }
.onec-d__pre { margin: 0; padding: 8px 0; overflow: auto; font: 11.5px/1.5 var(--mono); white-space: pre; tab-size: 2; }
.onec-d__pre--res { border-left: 1px solid #262a31; color: #b9e3c6; }
.onec-x__line { display: block; padding: 0 12px; }
.onec-x__line.is-changed { background: rgba(255, 179, 107, 0.16); box-shadow: inset 3px 0 0 #ffb36b; }
.onec-x__tag { color: #8ab4ff; }
.onec-x__attr { color: #d6a3ff; }
.onec-x__val { color: #ffcf8a; }
.onec-x__muted { color: #8d95a1; padding: 0 12px; }
/* telegram */
.onec__tg { position: absolute; right: 14px; bottom: 60px; z-index: 5; display: flex; gap: 10px; align-items: flex-start; max-width: 300px; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 12px 36px rgba(20, 30, 50, 0.25), 0 0 0 1px #e3e7ee; animation: onec-tg .35s ease; }
.onec__tg-ico { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #2aa3df; color: #fff; }
.onec__tg b { display: block; font-size: 12px; color: #2a2f38; }
.onec__tg span span { display: block; color: #444; font-size: 12.5px; }
@keyframes onec-tg { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.onec__live, .onec__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1000px) {
  .onec__tabs { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--o-line); }
  .onec__tab { flex: 1; min-height: 36px; border: 1px solid var(--o-line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
  .onec__tab[aria-selected="true"] { background: var(--o-ink); color: #fff; border-color: var(--o-ink); }
  .onec__panes { grid-template-columns: minmax(0, 1fr); height: 520px; }
  .onec__panes > * { display: none; }
  .onec__panes[data-show="0"] .onec__one, .onec__panes[data-show="1"] .onec__wire, .onec__panes[data-show="2"] .onec__shop { display: flex; }
  .onec-d__body { grid-template-columns: minmax(0, 1fr); }
  .onec-d__pre--res { border-left: 0; border-top: 1px solid #262a31; }
  .onec.has-xml .onec-d__body { height: 260px; }
}
@media (max-width: 560px) {
  .onec__btn span { display: none; }
  .onec__btn--primary span { display: inline; }
  .onec-1c__main { grid-template-columns: minmax(0, 1fr); }
  .onec-1c__sections { display: none; }
  .onec-1c__table .c-sku, .onec-1c__table .c-free { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .onec *, .onec *::before, .onec *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===================================================================== site → CRM → manager bench */
.work-stage__frame--demo[data-mounted="crm-flow"] { overflow: hidden; border-radius: var(--radius-lg); background: #f4f5f7; box-shadow: var(--shadow); }
.crm {
  --c-bg: #f4f5f7; --c-line: #dfe2e8; --c-ink: #1d2129; --c-ink-2: #4f5663; --c-ink-3: #5f6672;
  --c-accent: #c2421f; --c-blue: #2b6cd6; --c-ok: #25683f;
  --c-dark: #1b1e24; --c-dark-2: #252932; --c-dark-ink: #e9e6df; --c-dark-ink-2: #a5adb9;
  position: relative; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  background: var(--c-bg); color: var(--c-ink); font-size: 13px; line-height: 1.4; outline: none;
}
.crm :where(button, input, select) { font: inherit; color: inherit; }
.crm p { max-width: none; margin: 0; }
.crm [hidden] { display: none !important; }
.crm :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.crm__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px; border-bottom: 1px solid var(--c-line); background: #fbfbfc; }
.crm__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
.crm__btn:hover { border-color: #b8bec9; }
.crm__btn:disabled { opacity: .5; cursor: default; }
.crm__btn--primary { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.crm__btn--primary:hover { background: #a9391a; border-color: #a9391a; }
.crm__btn--ghost { background: transparent; }
.crm__spacer { flex: 1 1 auto; }
.crm__seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: #eceef2; }
.crm__seg-label { padding: 0 8px 0 10px; color: var(--c-ink-3); font-size: 12px; font-weight: 600; }
.crm__seg-btn { min-height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--c-ink-2); font-weight: 600; }
.crm__seg-btn[aria-checked="true"] { background: #fff; color: var(--c-ink); box-shadow: 0 1px 3px rgba(20, 30, 50, 0.15); }
.crm__coach { display: grid; gap: 2px; padding: 10px 14px; border-bottom: 1px solid var(--c-line); background: #fff5ef; border-left: 3px solid var(--c-accent); }
.crm__coach-step { font-weight: 700; color: #a3331a; font-size: 12px; letter-spacing: .02em; }
.crm__tabs { display: none; }
.crm__panes { display: grid; grid-template-columns: minmax(230px, 0.58fr) minmax(0, 1.6fr) minmax(250px, 0.72fr); height: clamp(440px, 46vw, 540px); min-height: 0; }
.crm__site, .crm__board, .crm__auto { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
/* site */
.crm__site { padding: 14px 14px 10px; background: linear-gradient(180deg, #23382b 0, #23382b 92px, #fff 92px); border-right: 1px solid var(--c-line); overflow: auto; }
.crm-site__brand { display: flex; align-items: center; gap: 6px; color: #d9e8dc; }
.crm-site__brand b { color: #fff; }
.crm-site__head { margin-top: 8px !important; color: #fff; font-weight: 700; font-size: 15px; line-height: 1.25; }
.crm-site__sub { margin-top: 18px !important; color: var(--c-ink-2); font-size: 12.5px; }
.crm-site__form { display: grid; gap: 8px; margin-top: 10px; }
.crm-site__field { display: grid; gap: 3px; font-size: 12px; color: var(--c-ink-2); }
.crm-site__input { min-height: 34px; padding: 6px 10px; border: 1px solid #cfd4dc; border-radius: 8px; background: #fff; color: var(--c-ink); }
.crm-site__input:focus, .crm-site__input.is-typing { border-color: #23382b; box-shadow: 0 0 0 3px rgba(35, 56, 43, 0.15); outline: none; }
.crm-site__consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--c-ink-2); cursor: pointer; }
.crm-site__consent input { margin-top: 2px; accent-color: #23382b; }
.crm-site__send { min-height: 38px; border: 0; border-radius: 10px; background: #23382b; color: #fff; font-weight: 700; cursor: pointer; transition: transform .12s ease; }
.crm-site__send:hover { background: #2f4a39; }
.crm-site__send.is-press { transform: scale(.97); background: #2f4a39; }
.crm-site__msg { min-height: 1.2em; color: var(--c-ok); font-size: 12px; }
.crm-site__msg.is-error { color: #a3331a; }
.crm-site__utm { margin-top: auto !important; padding-top: 8px; font: 11px/1.4 var(--mono); color: var(--c-ink-3); overflow-wrap: anywhere; }
.crm-site__note { margin-top: 4px !important; font-size: 11px; color: var(--c-ink-3); }
/* board */
.crm__board { background: #eef0f4; }
.crm-b__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 10px 12px 6px; }
.crm-b__title { font-weight: 700; }
.crm-b__hint { color: var(--c-ink-3); font-size: 12px; }
.crm-b__cols { flex: 1 1 auto; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(136px, 1fr); gap: 8px; padding: 0 12px 12px; overflow-x: auto; min-height: 0; }
.crm-b__col { display: flex; flex-direction: column; min-height: 0; border-radius: 10px; background: #e3e6ec; transition: background .15s, box-shadow .15s; }
.crm-b__col.is-over { background: #d6e3fb; box-shadow: inset 0 0 0 2px var(--c-blue); }
.crm-b__col-head { display: flex; justify-content: space-between; gap: 6px; padding: 8px 10px 6px; border-top: 3px solid; border-radius: 10px 10px 0 0; font-weight: 700; font-size: 12px; }
.crm-b__col--0 .crm-b__col-head { border-color: #8aa4cf; } .crm-b__col--1 .crm-b__col-head { border-color: #6d9ee8; }
.crm-b__col--2 .crm-b__col-head { border-color: #5fb3c9; } .crm-b__col--3 .crm-b__col-head { border-color: #e2a54b; }
.crm-b__col--4 .crm-b__col-head { border-color: #c38be0; } .crm-b__col--5 .crm-b__col-head { border-color: #3f9b62; }
.crm-b__col-count { color: var(--c-ink-3); font-weight: 600; }
.crm-b__list { flex: 1 1 auto; margin: 0; padding: 0 6px 8px; list-style: none; overflow: auto; display: grid; gap: 6px; align-content: start; min-height: 40px; position: relative; }
.crm-b__card { display: grid; gap: 3px; padding: 8px 9px; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(20, 30, 50, 0.12); cursor: grab; touch-action: pan-y; user-select: none; }
.crm-b__card.is-fresh { animation: crm-fresh 1.4s ease; }
@keyframes crm-fresh { 0% { box-shadow: 0 0 0 3px rgba(43, 108, 214, 0.55); } 100% { box-shadow: 0 1px 2px rgba(20, 30, 50, 0.12); } }
.crm-b__card.is-dragging { opacity: .35; }
.crm-b__ghost { position: absolute; left: 0; top: 0; z-index: 20; pointer-events: none; box-shadow: 0 14px 30px rgba(20, 30, 50, 0.3); cursor: grabbing; }
.crm-b__card-top { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.crm-b__card-top b { font-size: 12.5px; }
.crm-b__tag { padding: 0 6px; border-radius: 999px; font: 600 10.5px/18px var(--mono); background: #eef1f6; color: #4f5663; }
.crm-b__tag--yandex { background: #fff1e0; color: #8a4a00; } .crm-b__tag--avito { background: #e6f4ea; color: #24613b; } .crm-b__tag--seo { background: #ebe8fb; color: #4a3ba0; }
.crm-b__money { color: var(--c-ink-2); font-variant-numeric: tabular-nums; font-size: 12px; }
.crm-b__repeat { color: var(--c-blue); font-size: 11.5px; font-weight: 600; }
.crm-b__task { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 1px 7px; border-radius: 999px; background: #eef4ff; color: #1f4fa0; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.crm-b__card.is-urgent .crm-b__task { background: #fdecea; color: #a3331a; }
.crm-b__task.is-done { background: #e8f3ec; color: var(--c-ok); }
.crm-b__card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.crm-b__avatar { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #d8dde6; color: #3a4150; font-size: 11px; font-weight: 700; }
.crm-b__move { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--c-ink-3); cursor: pointer; }
.crm-b__move:hover { background: #eef1f6; color: var(--c-blue); }
/* automation log */
.crm__auto { background: var(--c-dark); color: var(--c-dark-ink); }
.crm-a__title { display: flex; align-items: center; gap: 6px; padding: 10px 12px 6px; font: 600 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--c-dark-ink-2); }
.crm-a__title svg { color: #ffc285; }
.crm-a__empty { padding: 2px 14px 10px; color: var(--c-dark-ink-2); font-size: 12px; }
.crm-a__list { flex: 1 1 auto; overflow: auto; margin: 0; padding: 0 6px 8px; list-style: none; min-height: 0; }
.crm-a__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: left; color: var(--c-dark-ink); }
.crm-a__row:hover { background: #262b34; }
.crm-a__item.is-selected .crm-a__row { background: #2e3440; box-shadow: inset 2px 0 0 #ffb36b; }
.crm-a__item.is-new .crm-a__row { animation: crm-new .9s ease; }
@keyframes crm-new { from { background: rgba(255, 179, 107, 0.22); } to { background: transparent; } }
.crm-a__dot { grid-row: span 2; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #8ab4ff; }
.crm-a__item--tg .crm-a__dot { background: #2aa3df; } .crm-a__item--deal .crm-a__dot, .crm-a__item--stage .crm-a__dot { background: #7fd0a0; }
.crm-a__item--task .crm-a__dot, .crm-a__item--done .crm-a__dot { background: #ffc285; } .crm-a__item--invoice .crm-a__dot { background: #ffd84d; }
.crm-a__text { font-size: 12.5px; }
.crm-a__api { font: 11px/1.35 var(--mono); color: var(--c-dark-ink-2); overflow-wrap: anywhere; }
/* drawer */
.crm__drawer { background: #15171b; color: #e3e0d8; border-top: 1px solid #111; }
.crm-d__title { padding: 8px 12px; border-bottom: 1px solid #262a31; font: 11.5px/1.4 var(--mono); color: #a5adb9; overflow-wrap: anywhere; }
.crm-d__body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); height: 0; overflow: hidden; transition: height .3s ease; }
.crm.has-payload .crm-d__body { height: 176px; }
.crm-d__pre { margin: 0; padding: 8px 0; overflow: auto; font: 11.5px/1.5 var(--mono); white-space: pre; }
.crm-d__pre--res { border-left: 1px solid #262a31; }
.crm-j__line { display: block; padding: 0 12px; }
.crm-j__line.is-changed { background: rgba(255, 179, 107, 0.16); box-shadow: inset 3px 0 0 #ffb36b; }
.crm-j__key { color: #8ab4ff; } .crm-j__str { color: #ffcf8a; } .crm-j__num { color: #b9e3c6; } .crm-j__lit { color: #d6a3ff; }
/* telegram + confetti */
.crm__tg { position: absolute; right: 14px; bottom: 60px; z-index: 25; display: flex; gap: 10px; align-items: flex-start; max-width: 320px; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 12px 36px rgba(20, 30, 50, 0.25), 0 0 0 1px #e3e7ee; animation: crm-tg .35s ease; }
.crm__tg-ico { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #2aa3df; color: #fff; }
.crm__tg b { display: block; font-size: 12px; color: #2a2f38; }
.crm__tg span span { display: block; color: #3a3f48; font-size: 12.5px; }
@keyframes crm-tg { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.crm__confetti { position: absolute; left: 50%; top: 40px; width: 0; height: 0; pointer-events: none; }
.crm__confetti i { position: absolute; width: 7px; height: 11px; border-radius: 2px; background: var(--c); animation: crm-conf 1.5s cubic-bezier(.2, .6, .3, 1) forwards; }
@keyframes crm-conf { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) * -1.2)) rotate(var(--r)); opacity: 0; } }
.crm__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1000px) {
  .crm__tabs { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--c-line); }
  .crm__tab { flex: 1; min-height: 36px; border: 1px solid var(--c-line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
  .crm__tab[aria-selected="true"] { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
  .crm__panes { grid-template-columns: minmax(0, 1fr); height: 540px; }
  .crm__panes > * { display: none; }
  .crm__panes[data-show="0"] .crm__site, .crm__panes[data-show="1"] .crm__board, .crm__panes[data-show="2"] .crm__auto { display: flex; }
  .crm-d__body { grid-template-columns: minmax(0, 1fr); }
  .crm-d__pre--res { border-left: 0; border-top: 1px solid #262a31; }
  .crm.has-payload .crm-d__body { height: 260px; }
}
@media (max-width: 560px) {
  .crm__btn span { display: none; }
  .crm__btn--primary span { display: inline; }
  .crm__seg-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .crm *, .crm *::before, .crm *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===================================================================== AI consultant bot */
.work-stage__frame--demo[data-mounted="ai-chat"] { overflow: hidden; border-radius: var(--radius-lg); background: #eef1f4; box-shadow: var(--shadow); }
.aichat {
  --a-bg: #eef1f4; --a-line: #d9dee5; --a-ink: #1d2129; --a-ink-2: #4f5663; --a-ink-3: #5f6672;
  --a-accent: #c2421f; --a-tg: #3390ec; --a-tg-dark: #1c63ab; --a-out: #e3f7d4;
  --a-dark: #1b1e24; --a-dark-2: #252932; --a-dark-ink: #e9e6df; --a-dark-ink-2: #a5adb9;
  display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--a-bg); color: var(--a-ink); font-size: 13px; line-height: 1.4; outline: none;
}
.aichat :where(button, input) { font: inherit; color: inherit; }
.aichat p { max-width: none; margin: 0; }
.aichat [hidden] { display: none !important; }
.aichat :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.aichat__bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--a-line); background: #f9fafb; }
.aichat__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--a-line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
.aichat__btn--primary { background: var(--a-accent); border-color: var(--a-accent); color: #fff; }
.aichat__btn--primary:hover { background: #a9391a; }
.aichat__btn--ghost { background: transparent; }
.aichat__spacer { flex: 1; }
.aichat__main { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 0; min-height: 0; height: clamp(520px, 52vw, 620px); }
/* the phone */
.aichat__phone { display: flex; flex-direction: column; min-height: 0; margin: 14px; border-radius: 22px; overflow: hidden; background: #c8d8e4; box-shadow: 0 0 0 7px #16191d, 0 0 0 8px #3a3f47, 0 18px 40px rgba(20, 30, 50, 0.28); }
.aichat-p__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--a-tg-dark); color: #fff; }
.aichat-p__ava { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #23382b; color: #cfe6d3; flex: none; }
.aichat-p__who { display: grid; line-height: 1.2; }
.aichat-p__who b { font-size: 14px; }
.aichat-p__status { font-size: 12px; color: #dbe9fa; }
.aichat-p__feed { flex: 1 1 auto; overflow: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; background: #cfdde8 radial-gradient(circle at 20% 20%, rgba(255,255,255,.35), transparent 40%), linear-gradient(160deg, #d4e3cf, #c8d8e4); }
.aichat-m { display: flex; flex-direction: column; max-width: 86%; }
.aichat-m--bot { align-self: flex-start; }
.aichat-m--user { align-self: flex-end; align-items: flex-end; }
.aichat-m__bubble { position: relative; padding: 7px 10px 6px; border-radius: 14px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12); font-size: 13.5px; line-height: 1.4; animation: aichat-in .25s ease; }
.aichat-m--bot .aichat-m__bubble { border-bottom-left-radius: 4px; }
.aichat-m--user .aichat-m__bubble { background: var(--a-out); border-bottom-right-radius: 4px; }
@keyframes aichat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.aichat-m__text { white-space: pre-wrap; }
.aichat-m__time { float: right; margin: 6px 0 -2px 10px; font-size: 11px; color: #4a644e; }
.aichat-m--bot .aichat-m__time { color: #646b74; }
.aichat-m__file { display: flex; gap: 8px; align-items: center; color: var(--a-tg-dark); }
.aichat-m__file b { display: block; color: var(--a-ink); font-size: 13px; }
.aichat-m__file i { display: block; font-style: normal; color: #737b85; font-size: 12px; }
.aichat-m__kbd { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.aichat-m__ib { flex: 1 1 auto; min-height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: #3f5468; color: #fff; font-weight: 600; cursor: pointer; }
.aichat-m__ib:hover { background: #2f4152; }
.aichat-m--typing .aichat-m__bubble { display: flex; gap: 4px; padding: 11px 12px; }
.aichat-m--typing i { width: 7px; height: 7px; border-radius: 50%; background: #8f9aa5; animation: aichat-dot 1s infinite ease-in-out; }
.aichat-m--typing i:nth-child(2) { animation-delay: .15s; } .aichat-m--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aichat-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
.aichat-p__kb { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 8px 0; background: #f4f5f7; }
.aichat-p__kb:empty { display: none; }
.aichat-p__chip { min-height: 32px; padding: 0 11px; border: 1px solid #d5dae1; border-radius: 999px; background: #fff; cursor: pointer; font-size: 12.5px; color: #1f4fa0; }
.aichat-p__chip:hover { border-color: var(--a-tg); }
.aichat-p__chip.is-contact { background: var(--a-tg); border-color: var(--a-tg); color: #fff; font-weight: 600; }
.aichat-p__form { display: flex; gap: 6px; padding: 8px; background: #f4f5f7; }
.aichat-p__input { flex: 1; min-width: 0; min-height: 38px; padding: 0 12px; border: 1px solid #d5dae1; border-radius: 999px; background: #fff; }
.aichat-p__input:focus { border-color: var(--a-tg); outline: none; box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.18); }
.aichat-p__send { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--a-tg-dark); color: #fff; cursor: pointer; flex: none; }
/* under the hood */
.aichat__hood { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-content: start; gap: 10px; min-height: 0; overflow: auto; padding: 12px 14px; background: var(--a-dark); color: var(--a-dark-ink); }
.aichat__hood > :nth-child(1), .aichat__hood > :nth-child(2), .aichat__hood > :nth-child(3), .aichat__hood > :nth-child(6), .aichat__hood > :nth-child(7) { grid-column: 1 / -1; }
.aichat-h__title { display: flex; align-items: center; gap: 6px; font: 600 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--a-dark-ink-2); }
.aichat-h__title svg { color: #ffc285; }
.aichat-h__block { padding: 10px 12px; border-radius: 10px; background: var(--a-dark-2); }
.aichat-h__label { margin-bottom: 6px !important; font: 600 11px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--a-dark-ink-2); }
.aichat-h__muted { color: var(--a-dark-ink-2); font-size: 12px; }
.aichat-h__intent { display: flex; align-items: center; gap: 10px; }
.aichat-h__intent b { font-size: 13.5px; }
.aichat-h__meter { flex: 1; height: 6px; border-radius: 3px; background: #343a45; overflow: hidden; }
.aichat-h__meter i { display: block; height: 100%; background: linear-gradient(90deg, #ffb36b, #7fd0a0); transition: width .4s ease; }
.aichat-h__pct { font: 12px var(--mono); color: #7fd0a0; }
.aichat-h__terms { margin-top: 6px !important; display: flex; flex-wrap: wrap; gap: 4px; }
.aichat-h__terms code { padding: 1px 6px; border-radius: 4px; background: #343a45; color: #ffcf8a; font-size: 11.5px; }
.aichat-h__hits { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.aichat-h__hits li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; align-items: start; }
.aichat-h__hits li.is-weak { opacity: .55; }
.aichat-h__score { padding: 2px 0; border-radius: 4px; background: #343a45; color: #7fd0a0; font: 600 11.5px/1.4 var(--mono); text-align: center; }
.aichat-h__chunk { display: grid; gap: 2px; font-size: 12px; }
.aichat-h__chunk b { font: 600 11.5px var(--mono); color: #8ab4ff; }
.aichat-h__chunk mark { background: rgba(255, 179, 107, 0.3); color: #fff; border-radius: 2px; }
.aichat-h__topic { margin-left: 6px; padding: 0 5px; border-radius: 4px; background: rgba(127, 208, 160, 0.18); color: #7fd0a0; font-style: normal; font-size: 10.5px; }
.aichat-h__pre { margin: 0; padding: 8px 10px; border-radius: 8px; background: #15171b; white-space: pre-wrap; font: 11.5px/1.5 var(--mono); color: #d8d4cb; max-height: 132px; overflow: auto; }
.aichat-h__slots, .aichat-h__acts { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.aichat-h__slots li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--a-dark-ink-2); }
.aichat-h__slots b { color: var(--a-dark-ink-2); font-weight: 600; }
.aichat-h__slots b.is-set { color: #7fd0a0; }
.aichat-h__acts li { padding: 6px 8px; border-radius: 6px; background: #1f2a24; color: #b9e3c6; font-size: 12.5px; animation: aichat-in .3s ease; }
.aichat-h__acts li.is-tg { background: #1d2733; color: #9ccaf6; } .aichat-h__acts li.is-task { background: #2e261c; color: #ffcf8a; }
.aichat-h__note { color: var(--a-dark-ink-2); font-size: 11.5px; line-height: 1.45; }
@media (max-width: 900px) {
  .aichat__main { grid-template-columns: minmax(0, 1fr); height: auto; }
  .aichat__hood { grid-template-columns: minmax(0, 1fr); }
  .aichat__phone { height: 560px; margin: 12px auto; width: min(400px, calc(100% - 28px)); }
  .aichat__hood { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .aichat *, .aichat *::before, .aichat *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---- 3D presentation (deck-3d): slides are views of one live 3D scene ---- */
.work-stage__frame--demo[data-mounted="deck-3d"] { overflow: hidden; border-radius: var(--radius-lg); background: #0b0d10; box-shadow: var(--shadow); }
.deck3d { --d-bg: #0b0d10; --d-bar: #12151a; --d-line: rgba(255, 255, 255, 0.13); --d-text: #f4f1ea; --d-mute: #b9bfc9; --d-accent: #f4b45f; position: relative; container-type: inline-size; color: var(--d-text); background: var(--d-bg); outline: none; }
.deck3d:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 3px; }
.deck3d [hidden] { display: none !important; }
.deck3d__screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #1a1c1f; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.deck3d__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.deck3d__chips { position: absolute; inset: 0; pointer-events: none; }
.deck3d__scrim { position: absolute; inset: 0; pointer-events: none; transition: background 0.8s; background: linear-gradient(90deg, rgba(8, 10, 14, 0.66) 0%, rgba(8, 10, 14, 0.38) 30%, rgba(8, 10, 14, 0) 56%); }
.deck3d__scrim[data-layout="hero"] { background: linear-gradient(0deg, rgba(8, 10, 14, 0.72) 0%, rgba(8, 10, 14, 0.28) 36%, rgba(8, 10, 14, 0) 58%); }
.deck3d__scrim[data-layout="end"], .deck3d__scrim[data-layout="left-bottom"] { background: linear-gradient(0deg, rgba(8, 10, 14, 0.74) 0%, rgba(8, 10, 14, 0.24) 44%, rgba(8, 10, 14, 0) 64%); }
.deck3d__scrim[data-layout="stats"] { background: linear-gradient(0deg, rgba(8, 10, 14, 0.8) 0%, rgba(8, 10, 14, 0.3) 40%, rgba(8, 10, 14, 0) 60%), linear-gradient(180deg, rgba(8, 10, 14, 0.5) 0%, rgba(8, 10, 14, 0) 32%); }
.deck3d__scrim[data-layout="center"] { background: radial-gradient(ellipse at 50% 50%, rgba(8, 10, 14, 0.66) 0%, rgba(8, 10, 14, 0.2) 72%); }
.deck3d__textwrap { position: absolute; inset: 0; pointer-events: none; }
.deck3d__text { position: absolute; left: 5.5%; top: 8.5%; width: min(44%, 600px); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5); }
.deck3d__text[data-layout="hero"] { top: auto; bottom: 10%; width: 56%; }
.deck3d__text[data-layout="left-bottom"] { top: auto; bottom: 8.5%; width: 48%; }
.deck3d__text[data-layout="stats"] { top: 8.5%; bottom: 8.5%; width: 89%; display: flex; flex-direction: column; }
.deck3d__text[data-layout="center"] { left: 10%; width: 80%; top: 30%; text-align: center; }
.deck3d__text[data-layout="end"] { top: auto; bottom: 10%; width: 54%; }
.deck3d__kicker { margin: 0 0 0.65em; font-size: clamp(11px, 1.3cqw, 16px); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--d-accent); }
.deck3d__title { margin: 0; font-size: clamp(20px, 3.4cqw, 46px); font-weight: 650; line-height: 1.08; letter-spacing: -0.012em; text-wrap: balance; }
.deck3d__text[data-layout="hero"] .deck3d__title { font-size: clamp(32px, 7.4cqw, 100px); line-height: 0.98; letter-spacing: -0.03em; }
.deck3d__text[data-layout="center"] .deck3d__title, .deck3d__text[data-layout="end"] .deck3d__title { font-size: clamp(22px, 4.4cqw, 58px); }
.deck3d__w { display: inline-block; }
.deck3d__body { margin: 0.75em 0 0; max-width: 36em; font-size: clamp(12px, 1.5cqw, 19px); line-height: 1.45; color: #ebe8e1; }
.deck3d__text[data-layout="center"] .deck3d__body { margin-inline: auto; }
.deck3d__stats { display: flex; flex-wrap: wrap; gap: 0.5em 2.4em; margin: 1.1em 0 0; padding: 0; list-style: none; }
.deck3d__text[data-layout="stats"] .deck3d__stats { margin-top: auto; gap: 0.6em 4.5cqw; }
.deck3d__stat { display: grid; gap: 0.15em; }
.deck3d__stat-v { font-size: clamp(22px, 3.6cqw, 50px); font-weight: 650; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.deck3d__text[data-layout="stats"] .deck3d__stat-v { font-size: clamp(24px, 4.6cqw, 64px); }
.deck3d__stat-u { font-size: 0.55em; font-weight: 600; letter-spacing: 0; }
.deck3d__stat-l { font-size: clamp(11px, 1.25cqw, 15px); color: #dcd9d2; }
.deck3d__legend { display: grid; gap: 0.45em; margin: 1.1em 0 0; padding: 0; list-style: none; font-size: clamp(11px, 1.35cqw, 16px); }
.deck3d__zone { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.6em; max-width: 22em; }
.deck3d__swatch { width: 0.95em; height: 0.95em; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.deck3d__zone-v { font-variant-numeric: tabular-nums; color: #dcd9d2; }
.deck3d__num { position: absolute; top: 4.6%; right: 3.6%; margin: 0; font-size: clamp(10px, 1.1cqw, 14px); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.82); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); pointer-events: none; }
.deck3d__loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; color: rgba(244, 241, 234, 0.85); background: linear-gradient(180deg, #23262b, #121418); }
/* labels pinned to the scene */
.deck3d__chip { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 0.45em; padding: 0.38em 0.75em; border-radius: 999px; font-size: clamp(10px, 1.08cqw, 13px); line-height: 1.2; white-space: nowrap; color: #fff; background: rgba(12, 14, 18, 0.74); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); opacity: 0; will-change: transform, opacity; }
.deck3d__chip--place::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--d-accent); box-shadow: 0 0 0 3px rgba(244, 180, 95, 0.32); }
.deck3d__chip--room { flex-direction: column; gap: 0.05em; padding: 0.3em 0.6em 0.32em 0.75em; border-radius: 6px; text-align: center; }
.deck3d__chip-swatch { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 6px 0 0 6px; }
.deck3d__chip-s { font-size: 0.86em; font-variant-numeric: tabular-nums; color: #d9dde3; }
.deck3d__chip.is-small .deck3d__chip-s { display: none; }
.deck3d__chip--dim { padding: 0.28em 0.6em; border: 1px solid rgba(225, 236, 248, 0.75); border-radius: 4px; font-family: var(--font-mono, ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace); font-variant-numeric: tabular-nums; background: #0f2944; color: #f1f6fc; }
/* controls */
.deck3d__bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-top: 1px solid var(--d-line); background: var(--d-bar); }
.deck3d__btn { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 38px; height: 38px; padding: 0 8px; border: 1px solid transparent; border-radius: 9px; font: inherit; font-size: 13px; color: var(--d-text); background: transparent; cursor: pointer; }
.deck3d__btn:hover { background: rgba(255, 255, 255, 0.09); }
.deck3d__btn:focus-visible, .deck3d__dot:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 1px; }
.deck3d__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.deck3d__btn svg .is-fill { fill: currentColor; stroke: none; }
.deck3d__btn--text { margin-left: 2px; padding: 0 12px; border-color: var(--d-line); }
.deck3d__btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.13); }
.deck3d__dots { display: flex; flex: 1; gap: 4px; min-width: 0; margin: 0 6px; padding: 0; list-style: none; }
.deck3d__dots li { display: flex; flex: 1; min-width: 0; }
.deck3d__dot { position: relative; flex: 1; min-width: 0; height: 30px; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.deck3d__dot::before, .deck3d__dot-fill { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; }
.deck3d__dot::before { content: ""; background: rgba(255, 255, 255, 0.22); }
.deck3d__dot[aria-current="step"]::before { background: rgba(255, 255, 255, 0.4); }
.deck3d__dot:hover::before { background: rgba(255, 255, 255, 0.55); }
.deck3d__dot-fill { background: var(--d-text); transform: scaleX(0); transform-origin: 0 50%; }
.deck3d__counter { flex: none; min-width: 3.4em; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; color: var(--d-mute); }
.deck3d__notes { padding: 14px 18px 18px; border-top: 1px solid var(--d-line); background: #15181d; }
.deck3d__notes[hidden] { display: none; }
.deck3d__notes-head { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--d-mute); }
.deck3d__notes-text { max-width: 78ch; margin: 0; font-size: 15px; line-height: 1.6; color: var(--d-text); }
.deck3d__live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.deck3d.is-fullscreen { display: flex; flex-direction: column; justify-content: center; width: 100vw; height: 100vh; background: #000; }
.deck3d.is-fullscreen .deck3d__screen { width: min(100vw, calc((100vh - 56px) * 16 / 9)); margin: 0 auto; }
.deck3d.is-fullscreen .deck3d__notes { position: absolute; left: 0; right: 0; bottom: 56px; max-height: 40vh; overflow: auto; background: rgba(21, 24, 29, 0.94); }
.deck3d.is-fullscreen .deck3d__bar { position: absolute; left: 0; right: 0; bottom: 0; }
/* narrow: the text leaves the picture and sits under it */
@container (max-width: 640px) {
  .deck3d__screen { display: flex; flex-direction: column; aspect-ratio: auto; }
  .deck3d__canvas { position: relative; inset: auto; height: auto; aspect-ratio: 16 / 10; }
  .deck3d__chips { bottom: auto; height: auto; aspect-ratio: 16 / 10; }
  .deck3d__scrim { display: none; }
  .deck3d__textwrap { position: relative; inset: auto; min-height: 10.5em; padding: 14px 16px 16px; background: #101317; }
  .deck3d__text, .deck3d__text[data-layout] { position: relative; left: auto; top: auto; bottom: auto; display: block; width: auto; text-align: left; text-shadow: none; }
  .deck3d__text.is-ghost { position: absolute; left: 16px; right: 16px; top: 14px; }
  .deck3d__title, .deck3d__text[data-layout] .deck3d__title { font-size: 22px; line-height: 1.12; letter-spacing: -0.01em; }
  .deck3d__body { font-size: 14px; }
  .deck3d__kicker { font-size: 11px; }
  .deck3d__stats, .deck3d__text[data-layout="stats"] .deck3d__stats { gap: 8px 22px; margin-top: 12px; }
  .deck3d__stat-v, .deck3d__text[data-layout="stats"] .deck3d__stat-v { font-size: 24px; }
  .deck3d__stat-l { font-size: 12px; }
  .deck3d__legend { font-size: 13px; }
  .deck3d__chip { font-size: 10px; }
  .deck3d__chip--room .deck3d__chip-s { display: none; }
  .deck3d__num { top: 10px; right: 12px; }
  .deck3d__counter { display: none; }
  .deck3d__dots { margin: 0 2px; gap: 3px; }
  .deck3d__btn { min-width: 36px; height: 36px; padding: 0 6px; }
  .deck3d__btn--text { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) { .deck3d__scrim { transition: none; } }
/* ---- end deck-3d ---- */

/* ---- reels feed (reels-feed): vertical reels in a phone, scrolled like a feed ---- */
.work-stage__frame--demo[data-mounted="reels-feed"] { overflow: hidden; border-radius: var(--radius-lg); background: #111317; box-shadow: var(--shadow); }
/* the mount point is the container: a container query cannot restyle the container itself */
.work-stage__demo--reels-feed, .work-stage__demo--seo-audit { container-type: inline-size; }
.reels { --r-text: #f3f1ec; --r-mute: #bcc2cc; --r-line: rgba(255, 255, 255, 0.12); --r-accent: #f4b45f; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: start; padding: 32px 36px; container-type: inline-size; color: var(--r-text); background: radial-gradient(ellipse at 20% 0%, #1d222b 0%, #111317 60%); outline: none; }
.reels:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 3px; }
.reels__stage { display: grid; justify-items: center; gap: 14px; }
.reels__phone { width: 330px; padding: 11px; border-radius: 48px; background: linear-gradient(145deg, #2a2d33, #0c0d0f); box-shadow: 0 0 0 1.5px #3a3e45, 0 26px 60px rgba(0, 0, 0, 0.55); }
.reels__screen { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 38px; background: #000; }
.reels__feed { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; }
.reels__feed::-webkit-scrollbar { display: none; }
.reels__feed:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: -3px; border-radius: 38px; }
.reels__item { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.reels__video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; cursor: pointer; }
.reels__progress { position: absolute; left: 18px; right: 18px; top: 40px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.32); overflow: hidden; pointer-events: none; }
.reels__progress-fill { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }
.reels__cap { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 46px 18px 18px; background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0)); pointer-events: none; }
.reels__cap-kind { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--r-accent); }
.reels__cap-title { font-size: 15px; font-weight: 650; color: #fff; }
.reels__big { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.reels__big.is-shown { opacity: 1; pointer-events: auto; cursor: pointer; }
.reels__big svg { width: 30px; height: 30px; }
.reels__big svg .is-fill, .reels__navbtn svg .is-fill { fill: currentColor; stroke: none; }
.reels__sound { position: absolute; top: 54px; right: 14px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, 0.5); cursor: pointer; }
.reels__sound svg, .reels__navbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reels__sound:focus-visible, .reels__navbtn:focus-visible, .reels__row:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 2px; }
.reels__notch { position: absolute; left: 50%; top: 9px; z-index: 3; width: 84px; height: 22px; margin-left: -42px; border-radius: 12px; background: #000; pointer-events: none; }
.reels__nav { display: flex; gap: 8px; }
.reels__navbtn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--r-line); border-radius: 12px; color: var(--r-text); background: rgba(255, 255, 255, 0.04); cursor: pointer; }
.reels__navbtn:hover { background: rgba(255, 255, 255, 0.1); }
.reels__side { min-width: 0; }
.reels__side-head { margin: 4px 0 14px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--r-mute); }
.reels__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.reels__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid var(--r-line); border-radius: 14px; font: inherit; text-align: left; color: var(--r-text); background: rgba(255, 255, 255, 0.03); cursor: pointer; }
.reels__row:hover { background: rgba(255, 255, 255, 0.07); }
.reels__row[aria-current="true"] { border-color: rgba(244, 180, 95, 0.7); background: rgba(244, 180, 95, 0.09); }
.reels__row-n { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--r-mute); padding-top: 2px; }
.reels__row-body { display: grid; gap: 6px; min-width: 0; }
.reels__row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.reels__row-kind { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--r-accent); }
.reels__row-title { font-size: 16px; font-weight: 650; }
.reels__row-now { display: none; margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 11px; color: #1b1407; background: var(--r-accent); }
.reels__row[aria-current="true"] .reels__row-now { display: inline-block; }
.reels__row-text { font-size: 14px; line-height: 1.5; color: #dad7d0; }
.reels__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.reels__tag { padding: 3px 9px; border: 1px solid var(--r-line); border-radius: 999px; font-size: 12px; color: var(--r-mute); }
.reels__note { margin: 14px 0 0; font-size: 13px; color: var(--r-mute); }
.reels__live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@container (max-width: 720px) {
  .reels { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 22px 16px; }
  .reels__phone { width: min(300px, 82vw); }
  .reels__row { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { .reels__big { transition: none; } .reels__feed { scroll-behavior: auto; } }

/* ---- live SEO audit (seo-audit): crawl of this site, checks, snippet, speed ---- */
.work-stage__frame--demo[data-mounted="seo-audit"] { overflow: hidden; border-radius: var(--radius-lg); background: #111317; box-shadow: var(--shadow); }
.seoa { --s-text: #f1f0ec; --s-mute: #b8bec9; --s-line: rgba(255, 255, 255, 0.12); --s-accent: #f4b45f; --s-ok: #7fd39b; --s-note: #f4c46a; --s-bad: #ff8a80; display: grid; gap: 16px; padding: 24px 26px 26px; color: var(--s-text); background: linear-gradient(180deg, #171a20, #111317); outline: none; container-type: inline-size; }
.seoa:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 3px; }
.seoa__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.seoa__run { padding: 11px 18px; border: 0; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 650; color: #1b1407; background: var(--s-accent); cursor: pointer; }
.seoa__run:hover { filter: brightness(1.06); }
.seoa__status { flex: 1 1 260px; margin: 0; font-size: 14px; line-height: 1.45; color: var(--s-mute); font-variant-numeric: tabular-nums; }
.seoa__tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--s-line); }
.seoa__tab { margin-bottom: -1px; padding: 10px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; font: inherit; font-size: 14px; color: var(--s-mute); background: transparent; cursor: pointer; }
.seoa__tab[aria-selected="true"] { border-color: var(--s-line); color: var(--s-text); background: #1b1f26; }
.seoa__run:focus-visible, .seoa__tab:focus-visible, .seoa__panel:focus-visible, .seoa__select:focus-visible, .seoa__input:focus-visible, .seoa__details summary:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 2px; }
.seoa__panel[hidden] { display: none; }
.seoa__panel { display: grid; gap: 14px; min-width: 0; }
.seoa__stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.seoa__stat { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--s-line); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.seoa__stat-v { font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.seoa__stat-l { font-size: 12px; line-height: 1.35; color: var(--s-mute); }
.seoa__graph { position: relative; height: clamp(300px, 46cqw, 470px); border: 1px solid var(--s-line); border-radius: 14px; background: radial-gradient(ellipse at 50% 50%, #1a2029, #12151a 75%); overflow: hidden; }
.seoa__canvas { display: block; width: 100%; height: 100%; }
.seoa__tip { position: absolute; max-width: 240px; display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; font-size: 12px; line-height: 1.35; color: var(--s-text); background: rgba(10, 12, 16, 0.92); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); pointer-events: none; }
.seoa__tip[hidden] { display: none; }
.seoa__tip b { font-weight: 600; color: var(--s-accent); overflow-wrap: anywhere; }
.seoa__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--s-mute); }
.seoa__legend li { display: flex; align-items: center; gap: 7px; }
.seoa__swatch { width: 10px; height: 10px; border-radius: 50%; }
.seoa__checks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.seoa__empty { padding: 18px; border: 1px dashed var(--s-line); border-radius: 12px; color: var(--s-mute); }
.seoa__check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 14px; border: 1px solid var(--s-line); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.seoa__mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; color: #111; background: var(--s-ok); }
.seoa__check.is-note .seoa__mark { background: var(--s-note); }
.seoa__check.is-bad .seoa__mark { background: var(--s-bad); }
.seoa__check-body { display: grid; gap: 6px; min-width: 0; }
.seoa__check-line { margin: 0; font-size: 14px; line-height: 1.45; }
.seoa__check-state { color: var(--s-mute); }
.seoa__details summary { cursor: pointer; font-size: 13px; color: var(--s-accent); }
.seoa__ex { display: grid; gap: 4px; margin: 8px 0 0; padding: 0 0 0 18px; font-size: 13px; color: var(--s-mute); }
.seoa__ex code { font-family: var(--mono, ui-monospace, monospace); color: var(--s-text); overflow-wrap: anywhere; }
.seoa__snipform { display: grid; gap: 12px; }
.seoa__field { display: grid; gap: 6px; }
.seoa__label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--s-mute); }
.seoa__select, .seoa__input { width: 100%; padding: 10px 12px; border: 1px solid var(--s-line); border-radius: 10px; font: inherit; font-size: 15px; color: var(--s-text); background: #0d0f13; }
.seoa__input--area { resize: vertical; line-height: 1.45; }
.seoa__meter { margin: 0; font-size: 13px; color: var(--s-ok); font-variant-numeric: tabular-nums; }
.seoa__meter.is-over { color: var(--s-note); }
.seoa__previews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.seoa__serp { display: grid; gap: 4px; padding: 16px 18px; border-radius: 12px; background: #fff; color: #202124; font-family: Arial, sans-serif; }
.seoa__serp-engine { margin: 0 0 6px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #5f6368; }
.seoa__serp-url { margin: 0; font-size: 13px; color: #3c4043; overflow-wrap: anywhere; }
.seoa__serp-title { margin: 0; font-size: 20px; line-height: 1.3; color: #1a0dab; }
.seoa__serp--y .seoa__serp-title { font-size: 18px; color: #0c0c7a; }
.seoa__serp--y .seoa__serp-url { color: #006000; }
.seoa__serp-desc { margin: 0; font-size: 14px; line-height: 1.55; color: #4d5156; }
.seoa__hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--s-mute); }
.seoa__subhead { margin: 4px 0 0; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--s-mute); }
.seoa__vitals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.seoa__vital { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--s-line); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.seoa__vital-l { font-size: 12px; line-height: 1.35; color: var(--s-mute); }
.seoa__vital-v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.seoa__vital-g { justify-self: start; padding: 2px 8px; border-radius: 999px; font-size: 12px; color: #111; background: var(--s-mute); }
.seoa__vital.is-good .seoa__vital-g { background: var(--s-ok); }
.seoa__vital.is-mid .seoa__vital-g { background: var(--s-note); }
.seoa__vital.is-poor .seoa__vital-g { background: var(--s-bad); }
.seoa__weights { display: grid; gap: 8px; }
.seoa__wrow { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 13px; }
.seoa__wl { color: var(--s-mute); }
.seoa__wtrack { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.seoa__wbar { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #6fa8ff, #f4b45f); }
.seoa__wv { font-variant-numeric: tabular-nums; }
@container (max-width: 700px) {
  .seoa { padding: 18px 14px 20px; }
  .seoa__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seoa__previews, .seoa__vitals { grid-template-columns: minmax(0, 1fr); }
  .seoa__graph { height: 300px; }
}

/* ---- design project viewer (design-views): renders tied to the cameras on the plan ---- */
.work-stage__frame--demo[data-mounted="design-views"] { overflow: hidden; border-radius: var(--radius-lg); background: #f1ece3; box-shadow: var(--shadow); }
html.dark .work-stage__frame--demo[data-mounted="design-views"] { background: #17150f; }
.work-stage__demo--design-views { container-type: inline-size; }
.dsv { --dsv-bg: #f1ece3; --dsv-panel: #faf7f1; --dsv-ink: #22201d; --dsv-mute: #655e54; --dsv-line: #d8cfbf; --dsv-accent: #a85d36; --dsv-accent-ink: #fff; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; padding: 22px; color: var(--dsv-ink); background: var(--dsv-bg); }
html.dark .dsv { --dsv-bg: #17150f; --dsv-panel: #211e18; --dsv-ink: #efe9df; --dsv-mute: #aaa194; --dsv-line: #3a352d; --dsv-accent: #e3a172; --dsv-accent-ink: #1b140e; }
.dsv__view { display: grid; gap: 12px; align-content: start; min-width: 0; }
.dsv__frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 10px; background: var(--media-color, #d9d2c6); cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dsv__photo, .dsv__model { position: absolute; inset: 0; }
.dsv__model { clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0); }
.dsv__pic { position: absolute; inset: 0; transition: opacity 0.4s ease; }
.dsv__pic.is-in { opacity: 0; }
.dsv__pic img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.dsv__handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 0; outline: none; }
.dsv__handle::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16); }
.dsv__knob { position: absolute; top: 50%; left: 0; display: grid; place-items: center; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; color: #22201d; background: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28); transition: transform 0.15s; }
.dsv__frame.is-dragging .dsv__knob, .dsv__handle:hover .dsv__knob { transform: scale(1.08); }
.dsv__knob svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dsv__handle:focus-visible .dsv__knob { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 3px; }
.dsv__tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: #fff; background: rgba(22, 20, 16, 0.58); pointer-events: none; transition: opacity 0.2s; }
.dsv__tag--model { left: 12px; }
.dsv__tag--photo { right: 12px; }
.dsv__tag.is-hidden { opacity: 0; }
.dsv__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.dsv__nav { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--dsv-line); border-radius: 10px; color: var(--dsv-ink); background: var(--dsv-panel); cursor: pointer; }
.dsv__nav:hover { border-color: var(--dsv-mute); }
.dsv__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dsv__nav:focus-visible, .dsv__chip:focus-visible, .dsv__thumb:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 2px; }
.dsv__caption { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 10px; min-width: 0; }
.dsv__room { grid-column: 2; }
.dsv__n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--dsv-accent-ink); background: var(--dsv-accent); }
.dsv__title { font-size: 17px; font-weight: 650; }
.dsv__room { font-size: 14px; color: var(--dsv-mute); }
.dsv__finish { display: flex; flex-wrap: wrap; gap: 6px 18px; min-height: 20px; margin: 0; font-size: 13px; }
.dsv__fin { display: flex; gap: 6px; align-items: baseline; }
.dsv__fin dt { color: var(--dsv-mute); }
.dsv__fin dt::after { content: ':'; }
.dsv__fin dd { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.dsv__sw { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--sw, transparent); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16); }
.dsv__sw--dot { border-radius: 50%; }
.dsv__sw.is-empty { display: none; }
.dsv__thumbs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.dsv__thumb { position: relative; aspect-ratio: 3 / 2; padding: 0; overflow: hidden; border: 0; border-radius: 6px; background: var(--dsv-line); opacity: 0.72; cursor: pointer; transition: opacity 0.2s; }
.dsv__thumb:hover, .dsv__thumb[aria-current="true"] { opacity: 1; }
.dsv__thumb[aria-current="true"] { box-shadow: 0 0 0 2px var(--dsv-accent); }
.dsv__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dsv__thumb-n { position: absolute; left: 4px; bottom: 4px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #22201d; background: rgba(255, 255, 255, 0.88); }
.dsv__plancol { display: grid; align-content: start; gap: 12px; min-width: 0; }
.dsv__layers { display: flex; flex-wrap: wrap; gap: 6px; }
.dsv__chip { padding: 6px 12px; border: 1px solid var(--dsv-line); border-radius: 999px; font: inherit; font-size: 13px; line-height: 1.2; color: var(--dsv-ink); background: var(--dsv-panel); cursor: pointer; }
.dsv__chip:hover { border-color: var(--dsv-mute); }
.dsv__chip[aria-pressed="true"] { border-color: var(--dsv-ink); color: var(--dsv-panel); background: var(--dsv-ink); }
.dsv__chip--whole { margin-left: auto; }
.dsv__plan { overflow: hidden; border-radius: 10px; background: #fbf9f5; box-shadow: inset 0 0 0 1px var(--dsv-line); }
.dsv__svg { display: block; width: 100%; height: auto; aspect-ratio: 332 / 247; }
.dsv__svg [data-layer="floor"], .dsv__svg [data-layer="light"], .dsv__svg [data-layer="dims"], .dsv__svg [data-layer="furn"], .dsv__svg [data-layer="rug"] { display: none; }
.dsv--l-furn .dsv__svg [data-layer="furn"], .dsv--l-furn .dsv__svg [data-layer="rug"], .dsv--l-light .dsv__svg [data-layer="light"], .dsv--l-floor .dsv__svg [data-layer="floor"], .dsv--l-dims .dsv__svg [data-layer="dims"] { display: inline; }
.dsv__svg text { font-family: 'Golos Text', system-ui, sans-serif; }
.dsv__svg .cam { cursor: pointer; }
.dsv__svg .cam__cone { fill: rgba(168, 93, 54, 0.12); stroke: rgba(168, 93, 54, 0.5); stroke-width: 0.3; transition: fill 0.2s; }
.dsv__svg .cam__dot { fill: #fbf9f5; stroke: #a85d36; stroke-width: 0.6; transition: fill 0.2s; }
.dsv__svg .cam__num { fill: #a85d36; pointer-events: none; }
.dsv__svg .cam:hover .cam__cone { fill: rgba(168, 93, 54, 0.22); }
.dsv__svg .cam.is-active .cam__cone { fill: rgba(168, 93, 54, 0.3); stroke: #a85d36; }
.dsv__svg .cam.is-active .cam__dot { fill: #a85d36; }
.dsv__svg .cam.is-active .cam__num { fill: #fff; }
.dsv__legend { display: grid; gap: 8px; font-size: 13px; }
.dsv__legend:empty { display: none; }
.dsv__legend-head { margin: 0; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dsv-mute); }
.dsv__legend-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; }
.dsv__legend-list li { display: inline-flex; gap: 6px; align-items: center; }
.dsv__loading { margin: 0; padding: 60px 16px; font-size: 14px; text-align: center; color: var(--dsv-mute); }
.dsv__palette { display: grid; gap: 8px; }
.dsv__palette-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.dsv__palette-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: center; line-height: 1.25; }
.dsv__chipsw { width: 30px; height: 22px; border-radius: 5px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); }
@container (max-width: 880px) {
  .dsv { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; }
  .dsv__thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dsv__title { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .dsv__pic, .dsv__knob, .dsv__tag { transition: none; }
}
/* ---- end design-views ---- */

/* ---- site tour (site-tour): a recorded walk through a live site, on a computer and on a phone ---- */
/* the colours come from the site itself (config palette): the panel is the client's brand, in both themes */
.work-stage__frame--demo[data-mounted="site-tour"] { overflow: hidden; border-radius: var(--radius-lg); background: #10151c; box-shadow: var(--shadow); }
.work-stage__demo--site-tour { container-type: inline-size; }
.stour { --st-bg: #18202a; --st-bg2: #0e1319; --st-ink: #f2efe8; --st-mute: #b9c0c9; --st-accent: #f4b45f; --st-accent-ink: #1b1407; --st-line: color-mix(in srgb, var(--st-ink) 17%, transparent); --st-soft: color-mix(in srgb, var(--st-ink) 7%, transparent); position: relative; display: grid; gap: 18px; padding: 22px 26px 26px; color: var(--st-ink); background: radial-gradient(120% 95% at 12% 0%, var(--st-bg) 0%, var(--st-bg2) 72%); outline: none; }
.stour:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: -3px; }
.stour__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stour__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.stour__label { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--st-mute); }
.stour__modes { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--st-line); border-radius: 999px; background: var(--st-soft); }
.stour__mode { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 16px 6px 13px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; color: var(--st-mute); background: transparent; cursor: pointer; transition: color 0.2s, background-color 0.2s; }
.stour__mode:hover { color: var(--st-ink); }
.stour__mode[aria-pressed="true"] { color: var(--st-accent-ink); background: var(--st-accent); }
.stour__mode svg, .stour__live svg, .stour__address svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stour__live { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px 8px 16px; border: 1px solid var(--st-line); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--st-ink); text-decoration: none; background: var(--st-soft); transition: border-color 0.2s, background-color 0.2s; }
.stour__live:hover { border-color: var(--st-accent); background: color-mix(in srgb, var(--st-accent) 14%, transparent); }
.stour__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 250px); gap: 28px; align-items: start; }
.stour__device { display: grid; gap: 16px; min-width: 0; }
.stour__holder { display: grid; min-width: 0; }
.stour__screen { position: relative; overflow: hidden; background: #000; }
.stour__video { display: block; width: 100%; height: auto; aspect-ratio: var(--ar, 16 / 10); object-fit: cover; background: #000; cursor: pointer; }
/* computer: a browser window */
.stour__frame--desktop { overflow: hidden; border-radius: 12px; background: #f3f2ef; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28), 0 30px 64px rgba(0, 0, 0, 0.42); }
.stour__chrome { --st-dots: 47px; display: grid; grid-template-columns: var(--st-dots) minmax(0, 1fr) var(--st-dots); align-items: center; gap: 12px; height: 38px; padding: 0 14px; border-bottom: 1px solid #dddbd6; background: #ecebe8; }
.stour__dots { display: flex; gap: 7px; }
.stour__dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.stour__dots i + i { background: #febc2e; }
.stour__dots i + i + i { background: #28c840; }
.stour__address { justify-self: center; display: flex; align-items: center; justify-content: center; gap: 6px; width: min(100%, 420px); min-width: 0; height: 24px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; color: #4b4944; background: #fff; overflow: hidden; white-space: nowrap; }
.stour__address svg { width: 13px; height: 13px; color: #7a776f; }
.stour__address span { overflow: hidden; text-overflow: ellipsis; }
/* phone */
.stour__frame--mobile { position: relative; justify-self: center; width: min(316px, 100%); padding: 10px; border-radius: 48px; background: linear-gradient(145deg, #2c2f35, #0c0d0f); box-shadow: 0 0 0 1.5px #3b3f46, 0 28px 64px rgba(0, 0, 0, 0.5); }
.stour__frame--mobile .stour__screen { border-radius: 38px; }
.stour__notch { position: absolute; left: 50%; top: 18px; z-index: 2; width: 82px; height: 23px; margin-left: -41px; border-radius: 12px; background: #000; pointer-events: none; }
.stour__status { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 2px 24px 0 28px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.stour__status-icons { width: 40px; height: 11px; fill: currentColor; }
.stour__big { position: absolute; left: 50%; top: 50%; z-index: 1; display: grid; place-items: center; width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, 0.55); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.stour__big.is-shown { opacity: 1; pointer-events: auto; cursor: pointer; }
.stour__big svg { width: 32px; height: 32px; }
.stour__big svg .is-fill, .stour__play svg .is-fill { fill: currentColor; stroke: none; }
/* controls */
.stour__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.stour__play { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--st-line); border-radius: 12px; color: var(--st-ink); background: var(--st-soft); cursor: pointer; }
.stour__play:hover { border-color: var(--st-accent); }
.stour__play svg { width: 22px; height: 22px; }
.stour__track { display: flex; align-items: center; gap: 4px; height: 30px; cursor: pointer; }
.stour__seg { position: relative; flex: var(--w, 1) 1 0; min-width: 6px; height: 4px; overflow: hidden; border-radius: 2px; background: var(--st-line); }
.stour__seg i { position: absolute; inset: 0; background: var(--st-accent); transform: scaleX(0); transform-origin: 0 50%; }
.stour__time { min-width: 7.5ch; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; color: var(--st-mute); }
/* sections */
.stour__side { min-width: 0; }
.stour__side-head { margin: 2px 0 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--st-mute); }
.stour__chapters { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.stour__chapter { position: relative; display: grid; grid-template-columns: 2.1em minmax(0, 1fr); gap: 6px; width: 100%; padding: 10px 12px; overflow: hidden; border: 1px solid transparent; border-radius: 10px; font: inherit; font-size: 15px; line-height: 1.35; text-align: left; color: var(--st-mute); background: transparent; cursor: pointer; transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.stour__chapter:hover { color: var(--st-ink); background: var(--st-soft); }
.stour__chapter[aria-current="true"] { color: var(--st-ink); border-color: var(--st-line); background: var(--st-soft); }
.stour__chapter-n { padding-top: 2px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--st-accent); }
.stour__chapter-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--st-accent); transform: scaleX(0); transform-origin: 0 50%; }
.stour__note { margin: 14px 0 0; font-size: 13px; line-height: 1.45; color: var(--st-mute); }
.stour__note[hidden] { display: none; }
.stour__mode:focus-visible, .stour__live:focus-visible, .stour__play:focus-visible, .stour__chapter:focus-visible, .stour__big:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 2px; }
@container (max-width: 760px) {
  .stour { gap: 14px; padding: 16px 14px 18px; }
  .stour__main { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .stour__side-head { display: none; }
  .stour__chapters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .stour__chapters::-webkit-scrollbar { display: none; }
  .stour__chapter { flex: none; grid-template-columns: auto auto; gap: 7px; width: auto; padding: 8px 12px; border-color: var(--st-line); font-size: 14px; white-space: nowrap; }
  .stour__chapter-n { padding-top: 1px; }
  .stour__frame--mobile { width: min(290px, 86%); }
  .stour__chrome { --st-dots: 33px; gap: 8px; height: 30px; padding: 0 10px; }
  .stour__dots { gap: 3px; }
  .stour__dots i { width: 9px; height: 9px; }
  .stour__address { height: 20px; padding: 0 8px; font-size: 11px; }
  .stour__address svg { width: 11px; height: 11px; }
}
@container (max-width: 420px) {
  .stour__mode { padding: 6px 12px 6px 10px; }
  .stour__live { padding: 8px 12px; }
  .stour__live > span:first-child { font-size: 13px; }
  .stour__time { display: none; }
  .stour__bar { grid-template-columns: auto minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .stour__mode, .stour__live, .stour__chapter, .stour__big { transition: none; }
}
/* ---- end site-tour ---- */

/* ---- integration map (integration-map): site platforms wired to a CRM, 1C, payments and Telegram ---- */
.work-stage__frame--demo[data-mounted="integration-map"] { overflow: hidden; border-radius: var(--radius-lg); background: #f3f4f6; box-shadow: var(--shadow); }
html.dark .work-stage__frame--demo[data-mounted="integration-map"] { background: #15181d; }
.work-stage__demo--integration-map { container-type: inline-size; }
.imap { --im-bg: #f3f4f6; --im-card: #fff; --im-ink: #1d2128; --im-mute: #5b6370; --im-line: #dbe0e6; --im-soft: #e8ebef; --im-accent: #c23b20; --im-hub: #232a33; --im-hub-ink: #f3f5f8; --im-hub-sub: #b4bdc9; position: relative; display: grid; gap: 18px; padding: 22px 24px 20px; color: var(--im-ink); background: var(--im-bg); outline: none; }
html.dark .imap { --im-bg: #15181d; --im-card: #1e232a; --im-ink: #eceef2; --im-mute: #a6aebb; --im-line: #30363f; --im-soft: #262c34; --im-accent: #c23b20; --im-hub: #e9edf2; --im-hub-ink: #15181d; --im-hub-sub: #4a5260; }
.imap:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: -3px; }
.imap__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.imap__controls { display: grid; gap: 12px; }
.imap__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.imap__label { min-width: 132px; font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--im-mute); }
.imap__plats { display: flex; flex-wrap: wrap; gap: 8px; }
.imap__plat { display: inline-grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 14px 8px 12px; border: 1px solid var(--im-line); border-radius: 12px; font: inherit; text-align: left; color: var(--im-ink); background: var(--im-card); cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s; }
.imap__plat:hover { border-color: var(--c); }
.imap__plat[aria-pressed="true"] { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); background: color-mix(in srgb, var(--c) 9%, var(--im-card)); }
.imap__dot { grid-row: 1 / span 2; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.imap__plat-name { font-size: 15px; font-weight: 650; line-height: 1.2; }
.imap__plat-sub { grid-column: 2; font-size: 12px; line-height: 1.3; color: var(--im-mute); }
.imap__seg { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--im-soft); }
.imap__seg-label { padding: 0 6px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--im-mute); }
.imap__segbtn { min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; color: var(--im-mute); background: transparent; cursor: pointer; }
.imap__segbtn:hover { color: var(--im-ink); }
.imap__segbtn[aria-pressed="true"] { color: var(--im-ink); background: var(--im-card); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1); }
.imap__run { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-left: auto; padding: 10px 20px 10px 18px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 650; color: #fff; background: var(--im-accent); cursor: pointer; }
.imap__run:hover { filter: brightness(1.06); }
.imap__run-icon { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid currentColor; }
.imap__run.is-running .imap__run-icon { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: imap-spin 0.8s linear infinite; }
.imap__cases { display: flex; flex-wrap: wrap; gap: 6px; }
.imap__case { min-height: 34px; padding: 6px 13px; border: 1px solid var(--im-line); border-radius: 999px; font: inherit; font-size: 13.5px; color: var(--im-mute); background: transparent; cursor: pointer; }
.imap__case:hover { color: var(--im-ink); border-color: var(--im-mute); }
.imap__case[aria-pressed="true"] { color: var(--im-ink); border-color: var(--im-ink); background: var(--im-card); }
/* the map: three columns, wires drawn in an SVG under the cards */
.imap__map { position: relative; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, 0.9fr) minmax(170px, 1.1fr); align-items: center; gap: 0 clamp(44px, 9cqw, 120px); min-height: 250px; padding: 22px 20px; border: 1px solid var(--im-line); border-radius: 16px; background-color: var(--im-card); background-image: radial-gradient(circle, color-mix(in srgb, var(--im-ink) 11%, transparent) 1px, transparent 1.3px); background-size: 18px 18px; }
.imap__wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.imap__wire-base { fill: none; stroke: color-mix(in srgb, var(--im-ink) 22%, transparent); stroke-width: 2; stroke-dasharray: 4 5; }
.imap__wire-lit { fill: none; stroke-width: 2.5; stroke-linecap: round; opacity: 0; transition: opacity 0.3s, stroke-width 0.3s; }
.imap__wire.is-done .imap__wire-lit { opacity: 0.5; }
.imap__wire.is-active .imap__wire-lit { opacity: 1; stroke-width: 3.5; }
.imap__packet { stroke: var(--im-card); stroke-width: 2.5; }
.imap__col { position: relative; z-index: 1; display: grid; gap: 12px; min-width: 0; }
.imap__col--dst { gap: 10px; }
.imap__node { display: grid; gap: 3px; width: 100%; padding: 12px 14px 12px 12px; border: 1px solid var(--im-line); border-left: 4px solid var(--c); border-radius: 12px; font: inherit; text-align: left; color: inherit; background: var(--im-card); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06); cursor: pointer; transition: box-shadow 0.25s, transform 0.25s; }
.imap__node:hover { transform: translateY(-1px); }
.imap__node.is-active { box-shadow: 0 0 0 2px var(--c), 0 10px 24px rgba(16, 24, 40, 0.14); }
.imap__node.is-pulse { animation: imap-pulse 0.52s ease-out; }
.imap__node-head { display: flex; align-items: center; gap: 8px; }
.imap__node-icon { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--c); }
.imap__node-name { font-size: 15px; font-weight: 650; line-height: 1.25; }
.imap__node-sub { font-size: 12.5px; line-height: 1.35; color: var(--im-mute); }
.imap__node--hub { border-color: var(--im-hub); border-left-color: var(--im-hub); color: var(--im-hub-ink); background: var(--im-hub); }
.imap__node--hub .imap__node-sub { color: var(--im-hub-sub); }
.imap__node--hub .imap__node-icon { background: #f4b45f; }
.imap__hook { display: grid; gap: 2px; justify-self: start; max-width: 100%; padding: 7px 10px; border: 1px dashed var(--c); border-radius: 8px; background: color-mix(in srgb, var(--c) 8%, var(--im-card)); }
.imap__hook-k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--im-mute); }
.imap__hook-code { font-family: var(--mono); font-size: 12px; line-height: 1.35; color: var(--im-ink); overflow-wrap: anywhere; }
/* steps and the inspector */
.imap__lower { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.imap__logbox { min-height: 300px; padding: 14px; border: 1px solid var(--im-line); border-radius: 14px; background: var(--im-card); }
.imap__boxhead { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--im-mute); }
.imap__log { display: grid; gap: 4px; max-height: 400px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.imap__step-btn { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; gap: 8px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 10px; font: inherit; text-align: left; color: inherit; background: transparent; cursor: pointer; }
.imap__step-btn:hover { background: color-mix(in srgb, var(--im-soft) 60%, transparent); }
.imap__step-btn[aria-current="true"] { border-color: var(--im-line); background: var(--im-soft); }
.imap__step-n { padding-top: 2px; font-family: var(--mono); font-size: 12px; color: var(--im-mute); }
.imap__step-body { display: grid; gap: 2px; min-width: 0; }
.imap__step-title { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.imap__step-route { font-size: 12.5px; color: var(--im-mute); }
.imap__step-meta { font-family: var(--mono); font-size: 11.5px; line-height: 1.4; color: var(--im-mute); overflow-wrap: anywhere; }
.imap__step-status { align-self: start; padding: 2px 8px; border-radius: 999px; font-family: var(--mono); font-size: 11px; font-weight: 600; color: #146c3c; background: #def3e6; }
.imap__step.is-bad .imap__step-status { color: #a8231b; background: #fde3df; }
.imap__step.is-wait .imap__step-status { color: #7d5300; background: #fdefcf; }
.imap__step.is-skip .imap__step-status { color: var(--im-mute); background: var(--im-soft); }
html.dark .imap__step-status { color: #8fe0ad; background: rgba(46, 160, 90, 0.18); }
html.dark .imap__step.is-bad .imap__step-status { color: #ffaba3; background: rgba(220, 70, 60, 0.2); }
html.dark .imap__step.is-wait .imap__step-status { color: #f8cf7c; background: rgba(230, 170, 50, 0.18); }
.imap__empty { margin: 4px 0 0; font-size: 14px; color: var(--im-mute); }
.imap__empty[hidden] { display: none; }
.imap__insp { display: grid; gap: 10px; min-width: 0; padding: 14px 16px 16px; border-radius: 14px; color: #e6e8ec; background: #141920; }
.imap__insp-title { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.35; color: #fff; }
.imap__insp-meta { margin: 3px 0 0; font-family: var(--mono); font-size: 12px; color: #9fb0c4; overflow-wrap: anywhere; }
.imap__tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.imap__tab { margin-bottom: -1px; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; font: inherit; font-size: 14px; font-weight: 600; color: #a7b1be; background: none; cursor: pointer; }
.imap__tab[aria-selected="true"] { color: #fff; border-bottom-color: #f4b45f; }
.imap__tab:disabled { opacity: 0.4; cursor: default; }
.imap__panel { max-height: 420px; overflow: auto; outline: none; }
.imap__panel:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 2px; border-radius: 8px; }
.imap__panel-head { margin: 4px 0 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #8f9bab; }
.imap__panel-empty { margin: 6px 0; font-size: 14px; color: #a7b1be; }
.imap__pre { margin: 0 0 10px; padding: 12px 14px; border-radius: 10px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; tab-size: 2; white-space: pre-wrap; overflow-wrap: anywhere; color: #e6e8ec; background: rgba(255, 255, 255, 0.045); }
.imap__t-key { color: #8fc3ff; }
.imap__t-str { color: #a9df9f; }
.imap__t-num { color: #f6c177; }
.imap__t-kw { color: #f29bbd; }
.imap__t-com { color: #8590a0; font-style: italic; }
.imap__t-var { color: #e8c27e; }
.imap__t-tag { color: #7fd3e8; }
.imap__t-attr { color: #c5a8ff; }
.imap__insp-note { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; color: #f3d9ae; background: rgba(244, 180, 95, 0.1); }
.imap__insp-note[hidden] { display: none; }
/* the same process on the other platforms */
.imap__strip-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.imap__strip-item { display: grid; align-content: start; gap: 5px; width: 100%; height: 100%; padding: 10px 12px; border: 1px solid var(--im-line); border-top: 3px solid var(--c); border-radius: 10px; font: inherit; text-align: left; color: inherit; background: var(--im-card); cursor: pointer; }
.imap__strip-item:hover { box-shadow: inset 0 0 0 1px var(--c); }
.imap__strip-item[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--c); background: color-mix(in srgb, var(--c) 8%, var(--im-card)); }
.imap__strip-name { font-size: 13.5px; font-weight: 650; }
.imap__strip-hook { font-family: var(--mono); font-size: 11.5px; line-height: 1.35; color: var(--im-mute); overflow-wrap: anywhere; }
.imap__foot { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--im-mute); }
.imap__plat:focus-visible, .imap__segbtn:focus-visible, .imap__run:focus-visible, .imap__case:focus-visible, .imap__node:focus-visible, .imap__step-btn:focus-visible, .imap__tab:focus-visible, .imap__strip-item:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 2px; }
@keyframes imap-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes imap-spin { to { transform: rotate(360deg); } }
@container (max-width: 980px) {
  .imap__lower { grid-template-columns: minmax(0, 1fr); }
  .imap__strip-list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@container (max-width: 680px) {
  .imap { gap: 14px; padding: 16px 14px; }
  .imap__label { min-width: 0; width: 100%; }
  .imap__map { grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 18px 14px; }
  .imap__col--dst { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .imap__run { margin-left: 0; }
  .imap__seg { flex-wrap: wrap; border-radius: 16px; }
  .imap__hook { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .imap__plat, .imap__node, .imap__wire-lit { transition: none; }
  .imap__node.is-pulse, .imap__run.is-running .imap__run-icon { animation: none; }
}
/* ---- end integration-map ---- */

/* ---- document carousel (doc-carousel): slides in a post card, with the rest of the profile kit ---- */
.work-stage__frame--demo[data-mounted="doc-carousel"] { overflow: hidden; border-radius: var(--radius-lg); background: #efe9de; box-shadow: var(--shadow); }
html.dark .work-stage__frame--demo[data-mounted="doc-carousel"] { background: #10241d; }
.work-stage__demo--doc-carousel { container-type: inline-size; }
.dcar { --dc-bg: #efe9de; --dc-card: #fffdf8; --dc-ink: #1d2420; --dc-mute: #4c534d; --dc-line: #ddd3c2; --dc-accent: #0f3b2e; --dc-accent-ink: #f4efe4; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 30px; align-items: start; padding: 26px; color: var(--dc-ink); background: var(--dc-bg); outline: none; }
html.dark .dcar { --dc-bg: #10241d; --dc-card: #163128; --dc-ink: #eef0ea; --dc-mute: #a9b9b0; --dc-line: #2b463b; --dc-accent: #e3d1a7; --dc-accent-ink: #10241d; }
.dcar:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: -3px; }
.dcar__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dcar__post { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--dc-line); border-radius: 18px; background: var(--dc-card); box-shadow: 0 20px 44px rgba(40, 30, 10, 0.14); }
.dcar__post-head { display: flex; align-items: center; gap: 12px; }
.dcar__avatar { width: 48px; height: 48px; flex: none; overflow: hidden; border-radius: 50%; background: var(--dc-line); }
.dcar__avatar picture, .dcar__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dcar__who { display: grid; gap: 2px; min-width: 0; }
.dcar__who-name { font-size: 15px; font-weight: 650; line-height: 1.3; }
.dcar__who-sub { font-size: 13px; color: var(--dc-mute); }
.dcar__viewer { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 10px; background: #0f3b2e; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.dcar__viewer:active { cursor: grabbing; }
.dcar__track { display: flex; height: 100%; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); will-change: transform; }
.dcar__slide { flex: 0 0 100%; height: 100%; margin: 0; }
.dcar__slide picture, .dcar__slide img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.dcar__nav { position: absolute; top: 50%; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%; color: #1d2420; background: rgba(255, 255, 255, 0.94); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28); cursor: pointer; transition: opacity 0.2s; }
.dcar__nav--prev { left: 10px; }
.dcar__nav--next { right: 10px; }
.dcar__nav:disabled { opacity: 0; pointer-events: none; }
.dcar__nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dcar__count { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: #fff; background: rgba(0, 0, 0, 0.55); }
.dcar__bar { display: flex; gap: 4px; }
.dcar__bar i { flex: 1; height: 3px; border-radius: 2px; background: var(--dc-line); transition: background-color 0.3s; }
.dcar__bar i.is-on { background: var(--dc-accent); }
.dcar__hint { margin: 0; font-size: 12.5px; color: var(--dc-mute); }
.dcar__side { display: grid; gap: 12px; min-width: 0; }
.dcar__label { margin: 6px 0 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dc-mute); }
.dcar__langrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.dcar__langrow .dcar__label { margin: 0; }
.dcar__langs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--dc-ink) 8%, transparent); }
.dcar__lang { min-width: 56px; min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 650; letter-spacing: 0.04em; color: var(--dc-mute); background: transparent; cursor: pointer; }
.dcar__lang:hover { color: var(--dc-ink); }
.dcar__lang[aria-pressed="true"] { color: var(--dc-accent-ink); background: var(--dc-accent); }
.dcar__thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.dcar__thumb { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; aspect-ratio: 4 / 5; border: 2px solid transparent; border-radius: 8px; background: var(--dc-line); cursor: pointer; opacity: 0.8; transition: opacity 0.2s, border-color 0.2s; }
.dcar__thumb:hover { opacity: 1; }
.dcar__thumb[aria-current="true"] { opacity: 1; border-color: var(--dc-accent); }
.dcar__thumb picture, .dcar__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dcar__thumb-n { position: absolute; left: 4px; bottom: 4px; padding: 0 5px; border-radius: 4px; font-size: 11px; font-weight: 650; color: #fff; background: rgba(0, 0, 0, 0.5); }
.dcar__kit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 12px; align-items: end; }
.dcar__item { display: grid; gap: 6px; min-width: 0; margin: 0; }
.dcar__item--wide { grid-column: span 4; }
.dcar__item--post { grid-column: span 2; }
.dcar__item--round { grid-column: span 1; }
.dcar__item picture, .dcar__item img { display: block; width: 100%; height: auto; }
.dcar__item img { border-radius: 10px; box-shadow: 0 6px 18px rgba(40, 30, 10, 0.14); }
.dcar__item--round img { aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.dcar__item figcaption { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 12.5px; line-height: 1.35; }
.dcar__item--round figcaption { display: grid; gap: 0; }
.dcar__item-label { font-weight: 600; }
.dcar__item-size { color: var(--dc-mute); font-variant-numeric: tabular-nums; }
.dcar__nav:focus-visible, .dcar__lang:focus-visible, .dcar__thumb:focus-visible { outline: 2px solid var(--focus-ring, #7cb3ff); outline-offset: 2px; }
@container (max-width: 820px) {
  .dcar { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 16px; }
  .dcar__post { justify-self: center; width: 100%; max-width: 460px; }
}
@container (max-width: 440px) {
  .dcar__thumbs { gap: 5px; }
  .dcar__kit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dcar__item--wide, .dcar__item--post { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .dcar__track, .dcar__nav, .dcar__bar i, .dcar__thumb { transition: none; }
}
/* ---- end doc-carousel ---- */
