:root {
  --v2-ink: #17292e;
  --v2-muted: #5f6f72;
  --v2-green: #17705f;
  --v2-green-dark: #0f5145;
  --v2-warm: #f4efe5;
  --v2-line: #dbe4e1;
  --v2-card: #ffffff;
}

.preview-v2 {
  background: #f6f7f4;
  color: var(--v2-ink);
}

.preview-v2 .app {
  min-height: 100dvh;
}

.preview-v2 .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.preview-v2[data-view="home"] .case-story,
.preview-v2[data-view="home"] .basin-showroom,
.preview-v2[data-view="home"] .wizard,
.preview-v2[data-view="case"] .hero,
.preview-v2[data-view="case"] .basin-showroom,
.preview-v2[data-view="case"] .wizard,
.preview-v2[data-view="catalog"] .hero,
.preview-v2[data-view="catalog"] .case-story,
.preview-v2[data-view="catalog"] .wizard,
.preview-v2[data-view="flow"] .hero,
.preview-v2[data-view="flow"] .case-story,
.preview-v2[data-view="flow"] .basin-showroom {
  display: none !important;
}

.preview-v2[data-view="flow"] .wizard {
  display: block !important;
}

.preview-v2 .hero {
  min-height: calc(100dvh - 76px);
}

.preview-v2 .hero-hook {
  position: relative;
  z-index: 2;
  padding: 32px 22px 18px;
  color: #fff;
}

.preview-v2 .hero-hook h1 {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.16;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.preview-v2 .hero-hook em {
  color: #f4c978;
  font-style: normal;
}

.preview-v2 .hero-copy h1 {
  max-width: 760px;
  text-wrap: balance;
}

.preview-v2 .hero-copy h1 em {
  color: var(--v2-green);
}

.preview-v2 .hero-actions {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.preview-v2 .hero-actions .hero-entry {
  min-height: 70px;
  grid-template-columns: minmax(0, 1fr) 32px;
  padding: 14px 18px 14px 22px;
  border-radius: 18px;
}

.preview-v2 .hero-actions .entry-copy b {
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.25;
  white-space: nowrap;
}

.preview-v2 .hero-actions .entry-arrow {
  right: 18px;
  font-size: 22px;
}

.preview-v2 .showroom-cta {
  background: #fff;
  border-color: var(--v2-line);
  color: var(--v2-ink) !important;
}

.preview-v2 .showroom-cta .entry-copy small,
.preview-v2 .showroom-cta .entry-copy em {
  color: var(--v2-muted) !important;
}

.preview-v2 .showroom-cta .entry-copy b,
.preview-v2 .showroom-cta .entry-arrow {
  color: var(--v2-ink) !important;
}

.preview-v2 .showroom-cta .entry-number {
  color: var(--v2-green) !important;
  background: #e5f2ed;
}

.preview-v2 .text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.preview-v2 .case-story,
.preview-v2 .basin-showroom,
.preview-v2 .wizard {
  min-height: calc(100dvh - 76px);
}

.preview-v2 .wizard {
  max-width: 840px;
  margin-inline: auto;
}

.preview-v2 .wizard-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.preview-v2 .flow-back,
.preview-v2 .case-next {
  min-width: 48px;
  min-height: 48px;
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  background: #fff;
  color: var(--v2-ink);
  font: inherit;
  cursor: pointer;
}

.preview-v2 .flow-back:focus-visible,
.preview-v2 button:focus-visible,
.preview-v2 a:focus-visible {
  outline: 3px solid #d78b2c;
  outline-offset: 3px;
}

.preview-v2 h1[tabindex="-1"]:focus,
.preview-v2 h2[tabindex="-1"]:focus {
  outline: none;
}

.preview-v2 .case-page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.preview-v2 .catalog-conversion {
  max-width: 680px;
  margin: 28px auto 0;
  padding: 28px;
  text-align: center;
  border-radius: 24px;
  background: var(--v2-ink);
  color: #fff;
}

.preview-v2 .catalog-conversion > span {
  color: #f4c978;
  font-size: 13px;
  font-weight: 800;
}

.preview-v2 .catalog-conversion h2 {
  margin: 8px 0;
  color: #fff;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.25;
}

.preview-v2 .catalog-conversion p {
  margin: 0 0 18px;
  color: #dfe9e7;
  line-height: 1.6;
}

.preview-v2 .catalog-conversion .primary {
  width: 100%;
  min-height: 52px;
}

.preview-v2 .case-next:disabled {
  cursor: not-allowed;
  color: #7c8888;
  background: #eef1ef;
}

.preview-v2 .matched-basin-card { cursor: default; }

.preview-v2 .conversion-question,
.preview-v2 .result-video-after-cta {
  display: none;
}

.preview-v2 .result-summary,
.preview-v2 .matched-basins,
.preview-v2 .wechat-conversion {
  margin-bottom: 18px;
}

.preview-v2 .matched-basins-heading p,
.preview-v2 .result-summary p,
.preview-v2 .result-note,
.preview-v2 .wechat-conversion p {
  line-height: 1.6;
}

.preview-v2 .resume-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 20px;
  background: rgba(10, 24, 25, .5);
}

.preview-v2 .resume-panel[hidden] { display: none; }

.preview-v2 .resume-card {
  width: min(100%, 460px);
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(10, 24, 25, .24);
}

.preview-v2 .resume-card small { color: var(--v2-green); font-weight: 700; }
.preview-v2 .resume-card h2 { margin: 8px 0; font-size: 24px; }
.preview-v2 .resume-card p { margin: 0 0 20px; color: var(--v2-muted); line-height: 1.7; }
.preview-v2 .resume-actions { display: grid; gap: 10px; }
.preview-v2 .resume-actions button { min-height: 50px; border-radius: 14px; font: inherit; font-weight: 700; }
.preview-v2 .resume-continue { border: 0; background: var(--v2-green); color: #fff; }
.preview-v2 .resume-restart { border: 1px solid var(--v2-line); background: #fff; color: var(--v2-ink); }

@media (max-width: 720px) {
  .preview-v2,
  .preview-v2 .app {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .preview-v2 .site-header {
    position: relative;
    height: 44px;
    min-height: 44px;
    padding-inline: 12px;
  }
  .preview-v2 .site-header .brand { gap: 7px; }
  .preview-v2 .site-header .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 9px;
    font-size: 17px;
  }
  .preview-v2 .site-header .brand b { font-size: 12px; letter-spacing: .01em; }
  .preview-v2 .site-header .brand small { display: none; }
  .preview-v2 .service-state { gap: 5px; font-size: 10px; white-space: nowrap; }
  .preview-v2 .service-state i { width: 6px; height: 6px; }

  .preview-v2:not([data-view="home"]) .site-header {
    display: none;
  }

  .preview-v2 .case-story {
    padding-top: 24px;
  }

  .preview-v2 .hero {
    min-height: auto;
    display: grid;
    grid-template-rows: auto minmax(220px, 31dvh) auto;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .preview-v2 .hero-hook {
    padding: 18px 20px 16px;
    background: var(--v2-ink);
  }

  .preview-v2 .hero-hook h1 {
    font-size: clamp(25px, 7vw, 31px);
    line-height: 1.16;
  }

  .preview-v2 .hero-photo {
    position: relative;
    inset: auto;
    min-height: 220px;
    max-height: 31dvh;
  }

  .preview-v2 .hero-photo img {
    object-position: center center;
  }

  .preview-v2 .hero-photo::after {
    background: linear-gradient(180deg, rgba(12,24,29,.02) 58%, rgba(12,24,29,.35) 100%);
  }

  .preview-v2 .hero-copy {
    padding: 16px 20px 24px;
  }

  .preview-v2 .hero-copy h1 {
    margin: 10px 0 8px;
    font-size: clamp(25px, 7.3vw, 32px);
    line-height: 1.18;
  }

  .preview-v2 .hero-copy p {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.55;
  }

  .preview-v2 .hero-copy .eyebrow {
    font-size: 11px;
  }

  .preview-v2 .hero-choice-prompt {
    display: none;
  }

  .preview-v2 .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .preview-v2 .hero-entry {
    min-height: 64px;
    grid-template-columns: minmax(0, 1fr) 28px;
    padding: 12px 15px 12px 19px;
  }

  .preview-v2 .hero-actions .entry-copy b {
    font-size: clamp(16px, 4.8vw, 19px);
    white-space: nowrap;
  }

  .preview-v2 .hero-cta .entry-copy small {
    display: none;
  }

  .preview-v2 .showroom-cta {
    min-height: 64px;
  }

  .preview-v2 .showroom-cta .entry-copy small,
  .preview-v2 .showroom-cta .entry-copy em {
    display: none;
  }

  .preview-v2 .text-link {
    margin-top: 8px;
    min-height: 38px;
    font-size: 13px;
  }

  .preview-v2 .trust-strip { display: none; }

  .preview-v2 .case-story,
  .preview-v2 .basin-showroom,
  .preview-v2 .wizard {
    min-height: 100dvh;
    padding-top: 24px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  .preview-v2 .case-story {
    padding-top: 20px;
  }

  .preview-v2 .case-flow figcaption span,
  .preview-v2 .case-proof {
    display: none;
  }

  .preview-v2 .case-flow {
    display: block;
  }

  .preview-v2 .case-flow figure { margin-bottom: 18px; }

  .preview-v2 .wizard {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 12px 16px max(22px, env(safe-area-inset-bottom));
  }

  .preview-v2 .wizard-heading > div { display: none; }

  .preview-v2 .wizard-heading {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 20;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
  }

  .preview-v2 .flow-back {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(23, 41, 46, .1);
  }

  .preview-v2 .wizard > .progress {
    height: 4px;
    margin: 17px 0 22px 52px;
  }

  .preview-v2 .step:not([data-step="4"]) {
    min-width: 0;
    max-width: 100%;
    min-height: calc(100dvh - 55px - env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    padding: 10px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .preview-v2 .step:not([data-step="4"]) > small {
    font-size: 11px;
  }

  .preview-v2 .step:not([data-step="4"]) > h2 {
    max-width: 100%;
    margin: 8px 0 12px;
    font-size: clamp(23px, 7vw, 29px);
    line-height: 1.22;
    overflow-wrap: anywhere;
    text-wrap: wrap;
  }

  .preview-v2 .step .hint {
    margin: -2px 0 12px;
    font-size: 12px;
  }

  .preview-v2 .step .measure-field {
    margin-top: 8px !important;
  }

  .preview-v2 .step .chips,
  .preview-v2 .step .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
    margin-bottom: 16px;
  }

  .preview-v2 .step .option-grid-single {
    grid-template-columns: 1fr;
  }

  .preview-v2 .step-actions {
    grid-template-columns: 1fr;
  }

  .preview-v2 .step-actions .back {
    display: none;
  }

  .preview-v2 .step:not([data-step="4"]) .next,
  .preview-v2 .step:not([data-step="4"]) .step-actions {
    margin-top: auto;
  }

  .preview-v2 .step.hidden { display: none !important; }

  .preview-v2 .option-grid button,
  .preview-v2 .chips button,
  .preview-v2 .next,
  .preview-v2 .back,
  .preview-v2 .secondary-start,
  .preview-v2 .case-next {
    min-height: 52px;
  }

  .preview-v2 .image-label {
    display: none;
  }

  .preview-v2 .wechat-dialog {
    width: min(calc(100% - 18px), 410px);
    max-height: calc(100dvh - 18px);
  }

  .preview-v2 .wechat-dialog[open] {
    animation: wechat-pop-in .32s cubic-bezier(.2, .82, .24, 1);
  }

  .preview-v2 .wechat-poster-visual {
    height: 150px;
  }

  .preview-v2 .wechat-poster-title {
    bottom: 14px;
  }

  .preview-v2 .wechat-poster-title > span,
  .preview-v2 .wechat-poster-title p,
  .preview-v2 .wechat-poster-brand small,
  .preview-v2 .wechat-poster-copy > span,
  .preview-v2 .wechat-poster-copy > small {
    display: none;
  }

  .preview-v2 .wechat-poster-title h2 {
    font-size: 20px;
    line-height: 1.25;
  }

  .preview-v2 .wechat-poster-ticket {
    padding-top: 14px;
  }

  .preview-v2 .wechat-qr-frame {
    margin-top: 10px;
  }

  .preview-v2 .result-summary h2,
  .preview-v2 .matched-basins-heading h2,
  .preview-v2 .wechat-conversion h2 {
    text-wrap: balance;
  }
}

@keyframes wechat-pop-in {
  0% { opacity: 0; transform: translateY(24px) scale(.94); }
  68% { opacity: 1; transform: translateY(-2px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .preview-v2 *,
  .preview-v2 *::before,
  .preview-v2 *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
