/* MyBots home — Pocket 2.0.0 (DESIGN.md §2–3).
   Components come from tokens.css; this file only lays them out.
   Layout is container-driven: .home-root is the inline-size container "home".
   Breakpoints: <768 phone · 768–1199 tablet · >=1200 desktop.
   The floating tab bar sits outside the container (layout containment would
   capture position: fixed), so it uses a viewport media query instead. */

html {
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--mb-topbar-height, 64px) + 16px);
}
body.mybots {
  margin: 0;
  min-block-size: 100dvh;
  background: var(--mb-canvas);
}
.mybots img {
  display: block;
  max-inline-size: 100%;
}
.mybots .home-sprite {
  position: absolute;
  inline-size: 0;
  block-size: 0;
  overflow: hidden;
}

/* ---------- Root container ----------
   "mb" drives the shared 768 / 1200 type, gutter and spacing steps in tokens.css;
   "home" is kept for this page's own visibility helpers. */
.mybots .home-root {
  container: mb home / inline-size;
  overflow-x: clip;
}
.mybots .home-root > * {
  --home-gutter: var(--mb-gutter);
}
@container home (max-width: 767px) {
  .mybots .home-only-wide {
    display: none !important;
  }
}
@container home (max-width: 1199px) {
  .mybots .home-only-desktop {
    display: none !important;
  }
}
@container home (min-width: 768px) {
  .mybots .home-only-phone {
    display: none !important;
  }
}

/* ---------- TopBar ---------- */
.mybots .home-topbar {
  padding-inline: var(--home-gutter);
}
.mybots .home-topbar .mb-topbar__end {
  position: relative;
  grid-column: 3;
}
.mybots .home-topbar__lumi {
  white-space: nowrap;
  min-block-size: var(--mb-target-min);
  padding: 0 18px;
  font-size: 14px;
}
.mybots .home-lang .mb-circle span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--mb-muted);
}
.mybots .home-lang .mb-circle[aria-current="true"]::before {
  background: var(--mb-surface);
  box-shadow: var(--mb-shadow-soft);
}
.mybots .home-lang .mb-circle[aria-current="true"] span {
  color: var(--mb-accent);
}
.mybots .home-menu {
  position: absolute;
  z-index: 25;
  inset-block-start: calc(100% - 4px);
  inset-inline-end: var(--home-gutter);
  inline-size: min(280px, calc(100% - 2 * var(--home-gutter)));
  background: var(--mb-surface);
  box-shadow: var(--mb-shadow-float);
}
.mybots .home-menu .mb-setting-row {
  min-block-size: 48px;
}
.mybots .home-menu__button {
  inline-size: 100%;
  border: 0;
  border-block-start: 1px solid var(--mb-line);
  background: none;
  padding-inline: 0;
  text-align: start;
  cursor: pointer;
}

/* ---------- Page ---------- */
.mybots .home-page {
  max-inline-size: calc(var(--mb-max-width) + 2 * var(--home-gutter));
  margin-inline: auto;
  padding: 0 var(--home-gutter) 40px;
}
.mybots .home-avatar {
  --size: 40px;
  display: block;
  flex: none;
  inline-size: var(--size);
  block-size: var(--size);
  aspect-ratio: 1;
}
.mybots .home-avatar img,
.mybots .home-avatar .web-avatar,
.mybots .home-avatar .web-avatar > img,
.mybots .home-avatar .web-avatar > svg {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}
.mybots .home-avatar .web-avatar {
  contain: layout paint;
  overflow: hidden;
}

/* Hero: Pocket welcome screen, centred */
.mybots .home-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  padding: 36px 0 40px;
}
.mybots .home-trio {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  margin-block-end: 6px;
}
.mybots .home-trio .home-avatar {
  --size: 64px;
}
.mybots .home-trio .home-avatar:nth-child(1) {
  rotate: -8deg;
}
.mybots .home-trio .home-avatar:nth-child(2) {
  --size: 84px;
}
.mybots .home-trio .home-avatar:nth-child(3) {
  rotate: 8deg;
}
.mybots .home-hero .mb-display {
  max-inline-size: 15em;
}
.mybots .home-hero .mb-lead {
  max-inline-size: 34em;
}
.mybots .home-hero__actions {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-block-start: 10px;
}

/* Three feature cards */
.mybots .home-features {
  display: grid;
  gap: 12px;
}
.mybots .home-features > .mb-group {
  margin: 0;
  padding: 4px 16px 16px;
}
.mybots .home-features .mb-group__title {
  font-size: 15px;
}
.mybots .home-features .mb-group__title svg {
  color: var(--mb-accent);
}
.mybots .home-features p {
  color: var(--mb-muted);
  font-size: 15px;
  line-height: 1.55;
  word-break: keep-all;
}

/* Sections */
.mybots .home-section {
  padding-block: 44px 8px;
}
.mybots .home-section__head {
  display: grid;
  gap: 10px;
  margin-block-end: 18px;
}
.mybots .home-section__head .mb-lead {
  max-inline-size: 42em;
}
.mybots .home-section__more {
  margin-block-start: 12px;
}
.mybots .home-section__note {
  margin-block-start: 12px;
}
.mybots .mb-text-link svg {
  inline-size: 16px;
  block-size: 16px;
  flex: none;
}

/* Bots: .mb-bot-grid + .mb-bot--auto from tokens.css (row on phones, card from 768, D4) */
.mybots .home-bots .mb-bot {
  -webkit-tap-highlight-color: transparent;
}
.mybots .home-bots .mb-bot__name {
  flex-wrap: wrap;
}

/* Bundle group */
.mybots .home-bundle {
  display: grid;
  gap: 16px;
}
.mybots .home-bundle .mb-group {
  margin: 0;
}
.mybots .home-bundle__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0 10px;
}
.mybots .home-bundle__head .home-avatar {
  --size: 44px;
}
.mybots .home-bundle__name {
  flex: 1;
  min-inline-size: 0;
  display: grid;
}
.mybots .home-bundle__name strong {
  font-size: 17px;
}
.mybots .home-small-capsule {
  min-block-size: var(--mb-target-min);
  padding: 0 16px;
  font-size: 14px;
  white-space: nowrap;
}
.mybots .home-check {
  color: var(--mb-success);
}
.mybots .home-bundle__note {
  margin-block-start: 10px;
}

/* Team examples */
.mybots .home-teams {
  display: grid;
  gap: 12px;
}
.mybots .home-team {
  margin: 0;
  display: flex;
  flex-direction: column;
  padding-block-end: 12px;
}
.mybots .home-team .mb-group__title {
  color: var(--mb-muted);
  font-size: 13px;
}
.mybots .home-team__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  word-break: keep-all;
  text-wrap: balance;
  padding-block-end: 6px;
}
.mybots .home-team .mb-setting-row .home-avatar {
  --size: 36px;
}
.mybots .home-team .mb-setting-row__title {
  font-weight: 600;
}
.mybots .home-team__output {
  display: grid;
  gap: 4px;
  margin-block-start: auto;
  padding-block-start: 12px;
  border-block-start: 1px solid var(--mb-line);
}
.mybots .home-team__result {
  font-weight: 600;
  word-break: keep-all;
}
.mybots .home-team__output .mb-caption {
  word-break: keep-all;
}

/* How it works */
.mybots .home-how__groups {
  display: grid;
  gap: 12px;
}
.mybots .home-how__groups .mb-group {
  margin: 0;
  list-style: none;
}
.mybots .home-steps .mb-setting-row__title {
  font-weight: 700;
}
.mybots .home-steps .mb-caption {
  font-size: 14px;
  word-break: keep-all;
}

/* FAQ: details/summary rows inside one group */
.mybots .home-faq__items details + details {
  border-block-start: 1px solid var(--mb-line);
}
.mybots .home-faq__items summary {
  list-style: none;
  cursor: pointer;
}
.mybots .home-faq__items summary::-webkit-details-marker {
  display: none;
}
.mybots .home-faq__items summary .mb-setting-row__title {
  flex: 1;
  font-weight: 600;
  word-break: keep-all;
}
.mybots .home-faq__items summary .mb-chevron {
  rotate: 90deg;
  transition: rotate var(--mb-duration-fast) var(--mb-ease);
}
.mybots .home-faq__items details[open] summary .mb-chevron {
  rotate: -90deg;
}
.mybots .home-faq__items details p {
  padding: 0 0 16px;
  color: var(--mb-muted);
  font-size: 15px;
  line-height: 1.65;
  word-break: keep-all;
}

/* Closing call to action */
.mybots .home-cta {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding-block: 64px 24px;
}
.mybots .home-cta .mb-lead {
  max-inline-size: 34em;
}
.mybots .home-cta .mb-capsule {
  margin-block-start: 8px;
}

/* Footer */
.mybots .home-footer {
  border-block-start: 1px solid var(--mb-line);
  padding: 24px var(--home-gutter) calc(var(--mb-tabbar-height) + 48px);
}
.mybots .home-footer__inner {
  max-inline-size: var(--mb-max-width);
  margin-inline: auto;
  display: grid;
  gap: 8px;
}
.mybots .home-footer__links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
}
.mybots .home-footer__links a {
  min-block-size: var(--mb-target-min);
  display: inline-flex;
  align-items: center;
  color: var(--mb-ink);
  font-size: 14px;
  text-decoration: none;
}
.mybots .home-footer__links a:hover {
  text-decoration: underline;
}

/* Lumi introduction sheet */
.mybots .home-lumi .mb-sheet__head {
  min-block-size: 48px;
}
.mybots .home-lumi__body {
  justify-items: center;
  text-align: center;
  padding-block-end: 24px;
}
.mybots .home-lumi__avatar {
  --size: 128px;
}
.mybots .home-lumi__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mybots .home-lumi__tags .mb-badge {
  letter-spacing: 0.04em;
}
.mybots .home-lumi__prompt {
  margin: 0;
  inline-size: 100%;
  padding: 14px 16px;
  border-radius: var(--mb-radius-select);
  background: var(--mb-fill);
  color: var(--mb-ink);
  font-weight: 600;
  line-height: 1.5;
  word-break: keep-all;
}
.mybots .home-lumi .mb-capsule--block {
  max-inline-size: 340px;
}
.mybots .home-lumi .mb-notice {
  inline-size: 100%;
  text-align: start;
}

/* ---------- 768+ ---------- */
@container home (min-width: 768px) {
  .mybots .home-hero {
    padding: 64px 0 56px;
  }
  .mybots .home-hero .mb-lead {
    font-size: 17px;
  }
  .mybots .home-hero__actions {
    grid-auto-flow: column;
    align-items: center;
    gap: 16px;
  }
  .mybots .home-features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mybots .home-section {
    padding-block: 64px 8px;
  }
  .mybots .home-bundle,
  .mybots .home-how {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    column-gap: 32px;
  }
  .mybots .home-how {
    display: grid;
  }
  .mybots .home-teams {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mybots .home-faq__items {
    max-inline-size: var(--mb-reading-width);
  }
  .mybots .home-footer {
    padding-block-end: 32px;
  }
  .mybots .home-footer__inner {
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 32px;
  }
  .mybots .home-footer__links {
    justify-content: flex-end;
  }
  .mybots .home-footer__meta {
    grid-column: 1 / -1;
  }
}
/* ---------- 1200+ ---------- */
@container home (min-width: 1200px) {
  .mybots .home-hero {
    padding: 96px 0 72px;
  }
  .mybots .home-hero .mb-lead {
    font-size: 18px;
  }
  .mybots .home-teams {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Floating tab bar (phone only) ---------- */
@media (min-width: 768px) {
  .mybots .home-tabbar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
