/* Shared spacing for the product tour, design library, workspace and plans. */
html:has(#template-library) { scroll-padding-top: 0; }
#main {
  --chapter-gap: clamp(58px, 6.2vw, 96px);
  --chapter-title: clamp(35px, 4.15vw, 62px);
  --flow-ink: #28272c;
  --flow-muted: #595760;
  --flow-line: #d1ced6;
}
#main :where(section[id], .template-library, #platform) { scroll-margin-top: 20px; }
#main :is(#product-demos, #grow-story, #open-possibilities, #business-stack) { scroll-margin-top: 16px; }
.intro-demo-link { display: inline-block; color: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: .24em; }

#product-demos {
  margin: 0 auto;
  background: transparent;
  border: 0;
  padding-block: var(--chapter-gap);
}
#product-demos .pd-heading h2 { max-width: 12em; font-size: clamp(29px, 3vw, 43px); line-height: 1.08; }
.template-library {
  color: var(--flow-ink);
  padding-block: var(--chapter-gap);
  background: linear-gradient(150deg, #f9f8f6, #f2f0f5);
  border-block: 1px solid #dedbe0;
}
.library-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.library-intro h2,
#main :is(.wx-heading, .bs-heading, #pricing .section-heading) h2,
#services .section-top h2 {
  margin: 0;
  font-size: var(--chapter-title);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -.052em;
  text-wrap: balance;
}
.library-label, #main :is(.wx-heading .eyebrow, .bs-kicker, .pd-kicker, #services .eyebrow, #pricing .eyebrow, #questions .eyebrow) {
  display: block;
  width: fit-content;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0 0 14px;
  color: #68537c;
  font: 650 11px/1.4 Urbanist, Arial, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
}
#main :is(.wx-heading, #services, #pricing, #questions) .eyebrow::before { content: none; }
.library-intro .button { flex: none; }
.library-switcher {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin: clamp(22px, 3vw, 38px) 0 22px;
  border-bottom: 1px solid var(--flow-line);
}
.library-watch {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: #513a70; font-size: 14px; font-weight: 650; text-decoration: none;
}
.library-watch:hover { text-decoration: underline; text-underline-offset: 4px; }
.library-watch:focus-visible { outline: 2px solid #745595; outline-offset: 3px; }
.library-views {
  display: flex;
  gap: clamp(16px, 3vw, 42px);
}
.library-views a {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; color: var(--flow-muted); font-size: 15px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.library-views a::after {
  content: ''; position: absolute; inset: auto 0 -1px; height: 3px;
  background: #70568b; transform: scaleX(0); transform-origin: left;
}
.library-views a:is(:hover, [aria-selected="true"]) { color: #392749; }
.library-views a[aria-selected="true"]::after { transform: scaleX(1); }
.library-views a:focus-visible, .library-panels > [role="tabpanel"]:focus-visible {
  outline: 2px solid #745595; outline-offset: 4px;
}
.library-panels > [hidden] { display: none !important; }
.template-library .library-panels > section,
.library-panels #templates > .wrap {
  width: 100%; max-width: none; margin: 0; padding: 0;
}
.library-ready :is(.ds-heading, #templates .section-heading, .if-heading) { display: none; }
.library-panels .ds-panels { height: clamp(390px, 38vw, 570px); }
.library-panels .if-window { margin-top: 0; }
.library-panels #templates { background: transparent; }
.library-panels #templates .template-card { min-height: 94px; background: #fbfafc; }
#preview-cinema { margin: 0; }
#preview-library { scroll-margin-block-start: 20px; }

.move-guide {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
  margin-block: var(--chapter-gap);
  padding: clamp(28px, 4vw, 62px);
  border: 1px solid #d6cde2;
  border-radius: clamp(22px, 2.5vw, 36px);
  background: linear-gradient(115deg, #e7def1, #f2edf4 72%);
  color: #2e2438;
}
.move-guide-intro h2 {
  margin: 0; font-weight: 600; font-size: clamp(44px, 5.3vw, 78px);
  line-height: 1.01; letter-spacing: -.055em; color: inherit;
}
.move-guide-intro h2 em { color: #70577e; font-family: Georgia, serif; font-weight: 400; }
.move-guide-intro p { max-width: 31ch; margin: 18px 0 0; font-size: 16px; line-height: 1.55; color: #514859; }
.move-guide-links { list-style: none; margin: 0; padding: 0; }
.move-guide-links li + li { border-top: 1px solid #d4c9db; }
.move-guide-links a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: clamp(12px, 1.5vw, 22px); padding: 18px 2px;
  color: inherit; text-decoration: none;
}
.move-guide-symbol {
  width: 42px; height: 42px; border: 1px solid #d1c5dc; border-radius: 12px;
  display: grid; place-items: center; background: #fbf8fc; color: #644a78;
}
.move-guide-symbol svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.move-guide-links strong { display: block; font-size: clamp(18px, 1.6vw, 24px); letter-spacing: -.025em; font-weight: 600; }
.move-guide-links small { display: block; margin-top: 3px; color: #5b5163; font-size: 14px; line-height: 1.45; }
.move-guide-arrow { font-size: 22px; color: #634977; }
.move-guide-links a:focus-visible { outline: 2px solid #70518a; outline-offset: 3px; border-radius: 6px; }
.move-guide-links a:is(:hover, :focus-visible) strong { text-decoration: underline; text-underline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  html:not(.motion-paused) .move-guide-arrow { transition: transform .2s ease-out; }
  html:not(.motion-paused) .move-guide-links a:hover .move-guide-arrow { transform: translateX(4px); }
}

#grow-story { margin-block: var(--chapter-gap); }
#grow-story.scroll-enhanced:not(.scroll-static) { height: 280svh; min-height: 1380px; }
#connected-tools { margin-block: var(--chapter-gap) 0; }
#incident-platform { display: block; margin-block: clamp(32px, 4vw, 56px) 0; border-block-start: 1px solid var(--flow-line); }
#services {
  padding-block: var(--chapter-gap);
  border-top: 1px solid var(--flow-line);
}
#services .section-top { display: block; margin-bottom: clamp(28px, 3vw, 46px); }
#services .section-description { max-width: 60ch; margin-top: 15px; color: var(--flow-muted); }
#services .dashboard-guide { max-width: none; }
#open-possibilities { margin-block: 0 var(--chapter-gap); }
#open-possibilities.sr-enhanced { height: 200svh; }
#business-stack { margin-block: 0 var(--chapter-gap); }
#business-stack .bs-heading > p { color: var(--flow-muted); max-width: 32ch; font-size: 15px; }
.bs-heading .plan-shortcut { display: inline-block; margin-top: 8px; padding-block: 4px; color: #513a70; text-decoration: underline; text-underline-offset: .24em; }
#pricing { padding-block: clamp(40px, 4vw, 64px) var(--chapter-gap); }
#pricing .pricing-intro p, #questions .muted { color: var(--flow-muted); }
#questions { padding-block: var(--chapter-gap); border-top: 1px solid var(--flow-line); }
#questions h2 { font-size: var(--chapter-title); }

@media (max-width: 700px) {
  #main { --chapter-gap: 50px; }
  .library-intro { align-items: flex-start; flex-direction: column; }
  .library-intro .button { min-height: 40px; }
  .library-switcher { margin: 18px 0; gap: 12px; }
  .library-views { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .library-watch { font-size: 13px; gap: 4px; }
  .library-views a { font-size: clamp(11px, 3.2vw, 15px); white-space: normal; text-align: center; }
  .library-panels .ds-panels { height: clamp(350px, min(98vw, 66svh), 500px); }
  #grow-story.scroll-enhanced:not(.scroll-static) { height: 255svh; }
  #open-possibilities.sr-enhanced { height: 190svh; }
  .move-guide { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 25px 20px 12px; }
  .move-guide-intro p { max-width: 37ch; margin-top: 12px; font-size: 15px; }
  .move-guide-links a { gap: 10px; padding: 15px 0; }
  .move-guide-symbol { width: 34px; height: 34px; border-radius: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-paused) .library-views a::after { transition: transform .2s ease; }
  html:not(.motion-paused) .library-ready .library-panels > section:not([hidden]) { animation: library-view-in .26s ease-out; }
  @keyframes library-view-in { from { opacity: .55; } to { opacity: 1; } }
}

/* Give each chapter its own surface. The changing carousel palette stays in
   its panel instead of colouring the surrounding chapters through the body. */
body:has(#main > .template-library) { background: #f6f5f2; }
#main {
  --chapter-inset: max(32px, calc((100% - 1200px) / 2));
  --chapter-edge: #65587924;
}
#product-demos {
  background: linear-gradient(120deg, #edf5ef, #dcece6);
  border-block: 1px solid #cbded3;
  border-radius: 0;
}
#template-library {
  background: linear-gradient(120deg, #e4daf3, #efebf7 75%);
  border-block: 1px solid #d1c3e3;
}
#moving-to-webnewbiz {
  background: linear-gradient(120deg, #f3dfcc, #faf0e6);
  border-color: #dfc9b6;
}
#main > :is(#connected-tools, #services, #business-stack, #pricing, #questions, .included) {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--chapter-gap) var(--chapter-inset);
  border-block: 1px solid var(--chapter-edge);
}
#main > #connected-tools {
  background: linear-gradient(135deg, #eaf2e9, #dceadf);
}
#main > #incident-platform {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
}
#main > #services {
  background: linear-gradient(125deg, #e1ecf5, #edf3f8);
}
#main > #open-possibilities { margin-block: 32px; }
#main > #business-stack {
  background: linear-gradient(135deg, #f3ecdf, #faf6ef);
}
#main > #testimonials { margin-block: 32px; }
#main > .included {
  background: #e6efe8;
  padding-block: 30px;
  color: #43564a;
  gap: 24px;
}
#main > .included > div { color: #43564a; }
#main > #pricing {
  background: linear-gradient(130deg, #e4daf3, #eee7f6);
}
#main > #questions { background: #fffdf8; }
#main > #start { margin-block: 40px var(--chapter-gap); }
@media (max-width: 700px) {
  #main { --chapter-inset: 22px; }
  #main > :is(#open-possibilities, #testimonials) { margin-block: 20px; }
  #main > .included { padding-block: 26px; gap: 14px; }
  #main > #start { margin-block: 28px 50px; }
}
