/* Two independent product chapters, inspired by Tara's reveal and phone choreography. */
#chat.feature-chapter, #market.feature-chapter {
  --device-height: 604px;
  --device-width: calc(var(--device-height) * .483408);
  --chapter-wash: linear-gradient(120deg, #e5efff, #eeebff);
  width: 100%; margin: 0; padding: 75px 0 90px; border: 0; background: #fff;
  position: relative; overflow-anchor: none;
}
#market.feature-chapter { --chapter-wash: linear-gradient(120deg, #eeeaff, #e4eeff); }
.feature-chapter .chapter-stage { position: relative; overflow: hidden; isolation: isolate; }
.feature-chapter .chapter-intro { width: min(1040px, calc(100% - 72px)); margin: 0 auto 50px; text-align: center; }
.feature-chapter .chapter-intro h2 { font-size: clamp(44px, 5.1vw, 76px); line-height: 1.25; letter-spacing: -.05em; font-weight: 600; }
.chapter-title-line { display: block; white-space: nowrap; }
.chapter-line-first { transform: translate3d(var(--title-first-x, 0px), 0, 0); }
.chapter-line-second { transform: translate3d(var(--title-second-x, 0px), 0, 0); }
.feature-chapter .chapter-intro>p:last-child { font-size: 17px; line-height: 1.85; color: #6c7991; max-width: 690px; margin: 26px auto 0; }
.chapter-orb { display: inline-block; width: .92em; height: .92em; border-radius: 50%; background: var(--chapter-wash); vertical-align: -.08em; margin-left: .19em; opacity: var(--orb-opacity, 1); }
.feature-chapter .chapter-reveal { position: relative; padding: 60px 0 75px; background: var(--chapter-wash); }
.chapter-header { text-align: center; position: relative; margin-bottom: 38px; }
.chapter-name { color: #283752; font-size: clamp(34px, 3.3vw, 48px); line-height: 1.2; font-weight: 600; letter-spacing: -.035em; }
.chapter-tabs, .feature-chapter .market-toggle { display: flex; width: fit-content; min-width: 0; max-width: 100%; padding: 4px; gap: 4px; border-radius: 27px; margin: 12px auto 0; background: #ffffff73; }
.chapter-tabs button, .feature-chapter .market-toggle button { min-height: 42px; border-radius: 24px; padding: 10px 25px; background: none; color: #7d8cab; font-size: 14px; transition: background .25s, color .25s; }
.chapter-tabs [aria-selected=true], .feature-chapter .market-toggle [aria-selected=true] { background: #fff; color: #455f9c; box-shadow: 0 3px 14px #6985ba0c; }
.feature-chapter .market-toggle::before { display: none; }
.feature-chapter .chapter-layout, .feature-chapter .market-panel { width: min(1120px, calc(100% - 96px)); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; min-height: 0; padding: 0; background: transparent; border-radius: 0; }
.chapter-device-wrap { position: relative; width: var(--device-width); margin: 0 auto; perspective: 1600px; transform-style: preserve-3d; }
.chapter-device { width: var(--device-width); height: var(--device-height); position: relative; isolation: isolate; }
.device-frame { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 8px 15px #0000001a); }
.device-model-layer { position: absolute; z-index: 3; left: -25%; top: -5%; width: 150%; height: 110%; pointer-events: none; }
.device-model-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 18px 22px #23456e24); }
.has-3d-phone .device-frame, .has-3d-phone .device-screen { visibility: hidden; }
.has-3d-phone .device-companion { translate: var(--phone-float-x, 0px) var(--phone-float-y, 0px); }
.phone-demo-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; background: #fcfdff; pointer-events: none; z-index: 5; }
.phone-demo-video { z-index: 6; }
.device-screen { position: absolute; z-index: 2; top: 1.9%; left: 4%; width: 92%; height: 96.2%; border-radius: calc(13% + 2px) / calc(6.3% + 2px); overflow: hidden; background: #fcfdff; }
.device-status { height: 34px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; background: #fcfdff; color: #29364e; font: 600 10px Arial, sans-serif; }
.device-island { position: absolute; width: 30%; height: 3.25%; left: 35%; top: 7px; border-radius: 20px; background: #080b11; box-shadow: inset -8px 0 8px #151d2b; }
.device-signal { display: flex; align-items: center; gap: 5px; font-size: 9px; }
.device-signal b { display: inline-block; width: 14px; height: 7px; border: 1px solid #32425c; border-radius: 2px; }
.device-window { height: calc(100% - 34px); overflow: hidden; background: #fcfdff; }
.chapter-device-pane { padding: 14px 16px 30px; }
.chapter-ready .chapter-device-pane { height: 100%; }
.device-home { position: absolute; bottom: 8px; left: 34%; width: 32%; height: 4px; border-radius: 4px; background: #26334b; z-index: 2; }
.device-compose { position: absolute; left: 10px; right: 10px; bottom: 24px; display: flex; align-items: center; gap: 8px; min-height: 35px; padding: 7px 10px; border-radius: 20px; background: #f0f3fa; color: #a0adc3; font-size: 11px; pointer-events: none; }
.device-compose>span:first-child { font-size: 17px; }
.device-compose svg { width: 18px; height: 18px; margin-left: auto; color: #90a1c0; }
.chapter-copy { min-width: 0; }
.feature-chapter .chapter-copy h3 { color: #263652; font-size: 36px; line-height: 1.45; letter-spacing: -.035em; font-weight: 550; }
.feature-chapter .chapter-copy .marketing-card-copy>p, .feature-chapter .chapter-copy .marketing-copy>p:not(.eyebrow) { font-size: 16px; line-height: 1.85; color: #667795; margin-top: 22px; max-width: 430px; }
.feature-chapter .chapter-copy .feature-kind { font-size: 13px; color: #8192b6; margin-bottom: 15px; }
.chapter-ready:not(.chapter-scroll) .chapter-copy:not(.is-active), .chapter-ready .chapter-device-pane:not(.is-active) { display: none; }
.feature-chapter [hidden] { display: none !important; }
.feature-chapter .market-steps { margin-top: 27px; gap: 14px; }
.feature-chapter .market-steps li { color: #7487aa; font-size: 14px; }

/* App UI remains crisp inside the device rather than being blurred or scaled as a card. */
.feature-chapter .group-example, .feature-chapter .private-conversation { padding: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; min-height: 0; }
.feature-chapter .chapter-device .example-topline { font-size: 13px; color: #405a82; padding-bottom: 17px; border-bottom: 1px solid #edf1f8; gap: 8px; }
.feature-chapter .chapter-device .demo-label { font-size: 10px; color: #97a1b4; }
.feature-chapter .chapter-device .example-message { gap: 8px; margin-top: 23px; }
.feature-chapter .chapter-device .example-message>p, .feature-chapter .chapter-device .agent-reply p { font-size: 13px; line-height: 1.85; color: #657895; }
.feature-chapter .chapter-device .person-avatar { width: 28px; height: 28px; font-size: 11px; border-radius: 9px; }
.feature-chapter .chapter-device .example-message.mine { margin: 18px 0 0 17px; }
.feature-chapter .chapter-device .example-message.mine>p { padding: 11px 12px; background: #edf2ff; }
.feature-chapter .chapter-device .agent-reply { gap: 8px; margin-top: 24px; }
.feature-chapter .chapter-device .agent-reply .agent-symbol { width: 28px; height: 28px; font-size: 14px; }
.feature-chapter .chapter-device .agent-reply strong { font-size: 12px; }
.feature-chapter .chapter-device .task-chips { gap: 5px; margin-top: 14px; }
.feature-chapter .chapter-device .task-chips span { padding: 6px 7px; font-size: 10px; }
.feature-chapter .chapter-device .private-consult { background: #f1f4ff; border: 0; padding: 17px 14px; border-radius: 15px; margin-top: 21px; }
.feature-chapter .chapter-device .consult-heading { gap: 6px; flex-wrap: wrap; }
.feature-chapter .chapter-device .consult-heading img { width: 22px; height: 26px; }
.feature-chapter .chapter-device .consult-heading strong { font-size: 12px; }
.feature-chapter .chapter-device .consult-heading>span { font-size: 10px; }
.feature-chapter .chapter-device .private-consult>p { font-size: 13px; line-height: 1.85; min-height: 0; margin-top: 15px; }
.feature-chapter .chapter-device .example-action { font-size: 12px; min-height: 40px; margin-top: 15px; padding: 9px 11px; background: #fff; }
.feature-chapter .chapter-device .market-example { background: none; padding: 0; box-shadow: none; border: 0; border-radius: 0; }
.feature-chapter .chapter-device .market-request { font-size: 13px; line-height: 1.85; padding: 12px 13px; margin: 21px 0 0 12px; background: #edf2ff; }
.feature-chapter .chapter-device .market-service-list { margin-top: 17px; }
.feature-chapter .chapter-device .market-service-list>div { padding-block: 22px; gap: 10px; }
.feature-chapter .chapter-device .service-letter { width: 33px; height: 33px; border-radius: 11px; font-size: 13px; }
.feature-chapter .chapter-device .market-service-list strong { font-size: 14px; }
.feature-chapter .chapter-device .market-service-list p { font-size: 12px; line-height: 1.75; margin-top: 8px; }
.feature-chapter .chapter-device .service-category { display: none; }
.device-companion.device-companion-ip { position: absolute; z-index: 4; width: 110%; height: auto; left: 59.515789%; top: 18%; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; pointer-events: none; }
.has-3d-phone .device-companion.device-companion-ip { left: 0; top: 0; translate: none; transform-origin: 0 0; will-change: transform; }
.device-companion > img { display: block; width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 10px 14px #304c721b); }

/* The desktop reveal is local to each of the two requested sections. */
#chat.chapter-scroll, #market.chapter-scroll { height: 470svh; padding: 0; scroll-margin-top: -125px; }
.chapter-scroll .chapter-stage { position: sticky; top: 0; height: 100svh; }
.chapter-scroll .chapter-intro { position: absolute; inset: 0; height: 100%; width: min(1060px, calc(100% - 80px)); margin: 0 auto; padding: 90px 0 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: var(--intro-opacity, 1); transform: translateY(var(--intro-y, 0px)); }
.chapter-scroll .chapter-title-line { will-change: transform; }
.feature-chapter.chapter-scroll .chapter-reveal { position: absolute; inset: 0; padding: 0; clip-path: circle(var(--reveal-radius, 0px) at var(--reveal-x, 50%) var(--reveal-y, 45%)); }
.chapter-scroll .chapter-header { position: absolute; left: 0; right: 0; top: 112px; margin: 0; opacity: var(--details-opacity, 0); z-index: 4; }
.chapter-scroll .chapter-layout, .chapter-scroll .market-panel { display: block; position: relative; height: 100%; width: min(1200px, calc(100% - 96px)); opacity: var(--details-opacity, 0); }
.chapter-scroll .chapter-device-wrap { position: absolute; left: 50%; top: var(--device-center-y, calc(50% + 90px)); margin: 0; transform: translate(-50%, -50%) translate3d(var(--device-x, -260px), var(--device-y, 18px), 0) perspective(1600px) rotateX(3.5deg) rotateY(var(--device-yaw, 12deg)) rotateZ(var(--device-roll, 1deg)); transform-origin: center; will-change: transform; z-index: 2; }
.chapter-scroll .chapter-device-wrap.has-3d-phone { transform: translate(-50%, -50%) translate3d(var(--device-x, -260px), var(--device-y, 0px), 0); transition: none; }
.chapter-scroll .chapter-copy { position: absolute; left: 50%; top: var(--device-center-y, calc(50% + 90px)); width: var(--chapter-copy-width, min(430px, 37%)); text-align: left; transform: translate(-50%, -50%) translate3d(var(--copy-x, 210px), var(--copy-y, 0px), 0); opacity: var(--copy-opacity, 1); z-index: 1; will-change: transform, clip-path; }
#chat.chapter-scroll .chapter-copy:last-child { text-align: right; }
#chat.chapter-scroll .chapter-copy:last-child p { margin-left: auto; }
.chapter-scroll[data-open="false"] .chapter-header, .chapter-scroll[data-open="false"] .chapter-layout { pointer-events: none; }
.chapter-scroll .device-companion { opacity: var(--companion-opacity, 1); }
@media (min-width: 861px) {
  #chat.feature-chapter.chapter-scroll, #market.feature-chapter.chapter-scroll { --device-width: min(340px, 26vw, 32svh); --device-height: calc(var(--device-width) * 2.06864564); padding: 0; }
}
@media (min-width: 861px) and (max-width: 1150px) {
  .feature-chapter .chapter-copy h3 { font-size: 30px; }
  .feature-chapter .chapter-copy .marketing-card-copy>p, .feature-chapter .chapter-copy .marketing-copy>p:not(.eyebrow) { font-size: 15px; }
}
@media (min-width: 861px) and (max-height: 850px) {
  .chapter-scroll .chapter-header { top: 105px; }
  .chapter-scroll .chapter-name { font-size: 38px; }
  .chapter-scroll .chapter-device-pane { padding: 12px 14px 25px; }
  .chapter-scroll .chapter-device .example-topline { padding-bottom: 13px; }
  .chapter-scroll .chapter-device .example-message { margin-top: 18px; }
  .chapter-scroll .chapter-device .example-message>p, .chapter-scroll .chapter-device .agent-reply p, .chapter-scroll .chapter-device .private-consult>p { font-size: 12px; line-height: 1.8; }
  .chapter-scroll .chapter-device .agent-reply { margin-top: 18px; }
  .chapter-scroll .chapter-device .private-consult { padding: 14px 12px; margin-top: 17px; }
  .chapter-scroll .chapter-device .market-request { margin-top: 16px; padding-block: 10px; font-size: 12px; }
  .chapter-scroll .chapter-device .market-service-list { margin-top: 14px; }
  .chapter-scroll .chapter-device .market-service-list>div { padding-block: 11px; }
  .chapter-scroll .chapter-device .market-service-list p { margin-top: 6px; }
}
@media (min-width: 861px) and (max-height: 799px) {
  #chat.feature-chapter.chapter-scroll, #market.feature-chapter.chapter-scroll { --device-width: min(300px, 25vw, 29svh); }
  .chapter-scroll .chapter-header { top: 98px; }
  .chapter-scroll .chapter-name { font-size: 32px; }
  .chapter-scroll .chapter-copy h3 { font-size: 30px; }
}
@media (max-width: 999px) {
  #chat.feature-chapter, #market.feature-chapter { --device-height: 590px; padding-block: 60px; }
  .feature-chapter .chapter-intro { width: calc(100% - 48px); margin-bottom: 35px; }
  .feature-chapter .chapter-intro h2 { font-size: clamp(30px, 5vw, 44px); line-height: 1.4; letter-spacing: -.035em; }
  .feature-chapter .chapter-intro>p:last-child { font-size: 16px; margin-top: 20px; }
  .feature-chapter .chapter-intro .eyebrow { font-size: 13px; }
  .feature-chapter .chapter-reveal { padding-block: 32px 45px; }
  .chapter-header { margin-bottom: 32px; }
  .chapter-name { font-size: 30px; }
  .chapter-tabs button, .feature-chapter .market-toggle button { min-height: 43px; font-size: 14px; padding-inline: 23px; }
  .feature-chapter .chapter-layout, .feature-chapter .market-panel { width: calc(100% - 48px); grid-template-columns: 1fr; gap: 36px; }
  .chapter-copy { width: min(520px, 100%); margin: 0 auto; text-align: center; }
  .feature-chapter .chapter-copy h3 { font-size: 28px; line-height: 1.5; }
  .feature-chapter .chapter-copy .marketing-card-copy>p, .feature-chapter .chapter-copy .marketing-copy>p:not(.eyebrow) { margin-inline: auto; font-size: 16px; }
  .feature-chapter .market-steps { width: fit-content; margin-inline: auto; text-align: left; }
  .device-companion { opacity: .95; }
  .feature-chapter .chapter-stage { overflow: hidden; }
}
@media (max-width: 480px) {
  .feature-chapter .chapter-intro h2 { font-size: 30px; }
  .feature-chapter .chapter-intro .studio-name { display: inline-block; }
  .feature-chapter .chapter-layout, .feature-chapter .market-panel { width: calc(100% - 44px); }
  .feature-chapter .chapter-copy h3 { font-size: 25px; }
  .chapter-device-wrap { transform: rotate(-2deg); }
  .device-companion { display: none; }
}
@media (max-width: 380px) {
  #chat.feature-chapter, #market.feature-chapter { --device-height: 550px; --device-width: calc(var(--device-height) * .483408); }
  .chapter-device-wrap { transform: none; }
  .feature-chapter .chapter-intro { width: calc(100% - 40px); }
  .feature-chapter .chapter-intro h2 { font-size: 27px; }
  .feature-chapter .chapter-intro>p:last-child { font-size: 15px; }
  .feature-chapter .chapter-copy h3 { font-size: 23px; }
  .chapter-tabs button, .feature-chapter .market-toggle button { padding-inline: 18px; font-size: 13px; }
  .feature-chapter .chapter-device .example-message>p, .feature-chapter .chapter-device .agent-reply p, .feature-chapter .chapter-device .private-consult>p { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .chapter-device-wrap { transform: none; }
  .chapter-tabs button, .feature-chapter .market-toggle button { transition: none; }
}
/* Phone screens stay upright and their supporting copy stays centered on mobile. */
@media (max-width: 860px), (max-height: 600px) and (hover: none) and (pointer: coarse) {
  #chat .chapter-device-wrap, #market .chapter-device-wrap { transform: none; perspective: none; }
  #chat .chapter-copy, #market .chapter-copy,
  #chat .chapter-copy .marketing-card-copy, #market .chapter-copy .marketing-copy,
  #chat .chapter-copy .marketing-card-copy > p, #market .chapter-copy .marketing-copy > p { text-align: center; }
  #market .market-steps { margin-inline: auto; text-align: center; }
  #market .chapter-copy .market-steps li { justify-content: center; text-align: center; }
}
