/* PAGE LAB Feature Lab — unified with homepage brand */
.features-lab {
  background:
    radial-gradient(ellipse at 12% -8%, rgba(123, 60, 255, 0.07), transparent 42%),
    radial-gradient(ellipse at 92% 12%, rgba(61, 224, 208, 0.08), transparent 38%),
    linear-gradient(180deg, #f7f9ff 0%, var(--paper) 45%, #f4f7fc 100%);
}

.feat-marquee {
  overflow: hidden;
  border-block: 1px solid rgba(91, 125, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(123, 60, 255, 0.18), transparent 28%),
    linear-gradient(270deg, rgba(26, 167, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #0b1220 0%, #070b10 100%);
  color: rgba(247, 250, 252, 0.78);
  margin: 0 0 40px;
}

.feat-marquee-track {
  display: flex;
  gap: 28px;
  width: max-content;
  padding: 14px 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  animation: featMarquee 48s linear infinite;
}

.feat-marquee-track span::after {
  content: "·";
  margin-left: 28px;
  color: #7b9cff;
  opacity: 0.9;
}

@keyframes featMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.feat-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.feat-stats > div {
  padding: 22px 16px;
  background:
    linear-gradient(160deg, #ffffff 0%, #f7f9ff 100%);
  border: 1px solid rgba(91, 125, 255, 0.14);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(40, 55, 100, 0.05);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.feat-stats > div:hover {
  border-color: rgba(91, 125, 255, 0.35);
  box-shadow: 0 14px 32px rgba(91, 125, 255, 0.1);
}

.feat-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #7b3cff 0%, #3d6bff 55%, #1aa7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.feat-stats span {
  font-size: 0.78rem;
  color: var(--muted);
}

.feat-typed {
  display: grid;
  gap: 14px;
  margin: 0 0 28px;
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(123, 60, 255, 0.16), transparent 40%),
    linear-gradient(180deg, #121a28 0%, #0b1220 100%);
  color: rgba(247, 250, 252, 0.82);
  border-radius: 16px;
  border: 1px solid rgba(91, 125, 255, 0.22);
  box-shadow: 0 16px 40px rgba(7, 11, 16, 0.12);
  font-size: 0.95rem;
}

.feat-typed #typed-text {
  color: #7de8dc;
  font-weight: 700;
}
.typed-caret { color: #9bb0ff; }

.feat-typed-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feat-more-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(155, 176, 255, 0.28);
  border-bottom-color: rgba(155, 176, 255, 0.28);
  color: #c5d0ff;
  font-size: 0.78rem;
}
.feat-more-inline:hover {
  color: #fff;
  border-color: rgba(61, 224, 208, 0.55);
  background: rgba(61, 224, 208, 0.12);
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.feat-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  background:
    linear-gradient(160deg, #ffffff 0%, #f7f9ff 100%);
  border: 1px solid rgba(91, 125, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(40, 55, 100, 0.04);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.feat-card:hover {
  border-color: rgba(91, 125, 255, 0.4);
  box-shadow: 0 18px 40px rgba(91, 125, 255, 0.1);
}

.feat-wide { grid-column: 1 / -1; }

.feat-card-top h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.feat-card-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.feat-more {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.86rem;
  color: #3a4a72;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, #7b3cff, #3de0d0) 1;
  padding-bottom: 1px;
}

.feat-more:hover { color: #5b7dff; }

.inline-lab {
  color: #5b7dff;
  font-weight: 700;
  border-bottom: 1px solid rgba(91, 125, 255, 0.45);
}

.feat-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Chat preview — PAGE LAB real chat UI miniature */
.chat-preview {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(91, 125, 255, 0.16);
  background: #fff;
  box-shadow: 0 12px 28px rgba(40, 55, 100, 0.08);
  min-height: 260px;
  max-height: 320px;
}
.chat-preview-head {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  background: linear-gradient(120deg, #1a2440 0%, #3d6bff 55%, #7b3cff 100%);
  color: #fff;
}
.chat-preview-head strong {
  font-size: 0.88rem;
  font-weight: 700;
}
.chat-preview-head span {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.88;
}
.chat-preview-body {
  flex: 1;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  background: #eef2f6;
  overflow: hidden;
}
.chat-preview-bubble {
  max-width: 88%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.4;
}
.chat-preview-bubble.bot {
  background: #fff;
  border: 1px solid rgba(7, 11, 16, 0.1);
  color: #2a3448;
}
.chat-preview-bubble.me {
  margin-left: auto;
  background: #1a6bff;
  color: #fff;
}
.chat-preview-form {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid rgba(7, 11, 16, 0.1);
  background: #f7f8fb;
}
.chat-preview-composer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-preview-composer span {
  flex: 1;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(7, 11, 16, 0.1);
  background: #fff;
  color: #9aa6b8;
  font-size: 0.74rem;
}
.chat-preview-composer em {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7b3cff, #3d6bff);
}
.chat-preview-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.chat-preview-fields span {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(7, 11, 16, 0.1);
  background: #fff;
  color: #9aa6b8;
  font-size: 0.7rem;
}

/* Theme demo — PAGE LAB real preview */
.theme-demo {
  padding: 10px;
  border-radius: 14px;
  background:
    linear-gradient(160deg, #121a28 0%, #0b1220 100%);
  border: 1px solid rgba(91, 125, 255, 0.18);
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.theme-demo.is-light {
  background: linear-gradient(160deg, #f7f9ff 0%, #eef2f8 100%);
  border-color: rgba(91, 125, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.theme-demo > .btn {
  margin-top: 10px;
  background: linear-gradient(135deg, #7b3cff, #3d6bff);
  color: #fff;
  border: 0;
}
.theme-demo.is-light > .btn {
  background: linear-gradient(135deg, #5b7dff, #3de0d0);
  color: #070b10;
}

.pl-preview {
  overflow: hidden;
  border-radius: 10px;
  background: #070b10;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s, border-color 0.3s;
}
.theme-demo.is-light .pl-preview {
  background: #fff;
  border-color: rgba(40, 55, 100, 0.12);
}
.pl-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(7, 11, 16, 0.92);
  transition: background 0.3s, color 0.3s;
}
.theme-demo.is-light .pl-preview-bar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(40, 55, 100, 0.08);
}
.pl-preview-logo {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f7fafc;
}
.pl-preview-logo i {
  font-style: normal;
  color: #7de8dc;
}
.theme-demo.is-light .pl-preview-logo { color: #070b10; }
.theme-demo.is-light .pl-preview-logo i { color: #3d6bff; }
.pl-preview-nav {
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(247, 250, 252, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-demo.is-light .pl-preview-nav { color: rgba(42, 52, 72, 0.55); }

.pl-preview-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #070b10;
}
.pl-preview-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s, opacity 0.3s;
}
.theme-demo.is-light .pl-preview-hero img {
  filter: brightness(1.08) saturate(0.92);
}
.pl-preview-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 11, 16, 0.15) 0%, rgba(7, 11, 16, 0.72) 100%);
  transition: background 0.3s;
}
.theme-demo.is-light .pl-preview-veil {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(232, 238, 246, 0.55) 100%);
}
.pl-preview-copy {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  display: grid;
  gap: 2px;
}
.pl-preview-copy strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.theme-demo.is-light .pl-preview-copy strong {
  color: #070b10;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.pl-preview-copy span {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(247, 250, 252, 0.85);
}
.theme-demo.is-light .pl-preview-copy span {
  color: rgba(42, 52, 72, 0.8);
}

.pl-preview-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  background: rgba(7, 11, 16, 0.5);
  transition: background 0.3s;
}
.theme-demo.is-light .pl-preview-strip {
  background: #f4f7fc;
}
.pl-preview-strip em {
  display: block;
  height: 28px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(123, 60, 255, 0.35), rgba(61, 224, 208, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.theme-demo.is-light .pl-preview-strip em {
  background: linear-gradient(135deg, #ebe4ff, #dff8f4);
  border-color: rgba(91, 125, 255, 0.12);
}

.pl-preview--compact .pl-preview-hero {
  aspect-ratio: 16 / 10;
}
.pl-preview--compact .pl-preview-copy strong {
  font-size: 0.8rem;
}
.pl-preview--compact .pl-preview-copy span {
  font-size: 0.6rem;
}

/* Tabs */
.tabs {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tabs-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.tabs-nav button {
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}
.tabs-nav button.is-active {
  background: linear-gradient(135deg, #7b3cff, #3d6bff);
  color: #fff;
  border-color: transparent;
}
.tabs-panel {
  flex: 1;
  padding: 0;
  background: transparent;
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.tab-preview {
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(91, 125, 255, 0.14);
  background:
    linear-gradient(180deg, #ffffff 0%, #f3f6ff 100%);
}
.tab-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.tab-preview-head strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--ink);
}
.tab-preview-head span {
  font-size: 0.72rem;
  font-weight: 600;
  color: #5b7dff;
}
.tab-preview-desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}
.tab-preview ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.tab-preview li {
  position: relative;
  padding: 8px 10px 8px 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(91, 125, 255, 0.1);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.tab-preview li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #7b3cff, #3de0d0);
}
.tab-preview-wire {
  flex: 1;
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 72px;
  padding: 10px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(123, 60, 255, 0.08), rgba(61, 224, 208, 0.1));
  border: 1px dashed rgba(91, 125, 255, 0.22);
}
.tab-preview-wire .tpw-hero {
  display: block;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(26, 36, 64, 0.55), rgba(61, 107, 255, 0.45));
}
.tab-preview-wire .tpw-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
  gap: 6px;
}
.tab-preview-wire .tpw-cols i {
  display: block;
  height: 22px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(91, 125, 255, 0.12);
}
.tab-preview-wire .tpw-cta {
  display: block;
  width: 42%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7b3cff, #3d6bff);
}
.tab-preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}
.tab-preview-foot em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
}
.tab-preview-cta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7b3cff, #3d6bff);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
}

/* Modal / toast static preview */
.notify-preview {
  flex: 1;
  display: flex;
  min-height: 180px;
}
.notify-preview-stage {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 18px 14px 28px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(123, 60, 255, 0.16), transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(61, 224, 208, 0.14), transparent 45%),
    linear-gradient(160deg, #1a2440 0%, #2a3560 55%, #1a2440 100%);
}
.notify-preview-modal {
  width: min(100%, 240px);
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 8px;
}
.notify-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #5b7dff;
}
.notify-preview-modal strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--ink);
}
.notify-preview-modal > p:last-of-type {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}
.notify-preview-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.notify-preview-actions span,
.notify-preview-actions b {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 32px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
}
.notify-preview-actions span {
  border: 1px solid var(--line-dark);
  color: var(--ink-soft);
  background: #fff;
}
.notify-preview-actions b {
  background: linear-gradient(135deg, #7b3cff, #3d6bff);
  color: #fff;
}
.notify-preview-toast {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(7, 11, 16, 0.92);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Utils preview */
.util-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(91, 125, 255, 0.12);
  background: linear-gradient(180deg, #fff 0%, #f5f8ff 100%);
}
.util-palette-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5b7dff;
}
.util-palette .color-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.util-palette .color-chips button {
  width: auto;
  height: auto;
  min-height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(91, 125, 255, 0.12);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 4px;
  background:
    linear-gradient(180deg, transparent 0 55%, rgba(255,255,255,0.92) 55%),
    var(--c);
}
.util-palette .color-chips button span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink);
}

/* Admin CMS mini preview */
.cms-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(91, 125, 255, 0.14);
  background: #fff;
  min-height: 168px;
}
.cms-preview-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(120deg, #1a2440 0%, #3d6bff 55%, #7b3cff 100%);
  color: #fff;
}
.cms-preview-bar strong {
  font-size: 0.86rem;
}
.cms-preview-bar span {
  font-size: 0.68rem;
  opacity: 0.88;
}
.cms-preview-rows {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #eef2f6;
  flex: 1;
}
.cms-preview-rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(91, 125, 255, 0.1);
}
.cms-preview-rows b {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ink);
}
.cms-preview-rows em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  color: #5b7dff;
}

/* Device */
.device-switch {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.device-switch button {
  flex: 1;
  min-height: 36px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}
.device-switch button.is-active {
  background: linear-gradient(135deg, #7b3cff, #3d6bff);
  border-color: transparent;
  color: #fff;
}
.device-frame {
  margin: 0 auto;
  background: var(--ink);
  border-radius: 12px;
  padding: 10px;
  transition: width 0.35s var(--ease);
}
.device-frame.is-desktop { width: 100%; }
.device-frame.is-tablet { width: 72%; }
.device-frame.is-mobile { width: 42%; }
.device-screen {
  background: #070b10;
  border-radius: 8px;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}
.device-screen .pl-preview {
  border: 0;
  border-radius: 8px;
}
.device-screen--iframe {
  position: relative;
  height: min(62vh, 520px);
  background: #070b10;
  overflow: hidden;
}
.pl-live-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #070b10;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.gallery-grid button {
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--ink);
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.gallery-grid button:hover img { transform: scale(1.05); }

/* Before/After */
.ba-slider {
  position: relative;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ink);
}
.ba-after,
.ba-before {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
}
.ba-before {
  width: 50%;
  overflow: hidden;
  border-right: 2px solid var(--cyan);
}
.ba-slider input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, #7b3cff, #3de0d0);
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}
.ba-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7b3cff, #3d6bff);
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(61, 107, 255, 0.35);
}

/* Carousel */
.carousel {
  padding: 20px;
  background: var(--ink);
  color: var(--white);
  border-radius: 12px;
  min-height: 120px;
  display: grid;
  align-content: space-between;
  gap: 16px;
}
.carousel-slide {
  display: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}
.carousel-slide.is-active { display: block; }
.carousel-nav { display: flex; gap: 8px; }
.carousel-nav button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(247, 250, 252, 0.2);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

/* Filter */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.filter-bar button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  background: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}
.filter-bar button.is-active {
  background: linear-gradient(135deg, #7b3cff, #3d6bff);
  color: #fff;
  border-color: transparent;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.filter-item {
  padding: 18px 14px;
  background: var(--paper-2);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.filter-item.is-hide { display: none; }

/* Quote calc */
.quote-calc {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--paper-2);
  border-radius: 12px;
}
.quote-calc label,
.quote-calc fieldset {
  display: grid;
  gap: 8px;
  border: 0;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
  font-weight: 600;
}
.quote-calc select,
.quote-calc input[type="range"] { width: 100%; }
.quote-calc .check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.quote-result {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0 4px;
  border-top: 1px solid var(--line-dark);
}
.quote-result strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--cyan-deep);
}

/* Mini form */
.mini-form { display: grid; gap: 12px; }
.mini-form label { display: grid; gap: 6px; font-size: 0.84rem; font-weight: 600; }
.mini-form input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-dark);
}
.mini-form input.is-bad { border-color: #e25555; }
.mini-form .err { color: #e25555; font-size: 0.78rem; min-height: 1em; }
.form-ok { margin: 0; color: var(--cyan-deep); font-size: 0.88rem; font-weight: 600; }

/* Bars */
.bars { display: grid; gap: 12px; }
.bars > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
}
.bars i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}
.bars b {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
  transition: width 1s var(--ease);
}
.bars.is-in b { width: var(--p); }

/* Map */
.map-embed {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  aspect-ratio: 16 / 10;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Utils */
.util-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.color-chips { display: flex; gap: 8px; }
.color-chips button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line-dark);
  background: var(--c);
  cursor: pointer;
}
.util-tip { margin: 0; font-size: 0.84rem; color: var(--muted); }

.search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-dark);
  margin-bottom: 10px;
}
.search-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}
.search-list li {
  padding: 10px 12px;
  background: var(--paper-2);
  border-radius: 8px;
  font-size: 0.88rem;
}
.search-list li.is-hide { display: none; }

.capability-board {
  margin-top: 28px;
  padding: 28px 24px;
  background: var(--ink);
  color: var(--white);
  border-radius: 18px;
}
.capability-board header { margin-bottom: 20px; }
.capability-board h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
}
.capability-board header p {
  margin: 0;
  color: rgba(247, 250, 252, 0.62);
  font-size: 0.92rem;
}
.capability-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.capability-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.capability-cols li {
  position: relative;
  padding-left: 14px;
  font-size: 0.84rem;
  color: rgba(247, 250, 252, 0.72);
}
.capability-cols li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}

/* Overlays */
.modal-backdrop,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 11, 16, 0.72);
  backdrop-filter: blur(8px);
}
.modal-backdrop[hidden],
.lightbox[hidden],
.toast[hidden],
.chat-panel[hidden] { display: none !important; }

.modal {
  width: min(420px, 100%);
  padding: 28px 24px;
  background: #fff;
  border-radius: 18px;
  color: var(--ink);
}
.modal h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
}
.modal p { margin: 0 0 18px; color: var(--muted); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

.lightbox-inner { position: relative; max-width: min(900px, 100%); }
.lightbox img {
  max-height: 80vh;
  width: auto;
  max-width: 100%;
  border-radius: 12px;
}
.lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--cyan);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 85;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.chat-panel {
  /* Hero slides are 1536×1024 (3:2). Dock into the right letterbox only. */
  --hero-ar: 1.5;
  --chat-gutter: max(0px, calc((100vw - min(100vw, 100svh * var(--hero-ar))) / 2));
  /* Vertical center between white header bottom and viewport bottom */
  --chat-origin: var(--header-h);
  --chat-avail: calc(100svh - var(--chat-origin));
  --chat-h: min(72vh, 560px, calc(var(--chat-avail) - 24px));
  position: fixed;
  right: 0;
  top: calc(var(--chat-origin) + (var(--chat-avail) - var(--chat-h)) / 2);
  bottom: auto;
  z-index: 70;
  width: max(0px, calc(var(--chat-gutter) - 10px));
  height: var(--chat-h);
  max-height: var(--chat-h);
  transform: none;
  background: #fff;
  border-radius: 14px 0 0 14px;
  border: 1px solid var(--line-dark);
  border-right: 0;
  box-shadow: -12px 16px 40px rgba(7, 11, 16, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}

/* Narrow / tall viewports: no side letterbox — keep a slim right dock */
@media (max-aspect-ratio: 3/2) {
  .chat-panel {
    --chat-h: min(68vh, 520px, calc(var(--chat-avail) - 24px));
    width: min(200px, 34vw);
    height: var(--chat-h);
    max-height: var(--chat-h);
    top: calc(var(--chat-origin) + (var(--chat-avail) - var(--chat-h)) / 2);
  }
}
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(120deg, #1a2440 0%, #3d6bff 55%, #7b3cff 100%);
  color: var(--white);
  font-weight: 700;
  flex-shrink: 0;
}
.chat-head-copy {
  display: grid;
  gap: 2px;
}
.chat-head-copy strong {
  font-size: 0.84rem;
}
.chat-head-copy span {
  font-size: 0.66rem;
  font-weight: 500;
  opacity: 0.85;
  line-height: 1.35;
}
.chat-body {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 6px;
  align-content: start;
  background: var(--paper);
}
.chat-bubble {
  max-width: 88%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.4;
}
.chat-bubble.bot { background: #fff; border: 1px solid var(--line-dark); }
.chat-bubble.me {
  margin-left: auto;
  background: #1a6bff;
  color: #fff;
}
.chat-form-consult {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--line-dark);
  background: #f7f8fb;
  flex: 0 0 auto;
}
.chat-fields {
  display: flex;
  flex-direction: row;
  gap: 6px;
}
.chat-fields.is-collapsed {
  display: none;
}
.chat-fields input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line-dark);
  font: inherit;
  font-size: 0.72rem;
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
}
@container (max-width: 230px) {
  .chat-head-copy span {
    display: none;
  }
}
.chat-composer {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.chat-message {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  font: inherit;
  font-size: 0.8rem;
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
  resize: none;
  line-height: 40px;
}
.chat-composer button,
#chat-submit {
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  height: 40px;
  min-height: 40px;
  min-width: 52px;
  width: auto;
  flex: 0 0 auto;
  background: linear-gradient(120deg, #3d6bff, #7b3cff);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
#chat-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}
.chat-status {
  margin: 0;
  font-size: 0.7rem;
  color: var(--muted);
}
.chat-status.is-error {
  color: #c0392b;
}

.chat-launcher {
  display: none !important;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line-dark);
}
.chat-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-dark);
}

@media (max-width: 960px) {
  .feat-stats { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-wide { grid-column: auto; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .capability-cols { grid-template-columns: repeat(2, 1fr); }
  .device-frame.is-mobile { width: 56%; }
}

@media (max-width: 720px) {
  .capability-cols { grid-template-columns: 1fr; }
  .chat-panel {
    --chat-h: min(58vh, 440px, calc(var(--chat-avail) - 16px));
    right: 0;
    top: calc(var(--chat-origin) + (var(--chat-avail) - var(--chat-h)) / 2);
    bottom: auto;
    transform: none;
    width: min(200px, 42vw);
    height: var(--chat-h);
    max-height: var(--chat-h);
  }
  .chat-body {
    min-height: 160px;
  }
  .chat-fields {
    grid-template-columns: 1fr;
  }
}
