.compact-menu, .menu-account { display: none; }

@media (max-width: 1024px) {
  #kibu-page {
    --gutter: clamp(16px, 5vw, 40px);
    width: 100%; height: auto; zoom: 1;
  }
}

@media (max-width: 1024px) {
  .kibu-navbar {
    /* Desktop glass starts at 48px against an 80px content gutter. */
    --navbar-edge: calc(var(--gutter) * .6);
    padding: 12px var(--menu-padding);
    inset-inline: 0;
    width: auto;
    translate: none;
  }
  .kibu-navbar::before { inset: 4px var(--navbar-edge); }
  .kibu-navbar > .layer-5 { width: 100%; grid-template-columns: 1fr; translate: none; }
  .kibu-navbar .layer-6 { width: 100%; }
  .kibu-navbar .layer-19 { justify-self: center; align-self: center; margin: 0; zoom: .78; }
  .kibu-navbar .layer-13 { width: auto; }
}

@media (max-width: 1024px) {
  .kibu-navbar { --bar-height: 72px; --menu-padding: var(--gutter); padding-inline: var(--menu-padding); }
  .kibu-navbar .layer-6 { height: calc(var(--bar-height) - 24px); }
  .kibu-navbar .layer-13 { gap: 10px; }
  .kibu-navbar .layer-14 { order: 1; }
  .kibu-navbar .layer-14 a { display: grid; place-items: center; min-height: 44px; }
  .menu-open .kibu-navbar { background: #fafafd; }
  .menu-open .kibu-navbar::before { opacity: 1; }
  .menu-open .kibu-navbar .layer-14 { color: #202453; }
  .menu-open .kibu-navbar .layer-13 > .layer-15 { display: none; }
  .compact-menu {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: #ffffffeb; color: #293563; border-radius: 50%; cursor: pointer;
  }
  .compact-menu[aria-expanded=true] { background: #e3e7ff; }
  .compact-menu:focus-visible { outline: 2px solid #4353ff; outline-offset: 2px; }
  .menu-lines { position: relative; width: 20px; height: 16px; }
  .menu-lines i {
    position: absolute; left: 0; top: 7px; width: 100%; height: 2px;
    border-radius: 2px; background: currentColor;
  }
  .menu-lines i:first-child { transform: translateY(-6px); }
  .menu-lines i:last-child { transform: translateY(6px); }
  .compact-menu[aria-expanded=true] i:first-child { transform: rotate(45deg); }
  .compact-menu[aria-expanded=true] i:nth-child(2) { opacity: 0; }
  .compact-menu[aria-expanded=true] i:last-child { transform: rotate(-45deg); }
  .kibu-navbar .layer-7 {
    display: flex; align-items: flex-start; position: absolute;
    top: calc(100% + 12px); left: calc(-1 * var(--menu-padding)); width: calc(100% + 2 * var(--menu-padding));
    height: calc(100dvh - var(--bar-height)); overflow-y: auto; overscroll-behavior: contain;
    padding: 12px var(--menu-padding) max(20px, env(safe-area-inset-bottom));
    background: #fafafd;
    visibility: hidden; opacity: 0; clip-path: inset(0 0 100%);
  }
  .compact-menu[aria-expanded=true] + .layer-7 {
    visibility: visible; opacity: 1; clip-path: inset(0);
  }
  @media (prefers-reduced-motion: no-preference) {
    .menu-lines i { transition: transform 220ms ease, opacity 150ms ease; }
    .kibu-navbar .layer-7 {
      transition: opacity 180ms ease, clip-path 220ms ease-out, visibility 0s linear 220ms;
    }
    .compact-menu[aria-expanded=true] + .layer-7 { transition-delay: 0s; }
  }
  .kibu-navbar .layer-7 .layer-8 {
    width: 100%; min-height: 100%; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 0; color: #202453; font-size: 18px;
  }
  #section-menu .kibu-link { display: flex; align-items: center; min-height: 48px; }
  #section-menu .kibu-link::before { content: none; }

  .menu-account { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 20px; }
  .kibu-navbar .menu-account .menu-login { width: 100%; background: #eef0ff; }
  .kibu-navbar #section-menu .compact-join { display: none; }
  html.menu-open { overflow: hidden; }

  .menu-open .kibu-navbar {
    height: 100dvh;
    background-color: #4353ff;
    background-image: var(--kibu-blue-image);
    background-size: 128px 128px, cover;
    background-repeat: repeat, no-repeat;
  }
  .menu-open .kibu-navbar::before { bottom: auto; height: calc(var(--bar-height) - 8px); }
  #section-menu { --item-inset: calc(var(--menu-padding) - var(--navbar-edge)); padding-inline: var(--navbar-edge); background: transparent; }
  #section-menu .layer-8 { color: white; }
  #section-menu .kibu-link { padding-inline: var(--item-inset); border-radius: 16px; }
  #section-menu .kibu-link:is(:active, :focus-visible) { background: rgb(32 36 83 / 16%); }
  .kibu-navbar::before { opacity: 1; }
  .kibu-navbar .layer-19 { justify-self: start; }
  .kibu-navbar .layer-6 { justify-content: flex-end; gap: 12px; }
  .compact-menu { order: 1; color: #4353ff; background: transparent; }
  .compact-menu[aria-expanded=true] { background: transparent; }
  .compact-menu .menu-lines { width: 22px; height: 18px; }
  .compact-menu .menu-lines i { top: 7.5px; height: 3px; border-radius: 100px; }
  .kibu-navbar .layer-14, .kibu-navbar .menu-login { display: none; }
  .menu-open .kibu-navbar .layer-13 > .layer-15 { display: flex; }
  #section-menu .menu-account {
    margin-inline: var(--item-inset);
    margin-bottom: 16px;
    border-top: 1px solid rgb(255 255 255 / 18%);
    padding-top: 28px;
  }
  .kibu-navbar #section-menu .compact-join {
    display: grid; place-items: center; background-color: rgb(32 36 83 / 16%);
  }
}
@media (max-width: 1024px) {
  .layer-2 { height: auto; }
  .layer-3 { inset: 0; translate: none; width: 100%; height: 100%; }
  .layer-4 { position: relative; inset: auto; width: 100%; padding: 115px var(--gutter) 56px; }
  .layer-23 { align-items: center; gap: 16px; }
  .layer-24 { width: 48%; }
  .layer-26 { width: 100%; font-size: clamp(66px, 9vw, 96px); line-height: .88; }
  .layer-26 span { display: block; white-space: nowrap; }
  .layer-27 { width: 100%; font-size: 18px; }
  .layer-23 > .layer-5 { zoom: .55; }
  #features, #how-it-works, #parents, #pricing, #faqs .layer-282, .layer-342 { padding: 60px var(--gutter); }
  .layer-51, .layer-219, .layer-221, .layer-226, .layer-236, .layer-237, .layer-280, .layer-281, .layer-282, .layer-283, .layer-315, .layer-343, .layer-346, .layer-351 { width: 100%; height: auto; }
  .layer-55, .layer-57, .layer-183, .layer-184, .layer-188, .layer-223, .layer-225, .layer-240, .layer-286, .layer-289 { max-width: 100%; }
  .layer-56, .layer-187, .layer-224, .layer-239, .layer-288, .layer-348 { width: 100%; font-size: clamp(42px, 7.5vw, 64px); line-height: 1; }
  .layer-54, #how-it-works, #pricing { gap: 34px; }
  .layer-58, .layer-247 { display: flex; width: 100%; height: auto; flex-wrap: wrap; gap: 18px; align-items: stretch; justify-content: center; }
  .layer-58 > *, .layer-247 > * { width: calc((100% - 18px) / 2); min-width: 0; }
  .layer-60, .layer-133 { width: 100%; padding: 18px 0; }
  .layer-60 > .layer-5, .layer-133 > div { zoom: .78; }
  .layer-127 { gap: 12px; padding-inline: 16px; }
  .layer-130 { flex: 1; min-width: 0; }
  .layer-130 > * { max-width: 100%; white-space: normal; }
  .layer-182 { flex-direction: column; gap: 24px; align-items: center; }
  .layer-183, .layer-184, .layer-190 { align-items: center; text-align: center; }
  .layer-189 { height: auto; max-width: 100%; padding: 0; }
  .journey-steps { width: min(100%, 580px); align-self: center; flex-direction: column; }
  .journey-step { width: 100%; height: auto; flex: none; padding: 20px; }
  .journey-step.is-open { flex: none; }
  .journey-step:not(.is-open) .journey-icon { display: none; }
  .journey-step:not(.is-open) .journey-top { float: left; margin-right: 12px; height: 30px; }
  .journey-step .journey-trigger { margin: 0; font-size: 20px; line-height: 30px; white-space: normal; }
  .journey-step.is-open .journey-trigger { margin: 16px 0; font-size: 24px; }
  .journey-number { font-size: 20px; }
  .journey-arrow { display: none; }
  .journey-details { position: static; width: 100%; }
  .journey-details > img { margin-bottom: 16px; }
  .journey-details p { max-width: 100%; }
  .layer-236 { gap: 26px; }
  .layer-247 > .layer-5 { display: block; }
  .layer-249, .layer-266 { width: 100%; height: 460px; padding-inline: 20px; }
  .layer-264, .layer-274 { width: 100%; }
  .layer-283 { flex-direction: column; align-items: center; gap: 26px; }
  .layer-284 { display: contents; }
  .layer-285, .layer-286 { align-items: center; text-align: center; }
  .layer-290 { order: 1; max-width: 100%; }
  .layer-303 { width: min(100%, 650px); align-self: center; padding: 0; }
  .faq-question { height: auto; gap: 12px; white-space: normal; font-size: 18px; }
  .layer-316 { display: none; }
  .layer-351 { display: flex; flex-direction: column; }
  .layer-352 { inset: 0; width: 100%; height: 100%; }
  .layer-356 { position: relative; inset: auto; width: 100%; height: auto; padding: 56px var(--gutter) 0; }
  .layer-357, .layer-358, .layer-359, .layer-362, .layer-363, .layer-379 { width: 100%; gap: 28px; }
  .layer-357 { padding: 0; }
  .layer-358 { flex-direction: column; }
  .layer-361 { max-width: 100%; }
  .layer-379 { flex-wrap: wrap; align-items: center; }
  .layer-380 { max-width: 100%; }
  .layer-389 { flex-wrap: wrap; padding: 0 0 20px; gap: 12px; }
  .layer-353 { position: relative; inset: auto; order: 1; padding: 0; justify-content: center; }
  .layer-354 { font-size: 42vw; letter-spacing: 0; }
  .layer-355 { line-height: .85; }
}

@media (max-width: 660px) {
  .layer-4 { padding-top: 98px; }
  .layer-23 { flex-direction: column; gap: 30px; }
  .layer-24, .layer-25 { width: 100%; align-items: flex-start; text-align: left; }
  .layer-26 { font-size: clamp(62px, 18vw, 92px); }
  .layer-23 > .layer-5 { zoom: .48; }
  .layer-58 > *, .layer-247 > * { width: 100%; }
  .layer-364 { grid-template-columns: repeat(2, max-content); row-gap: 28px; }
  #pricing .layer-241 { --monthly-option-width: clamp(110px, 32vw, 144px); --annual-option-width: clamp(150px, 43vw, 184px); }
  .billing-option[data-billing] { padding-inline: 4px; gap: 4px; min-height: 44px; }
  .layer-245 { padding-inline: 6px; }
  .layer-231 { font-size: 15px; }
  .layer-391 { flex-wrap: wrap; justify-content: flex-start; gap: 12px; }
}

@media (width < 768px) {
  #pricing :is(.layer-236, .layer-237, .layer-238) { align-items: flex-start; }
  #pricing :is(.layer-239, .layer-240) { text-align: left; }
  #footer .layer-358 { gap: 24px; }
  #footer .layer-362 {
    border-block: 1px solid rgb(255 255 255 / 30%);
    padding-block: 24px 28px;
  }
  #footer .layer-357 { gap: 28px; }
  #footer .layer-356 { gap: 56px; }
  #footer .layer-353 { margin-block-start: 32px; }
}

@media (max-width: 385px) {
  .layer-364 { grid-template-columns: max-content; }
}

@media (min-width: 661px) and (max-width: 1024px) {
  /* Fit the original illustration to its half of the hero. */
  .layer-23 { container-type: inline-size; }
  .layer-23 > .layer-5 { zoom: clamp(.5, calc(48cqw / 579px), .76); }

  .billing-option { min-height: 44px; }

  /* Keep the collapsed step number and its title on one baseline. */
  .journey-step:not(.is-open) {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .journey-step:not(.is-open) .journey-top { margin: 0; }
  .journey-step:not(.is-open) .journey-number { line-height: 30px; }
}

@media (768px <= width <= 1024px) {
  #kibu-page { --gutter: clamp(48px, 5.56vw, 64px); }
  #how-it-works { padding-block-start: 72px; }
  .journey-step .journey-trigger { min-height: 44px; }
  .journey-steps, .layer-303 { width: 100%; }
  .layer-382, .layer-384 > div, #faqs .layer-295 { min-height: 44px; }
  .layer-384 > div { min-width: 44px; }
}

@media (768px <= width < 960px) {
  /* Lead with the family offer, then compare the two alternatives side by side. */
  .layer-247 > .layer-5 { order: -1; width: 100%; }
  .layer-266 { height: auto; padding: 24px 28px; }
  .layer-266 .layer-278 { position: static; margin-bottom: 16px; }
  .layer-266 .layer-250 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "price benefits" "action benefits";
    gap: 20px 28px;
    align-items: center;
  }
  .layer-266 .layer-250 > .layer-252 { display: contents; }
  .layer-266 .layer-252 > .layer-252 { grid-area: price; }
  .layer-266 .layer-259 { display: none; }
  .layer-266 .layer-267 { width: 100%; gap: 14px; }
  .layer-266 .layer-261 { grid-area: benefits; width: 100%; }
  .layer-266 .layer-274 { grid-area: action; justify-self: start; width: auto; min-width: 180px; }
}

@media (960px <= width <= 1024px) {
  .layer-58 > *, .layer-247 > * { width: calc((100% - 36px) / 3); }
  .layer-60 > .layer-5, .layer-133 > div { zoom: .72; }
  .layer-127 { flex-direction: column; align-items: flex-start; }
  .layer-261 { width: 100%; }
  .layer-262 { white-space: normal; }
}

@media (768px <= width <= 1024px) {
  #footer { --divider-gap: 24px; scroll-margin-top: 72px; }
  #footer .layer-356 { padding-top: clamp(56px, 6.1vw, 64px); gap: 56px; }
  #footer .layer-357 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    --footer-row-gap: clamp(48px, 6.1vw, 64px);
    gap: var(--footer-row-gap) 40px;
    grid-template-areas: "logo description" "email social" "categories categories";
  }
  #footer :is(.layer-358, .layer-359, .layer-379) { display: contents; }
  #footer .layer-360 { grid-area: logo; }
  #footer .layer-361 { grid-area: description; justify-self: end; text-align: right; line-height: 1.45; text-box: trim-both cap alphabetic; }
  #footer .layer-361 br { display: none; }
  #footer .layer-380 { grid-area: email; }
  #footer .layer-384 { grid-area: social; justify-self: end; }
  #footer .layer-362 { grid-area: categories; }
  #footer .layer-362::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: calc(100% + var(--divider-gap));
    border-top: 1px solid rgb(255 255 255 / 30%);
  }
  #footer .layer-364 {
    grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
    justify-items: stretch;
    text-align: left;
    gap: 48px 40px;
  }
  #footer .layer-364 > :first-child { justify-self: start; }
  #footer .layer-364 > :nth-child(3) { justify-self: end; }
  #footer .layer-364 > :last-child { grid-column: 1; justify-self: start; }
  #footer .layer-389 { flex-wrap: nowrap; padding-bottom: var(--divider-gap); }
  #footer .layer-390 { width: auto; }
  #footer .layer-353 { margin-top: 12px; }
  #footer .layer-354 { font-size: 43vw; }
}

@media (width > 1024px) {
  #kibu-page { --gutter: 80px; }
  .layer-4 { left: var(--gutter); width: calc(100% - 2 * var(--gutter)); }
  #features, #how-it-works, #parents, #pricing, #faqs .layer-282, .layer-342,
  .kibu-navbar, #footer .layer-389 { padding-inline: var(--gutter); }
  #parents { justify-content: center; }
  .layer-343, #footer .layer-379 { width: 100%; }
}

@media (768px <= width <= 1024px) and (prefers-reduced-motion: no-preference) {
  .parent-preview.is-revealing .parent-piece {
    animation-duration: 280ms;
    animation-delay: 60ms;
  }
  .parent-preview.is-revealing .parent-progress-chart,
  .parent-preview.is-revealing .parent-progress-chart ~ .parent-piece {
    animation-delay: 220ms;
  }
  #parents .layer-229 { transition: opacity 280ms ease-out; }
}

@media (width > 1440px) {
  #kibu-page {
    width: auto;
    --gutter: max(5.5556%, calc((100% - 1920px) / 2));
  }
  .kibu-navbar, .kibu-navbar .layer-6, .layer-3, .layer-51, .journey-steps,
  .layer-219, .layer-236, .layer-247, .layer-280, .layer-281, .layer-283,
  .layer-315, .layer-351, .layer-352, .layer-356 { width: 100%; }
  .kibu-navbar .layer-19 { margin-left: 0; justify-self: center; }
  .kibu-navbar::before { inset-inline: calc(var(--gutter) - 32px); }
  .layer-58, .layer-247 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layer-58 > *, .layer-247 > *, .layer-249, .layer-266,
  .layer-264, .layer-274 { width: 100%; }
  .layer-247 > .layer-5 { display: block; }
  .layer-221 { width: min(78.125%, 1320px); }
  .layer-226 { height: auto; }
  .layer-321 { display: block; inset: 0 auto 0 50%; width: 1440px; transform: translateX(-50%); }
  #footer { container-type: inline-size; }
  #footer .layer-357 { width: calc(100% - 2 * var(--gutter)); }
  #footer .layer-358 { justify-content: space-between; }
  #footer .layer-353 { inset-inline: 0; }
  #footer .layer-354 { font-size: 43.14cqw; }
}
