/* Square Vize homepage: the page's own patch, loaded after /studio-motion.css, the reviewed
   design's stylesheet, which is maintained separately and not edited here. Only what the live page needs
   that the static prototype did not have: the conversation inside the design's ask box, the
   hidden-state handling the chat client relies on, chips that are links, the skip link, no-script
   source rows, high-contrast mode and anchor offsets under the fixed masthead. Values are the
   design's own tokens. */

/* The design styles links and buttons with display rules stronger than the user-agent [hidden]
   rule; the chat client hides and shows controls with that attribute. */
[hidden]{display:none!important}

/* Skip link, visible on focus only. */
.studio-skip{position:fixed;top:12px;left:12px;z-index:30;padding:12px 16px;border-radius:10px;background:var(--navy);color:#fff;text-decoration:none;font-family:var(--mono);font-size:12px;letter-spacing:.16em;text-transform:uppercase;transform:translateY(-170%)}
.studio-skip:focus{transform:none}

.studio-skip,#close .more a{
  display:inline-flex;align-items:center;min-height:44px;min-width:44px;max-width:100%
}
@media (max-width:600px){
  /* Stack the two closing actions. Suppress the desktop text separator between rows. */
  #close .more{font-size:0}
  #close .more a{display:flex;width:fit-content;margin-inline:auto;font-size:1rem}
}

/* Anchors land clear of the fixed masthead, including deep links and history returns. The margin
   is the masthead's own height; each section's top padding then shows its band before the
   heading rather than a second blank gap. */
#home-chat-ask,#home-latest-answer,#cmpCard,#product-tour,.beat[id],.card[id]{scroll-margin-top:76px}
@media (max-width:820px){#home-chat-ask,#home-latest-answer,#cmpCard,#product-tour,.beat[id],.card[id]{scroll-margin-top:66px}}

/* Conversation: controls and thread above the design's ask box, visible at first paint. The
   thread only takes room once a turn exists (it is rendered without whitespace). */
.home-chat-controls{display:flex;flex-wrap:wrap;gap:4px 18px;margin:26px 0 -18px}
.home-chat-controls a{display:inline-flex;align-items:center;min-height:44px;font-family:var(--mono);font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--studio-accent);text-decoration:none}
.home-chat-controls a:hover{color:var(--studio-accent-strong)}
.home-chat-thread{display:grid;gap:12px}
.home-chat-thread:not(:empty){margin-top:30px;max-height:min(56svh,620px);overflow:auto;padding:2px;scrollbar-width:thin}
.home-chat-thread:not(:empty)+.ask{margin-top:14px}
.hero[data-has-conversation="true"] h1{font-size:clamp(2rem,3.6vw,3.2rem)}
.home-chat-turn{font-size:16px;line-height:1.5;color:var(--ink);overflow-wrap:anywhere}
.home-chat-turn p{color:var(--ink);margin:0 0 8px}
.home-chat-turn p:last-child{margin-bottom:0}
.home-chat-turn-user{margin-left:auto;max-width:78%;width:fit-content;background:var(--pale);border-radius:16px 16px 4px 16px;padding:10px 14px}
.home-chat-turn-answer{background:#fff;border:1px solid rgba(11,13,12,.12);border-radius:20px;padding:16px 18px;box-shadow:0 30px 70px -34px rgba(11,13,12,.3)}
.home-chat-turn-answer:focus{outline:2px solid var(--studio-accent);outline-offset:3px}
.home-chat-role{font-family:var(--mono);font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--label)!important;margin-bottom:6px!important}
.home-chat-sources{font-size:13px!important;color:var(--label)!important}
.home-chat-sources a{color:var(--studio-accent)}
.home-chat-turn-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.home-chat-turn-actions .btn,.home-chat-retry{min-height:44px;padding:0 16px;font-size:12px}
.btn.home-primary{background:var(--ink);border-color:var(--ink);color:#fff}
.btn.home-primary:hover{border-color:var(--ink);filter:brightness(1.2)}
.btn.ghost{background:transparent}
.home-chat-retry{display:inline-flex;align-items:center;margin-top:10px;border:1px solid var(--cline);border-radius:10px;background:#fff;color:var(--ink);font-family:var(--mono);letter-spacing:.2em;text-transform:uppercase;cursor:pointer}
.home-chat-retry:hover{border-color:var(--studio-accent);color:var(--studio-accent)}

/* The ask box: the design's label, textarea and row; the consent and status lines sit under it. */
.home-chat-optin{display:flex;align-items:flex-start;gap:8px;margin:10px 6px 0;font-size:13px;line-height:1.4;color:var(--label)}
.home-chat-optin input{margin:2px 0 0;accent-color:var(--studio-accent)}
.home-chat-optin a{color:inherit}
.home-chat-status{margin:8px 6px 0;font-size:13px;color:var(--label)}
.home-chat-status:empty{display:none}

/* Direct links share the same labels with mouse, keyboard and assistive technology. */
.tasks{margin-top:12px;background:#fff;border:1px solid rgba(11,13,12,.12);border-radius:16px;padding:4px 4px;box-shadow:0 14px 32px -20px rgba(11,13,12,.25)}
.beat p.tasks-title{display:block;margin:0 10px 2px;color:var(--label)}
.task{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;min-height:48px;padding:6px 10px;border-radius:12px;text-decoration:none;color:var(--ink);transition:background .2s var(--ease)}
.task+.task{position:relative}
.task+.task::before{content:"";position:absolute;left:10px;right:10px;top:-1px;height:1px;background:rgba(11,13,12,.08)}
.task:hover{background:var(--pale)}
.task:hover .task-text b{color:var(--studio-accent)}
.task .slot{box-shadow:0 6px 14px -8px rgba(11,13,12,.3)}
.task-text{display:block;min-width:0;overflow:hidden}
.task-text b{display:block;color:var(--ink);font-weight:700;font-size:15px;letter-spacing:-.01em;line-height:1.25;overflow-wrap:anywhere}
.task-go{font-family:var(--mono);font-size:16px;color:var(--studio-accent)}

/* Chips are links here (each example question opens without script and is intercepted with it);
   the design's chip rules assume a button. The example list keeps the chip row's own layout and
   is introduced by a visible label, so the chips read as questions the page answers in place. */
a.chip{display:inline-flex;align-items:center;text-decoration:none}
.home-chat-examples{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:14px}
.home-chat-examples>.mono{color:var(--label)}
.home-chat-prompts{list-style:none;margin:0;padding:0}
.home-chat-prompts li{display:contents}
.home-chat-ctas{margin-top:10px}
.hero .trust{margin-top:18px}
@media (max-width:820px){
  /* Rows of chips wrap instead of shrinking past the viewport once the booking, account and
     plans links join the example questions after a reply. */
  .home-chat-prompts,.home-chat-ctas{flex-wrap:wrap}
  .task{gap:10px;padding:6px 8px}
}

/* Without script the comparison's source rows are simply shown; the toggle only exists for it. */
html:not(.js) .cmp tr.src{display:table-row}
html:not(.js) #bp{display:none}

/* The compare card's action row when it is a plain block rather than a nested footer landmark. */
.cmpcard .cmpfoot{padding:14px 0 0;display:flex;gap:10px;justify-content:space-between;align-items:center;flex-wrap:wrap}
.cmpcard .cmpfoot .toggle{margin:0}
.cmpcard .live-route-links{margin-top:14px}

/* Linked step text keeps the heading colour. */
.steps a{color:var(--fg)}

@media (max-width:820px){
  .home-chat-turn-user{max-width:92%}
  .home-chat-thread:not(:empty){max-height:50svh}
}

/* High-contrast mode: tinted surfaces flatten, so every tile, card, chip and button keeps an
   explicit border, and gradient-filled text falls back to the system text colour. */
@media (forced-colors: active){
  .tile,.slot,.card,.svc,.mini,.chip,.btn,.send,.ask,.tasks,.flow li,.opts li,.pills span,.home-chat-turn{border:1px solid CanvasText;forced-color-adjust:none;background:Canvas;color:CanvasText}
  .task+.task::before{background:CanvasText}
  .task-go{color:LinkText}
  .num,.stats div:first-child b,.marq.big span{background:none;-webkit-text-fill-color:CanvasText;color:CanvasText;-webkit-text-stroke:0}
  .bar{display:none}
  .trust li::before{background:CanvasText}
}

/* The fixed header stays outside the scroll area; every menu link remains reachable
   when the soft keyboard is open or a phone is held sideways. */
@media (max-width:820px) {
  .studio-menu-links {
    max-height:calc(100vh - 78px);
    max-height:calc(100dvh - 78px - env(safe-area-inset-bottom, 0px));
    overflow-y:auto;
    overscroll-behavior-y:contain;
  }
}

/* The masthead: "Try Square Vize" is the one primary action on every width. On a phone the
   text links give way to it and the menu; the wordmark yields only on the narrowest screens
   (the link keeps its accessible name). */
.top nav a.cta,.top .brand-name{white-space:nowrap}
@media (max-width:820px){
  .top nav a.cta{display:inline-flex;font-size:11px;letter-spacing:.12em;padding:0 12px;min-height:44px}
  .top nav{gap:6px}
}
@media (max-width:400px){
  .top{padding-inline:14px}
  .top .brand{gap:6px;font-size:17px}
}
@media (max-width:340px){
  .brand-name{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}

/* Keep navigation and form labels readable at phone sizes. */
.top nav, .top nav a.cta, .ask label[for], .send, .chip, .home-chat-examples > .mono, .tasks-title {
  font-family:var(--sans);text-transform:none;letter-spacing:normal;
}
.top nav, .top nav a.cta {font-size:14px;font-weight:600}
.ask label[for], .home-chat-examples > .mono, .tasks-title {font-size:13px;font-weight:600}
.hero .send {font-size:15px}
.hero .chip {font-size:14px}
@media (max-width:820px){.top nav a.cta{font-size:13px}}
/* The compact menu is one sheet under the masthead, anchored to the masthead rather than to the
   summary so it spans the screen: the page's sections in one group, the destinations in another,
   in sentence case, two to a row. Native disclosure, so it opens without script. */
@media (max-width:820px){
  .studio-menu{position:static}
  .studio-menu-links{top:calc(100% + 6px);left:12px;right:12px;width:auto;padding:10px 10px 6px;border-radius:16px}
  .studio-menu-label{font-family:var(--mono);font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--label);margin:6px 10px 4px}
  .studio-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 6px;margin-bottom:6px}
  .top nav .studio-menu-links a{font-family:var(--sans);font-size:15px;letter-spacing:0;text-transform:none;color:var(--ink);border-radius:10px;padding:5px 10px}
  .top nav .studio-menu-links a:hover{background:var(--pale);color:var(--studio-accent)}
}

/* The section rail names each section in a word. All labels show while the rail is hovered or
   holds focus; otherwise only the current one, as designed. */
.rail:hover a,.rail:focus-within a{color:#fff}

/* The hero on a phone: a smaller icon band, a tighter headline and lead, so the ask box and the
   three routes under it begin on the first screen of a 390 × 844 viewport. */
@media (max-width:820px){
  .beat.hero{padding-top:64px;gap:8px}
  /* Text-led hero: the headline and composer lead; the icon ring follows as a small, decorative
     band rather than opening the screen (order:-1 in studio-motion.css put it first). */
  .hero .stage{order:1;width:min(62%,190px);aspect-ratio:1;margin:4px auto 0}
  .hero h1{font-size:1.9rem;margin:8px 0 6px}
  .hero p.lead{font-size:.95rem;line-height:1.35;margin-bottom:0}
  .ask{margin-top:12px}
  .ask textarea{font-size:17px}
  .beat{padding-top:64px;padding-bottom:56px}
  .beat.hero{padding-bottom:18px}
  .tasks{margin-top:10px}
  .home-chat-examples{margin-top:10px}
}
@media (max-width:400px){
  .beat.hero{align-content:start;padding-top:78px;gap:6px}
  .hero .stage{width:min(48%,150px);margin-top:2px}
  .hero h1{font-size:clamp(1.9rem,8.3vw,2.1rem);margin:8px 0 6px}
  .hero p.lead{font-size:.9rem;line-height:1.3}
  .ask{margin-top:10px}
  .tasks{margin-top:8px;padding:2px 4px}
  .task{min-height:44px;padding:5px 8px}
  .task-text b{font-size:14px}
  .home-chat-examples{margin-top:8px}
}

/* The service shelf on a phone: the same six cards and five smaller services, set tighter and
   two to a row where the width allows, so the whole practice is seen in fewer screens. */
@media (max-width:820px){
  .svc{padding:18px 18px 16px;gap:6px}
  .svc b{font-size:1.2rem}
  .svc p{font-size:14.5px}
  .svc li{font-size:13.5px;line-height:1.3;padding:7px 0 7px 18px}
  .svc li::before{top:12px}
}
@media (min-width:560px) and (max-width:820px){
  .bento{grid-template-columns:1fr 1fr}
}

/* The separators drift with their own passage through the viewport. Both tracks
   are decorative, clipped by their bands and already fully drawn at first paint. */
@media (prefers-reduced-motion:no-preference) {
  @supports (animation-timeline:view()) {
    .marq {view-timeline:--studio-ribbon block;}
    .marq .track {
      --ribbon-start:-24px;
      --ribbon-end:24px;
      animation:studio-ribbon-travel auto linear both;
      animation-timeline:--studio-ribbon;
    }
    .marq.rev .track {--ribbon-start:24px;--ribbon-end:-24px;}
  }
}
@keyframes studio-ribbon-travel {
  from {transform:translateX(var(--ribbon-start));}
  to {transform:translateX(var(--ribbon-end));}
}

/* The source images are actual product captures. Keep each whole screen in its own frame. */
.beat.hero {
  background:#fffcf7;
  grid-template-columns:minmax(0, .95fr) minmax(0, 1.12fr);
  gap:clamp(30px,4vw,72px);
  padding-block:clamp(102px,13vh,150px) clamp(42px,6vh,85px);
}
.hero h1 {max-width:11em; font-size:clamp(2.8rem,4.5vw,5.1rem); letter-spacing:-.065em; line-height:1.01;}
.hero .lead {max-width:43ch; margin:16px 0 0;}
.product-actions {display:flex;align-items:center;gap:12px 22px;flex-wrap:wrap;margin:20px 0;}
.product-primary,.watch-link {display:inline-flex;align-items:center;justify-content:center;gap:.5em;min-height:44px;font-size:15px;font-weight:600;line-height:1.25;text-decoration:none;}
.product-primary {padding:10px 21px;color:white;background:#993310;border-radius:100px;}
.product-primary:hover {background:#70280f;}
.watch-link {color:#29251e;text-underline-offset:5px;}
.watch-link:hover {text-decoration:underline;}
.watch-link span {display:grid;place-items:center;border:1px solid #a9a094;border-radius:50%;width:1.6em;height:1.6em;}
.hero .home-chat-form {margin-top:18px;}
.hero .stage {width:100%;max-width:760px;aspect-ratio:1.26;position:relative;align-self:center;justify-self:end;order:initial;}
.hero .stage::before {content:none;}
.product-preview {position:absolute;inset:0;isolation:isolate;margin:0;pointer-events:none;background:radial-gradient(ellipse 64% 67% at 59% 52%,#f8dec0 2%,#f6e7d7 68%,#faf1e7 100%);border-radius:30px;}
.desktop-screen {position:absolute;left:4%;top:21%;width:83%;padding:6px;background:#f9f7f3;border:1px solid #d6c9ba;border-radius:12px;box-shadow:0 17px 35px -18px #5f4a33;}
.desktop-screen::before {content:"";display:block;height:8px;margin:0 0 4px 4px;width:26px;background:radial-gradient(circle at 3px 4px,#bcb3a7 2px,transparent 2.5px) 0 0/8px 8px repeat-x;}
.product-preview img {display:block;height:auto;width:100%;}
.desktop-screen img {border-radius:4px;}
.phone-screen {position:absolute;right:4.2%;bottom:11%;width:25%;padding:3px;border:1px solid #56554f;background:#212520;border-radius:clamp(10px,1.4vw,21px);box-shadow:0 9px 23px -9px #54442d;}
.phone-screen img {border-radius:clamp(7px,1.13vw,16px);}
.floating-mark {position:absolute;top:4%;right:8%;width:clamp(58px,17%,104px);aspect-ratio:1;transform:scale(.87);transform-origin:center;filter:drop-shadow(0 4px 6px #c3591e26);}
.product-preview-note {position:absolute;bottom:3%;left:4%;right:4%;color:#3e372f;font-weight:600;font-size:clamp(10px,.9vw,13px);letter-spacing:0;line-height:1.4;}
.product-preview-note span {display:block;color:#645b51;font-weight:400;}
#product-tour {background:#fbf6ee;color:#27251f;border-top:1px solid #e9e1d4;}
#product-tour .head {max-width:870px;}
#product-tour .head .kicker {justify-content:start;}
#product-tour h2 {margin:14px 0;font-size:clamp(2.4rem,4.8vw,4.5rem);line-height:1.03;letter-spacing:-.055em;color:#211f1a;}
#product-tour .lead {font-size:clamp(1rem,1.5vw,1.3rem);line-height:1.5;max-width:60ch;margin:0;}
.tour-video video {height:auto;aspect-ratio:8/5;border:1px solid #d9ccba;background:#f7f3ec;}
.tour-copy .steps {margin-top:0;color:#342e28;}
.tour-copy .steps b {color:#221e19;}
.tour-caption {color:#62594e;}
.top nav a.cta {background:#993310;color:#fff;}
@media(max-width:820px) {
  .beat.hero {grid-template-columns:1fr;gap:18px;padding:78px var(--gut) 34px;min-height:auto;}
  .beat.hero .col {display:contents;}
  .hero-intro {order:0;}
  .hero .stage {order:1;justify-self:center;width:min(100%,520px);aspect-ratio:1.48;margin:0;}
  .hero-adviser {order:2;min-width:0;width:100%;}
  .hero h1 {font-size:clamp(2.35rem,7.8vw,3.65rem);max-width:13em;}
  .hero .lead {font-size:1rem;line-height:1.45;margin-top:10px;}
  .product-actions {margin:12px 0 0;}
  .hero .home-chat-form {margin-top:0;}
  .product-preview {border-radius:20px;}
  .desktop-screen {top:19%;width:74%;}
  .phone-screen {right:6%;bottom:10%;width:22%;}
  .floating-mark {right:8%;top:0%;width:15%;}
  .tour-copy .product-actions {margin-top:22px;}
  .hero[data-has-conversation="true"] .hero-adviser {order:0;}
}
.hero .stage {align-self:start;margin-top:clamp(35px,6vh,70px);margin-bottom:38px;}
.product-preview-note {top:calc(100% + 9px);bottom:auto;left:0;right:0;display:flex;align-items:center;gap:6px 13px;flex-wrap:wrap;pointer-events:auto;}
.product-preview-note a {color:#413a32;text-decoration:underline;text-underline-offset:3px;}
.product-preview-note span {margin-left:auto;}
@media(max-width:820px) {
  .hero .stage {margin-top:0;margin-bottom:30px;}
  .product-preview-note {font-size:11px;}
  .product-preview-note span {margin-left:0;}
}

.hero .hero-examples-link {color:inherit;text-decoration:underline;text-decoration-color:#b59b85;text-underline-offset:.2em;}
#examples, #books-payment-example {scroll-margin-top:90px;}
.working-examples .examples-spread {display:grid;grid-template-columns:minmax(0, .8fr) minmax(0, 1.4fr);gap:clamp(32px,7vw,110px);align-items:start;}
.examples-intro h2 {max-width:13ch;line-height:1.03;margin:0;}
.examples-intro > p {max-width:34ch;color:#544d43;margin:18px 0 0;font-size:1.12rem;line-height:1.55;}
.examples-list {margin:0;padding:0;list-style:none;}
.examples-list li {border-top:1px solid #d6cfc4;padding:22px 0;}
.examples-list li:first-child {border-color:#776558;}
.examples-list li:last-child {padding-bottom:0;}
.examples-list h3 {font-size:clamp(1.25rem,2vw,1.6rem);line-height:1.22;letter-spacing:-.035em;margin:0;}
.examples-list p {margin:8px 0 4px;max-width:59ch;color:#504a43;line-height:1.55;}
.examples-list a {display:inline-flex;align-items:center;min-height:44px;color:#893313;font-weight:600;text-decoration:underline;text-underline-offset:.2em;}
.examples-list a:focus-visible, .hero-examples-link:focus-visible {outline:2px solid #893313;outline-offset:3px;}
@media(max-width:800px) {
  .working-examples .examples-spread {grid-template-columns:1fr;gap:24px;}
  .examples-intro h2 {max-width:none;}
  .examples-list li {padding:16px 0;}
}
