/**
 * Focused Get started — late sheet (Theme 1.4.11).
 * Paints the home-hero dark grid behind the page, keeps cards white,
 * and restyles chrome that sits on the background for ≥ 4.5:1 contrast.
 * Loaded at priority 100 so it wins over Setup get-started.css and
 * Generator account.css / chat.css mint page backgrounds.
 */

/* The scene wrapper only positions the existing .sx-dark + .sx-mesh rules. */
body.ss-focus-page .ss-focus-scene,
body.page-get-started .ss-focus-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body.ss-focus-page .wp-site-blocks,
body.ss-focus-page > header,
body.ss-focus-page > footer,
body.page-get-started .wp-site-blocks {
  position: relative;
  z-index: 1;
}

/* Full-page dark canvas — beat body/main mint !important from 1.4.9 / Setup / Generator. */
html body.ss-focus-page,
html body.page-get-started,
html body.ss-focus-page.ssg-flow,
html body.ssg-flow.ss-focus-page,
html body.page-get-started.ssg-flow {
  background: var(--sx-bg, #04110A) !important;
  background-color: var(--sx-bg, #04110A) !important;
  color: var(--sx-d-text, #E7F1EB);
  min-height: 100vh;
}

html body.ss-focus-page main,
html body.page-get-started main,
html body.ss-focus-page main.wp-block-group,
html body.page-get-started main.wp-block-group,
html body.ss-focus-page.ssg-flow main,
html body.ssg-flow.ss-focus-page main,
html body.ssg-flow main.wp-block-group,
html body.ss-focus-page.ssg-flow main.wp-block-group,
html body.page-get-started.ssg-flow main.wp-block-group,
html body.ss-focus-page.ssg-flow.page-get-started main.wp-block-group,
html body.ss-focus-page.ssg-flow.page-get-started main.wp-block-group.is-layout-flow,
html body.ss-focus-page .wp-block-post-content,
html body.page-get-started .wp-block-post-content,
html body.ss-focus-page .ss-section,
html body.page-get-started .ss-section,
html body.ss-focus-page .entry-content,
html body.ss-focus-page .wp-site-blocks {
  background-color: transparent !important;
  background-image: none !important;
}

/* ------------------------------------------------------------------ */
/* Cards stay solid white so they pop against the grid.               */
/* ------------------------------------------------------------------ */
html body.ss-focus-page .ssc-chat,
html body.ss-focus-page .ssc-proof,
html body.page-get-started .ssc-chat,
html body.page-get-started .ssc-proof,
html body.ss-focus-page .ssg-wizard-form,
html body.ss-focus-page .ssg-auth,
html body.ss-focus-page .ssg-check-email,
html body.ss-focus-page .ssc-restart-ask,
html body.page-get-started .ssg-wizard-form,
html body.page-get-started .ssg-auth,
html body.page-get-started .ssg-check-email {
  background: #fff !important;
  background-color: #fff !important;
  color: var(--sx-text, #1F2937);
}

/* ------------------------------------------------------------------ */
/* Slim header + footer, light-on-dark.                               */
/* ------------------------------------------------------------------ */
body.ss-focus-page .ss-focus-bar,
body.page-get-started .ss-focus-bar {
  background: rgba(4, 17, 10, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

body.ss-focus-page .ss-focus-logo,
body.page-get-started .ss-focus-logo {
  background-image: url("logo-white.svg");
}

body.ss-focus-page .ss-focus-logo:focus-visible,
body.page-get-started .ss-focus-logo:focus-visible {
  outline-color: var(--sx-mint, #8BF0A0);
}

body.ss-focus-page .ss-focus-help,
body.page-get-started .ss-focus-help {
  color: var(--sx-mint, #8BF0A0) !important;
}

body.ss-focus-page .ss-focus-help:hover,
body.ss-focus-page .ss-focus-help:focus-visible,
body.page-get-started .ss-focus-help:hover,
body.page-get-started .ss-focus-help:focus-visible {
  color: #fff !important;
}

body.ss-focus-page .ss-focus-help:focus-visible,
body.page-get-started .ss-focus-help:focus-visible {
  outline-color: var(--sx-mint, #8BF0A0);
}

body.ss-focus-page .ss-focus-foot,
body.page-get-started .ss-focus-foot,
body.ss-focus-page .sx-footer,
body.page-get-started:not(:has(.ss-focus-foot)) .sx-footer {
  background: rgba(4, 17, 10, 0.86) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--sx-d-muted, #A7BDB0) !important;
}

body.ss-focus-page .ss-focus-foot p,
body.page-get-started .ss-focus-foot p,
body.ss-focus-page .sx-foot-bottom,
body.ss-focus-page .sx-foot-bottom p {
  color: var(--sx-d-muted, #A7BDB0) !important;
}

body.ss-focus-page .ss-focus-foot a,
body.page-get-started .ss-focus-foot a,
body.ss-focus-page .sx-foot-bottom a {
  color: var(--sx-mint, #8BF0A0) !important;
}

body.ss-focus-page .ss-focus-foot a:hover,
body.ss-focus-page .ss-focus-foot a:focus-visible,
body.page-get-started .ss-focus-foot a:hover,
body.page-get-started .ss-focus-foot a:focus-visible,
body.ss-focus-page .sx-foot-bottom a:hover,
body.ss-focus-page .sx-foot-bottom a:focus-visible {
  color: #fff !important;
}

body.ss-focus-page .ss-focus-foot a:focus-visible,
body.page-get-started .ss-focus-foot a:focus-visible {
  outline: 2px solid var(--sx-mint, #8BF0A0);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------ */
/* On-background chrome: stepper, Saved, Prefer a form?, Start over.  */
/* ------------------------------------------------------------------ */
body.ss-focus-page .ssc-top-meta,
body.page-get-started .ssc-top-meta,
body.ss-focus-page .ssc-saved,
body.page-get-started .ssc-saved {
  color: var(--sx-d-muted, #A7BDB0) !important;
}

body.ss-focus-page .ssc-formlink,
body.ss-focus-page .ssc-restart,
body.ss-focus-page .ssc-switch a,
body.page-get-started .ssc-formlink,
body.page-get-started .ssc-restart,
body.page-get-started .ssc-switch a {
  color: var(--sx-mint, #8BF0A0) !important;
}

body.ss-focus-page .ssc-formlink:hover,
body.ss-focus-page .ssc-formlink:focus-visible,
body.ss-focus-page .ssc-restart:hover,
body.ss-focus-page .ssc-restart:focus-visible,
body.ss-focus-page .ssc-switch a:hover,
body.ss-focus-page .ssc-switch a:focus-visible,
body.page-get-started .ssc-formlink:hover,
body.page-get-started .ssc-formlink:focus-visible,
body.page-get-started .ssc-restart:hover,
body.page-get-started .ssc-restart:focus-visible,
body.page-get-started .ssc-switch a:hover,
body.page-get-started .ssc-switch a:focus-visible {
  color: #fff !important;
}

body.ss-focus-page .ssc-formlink:focus-visible,
body.ss-focus-page .ssc-restart:focus-visible,
body.ss-focus-page .ssc-switch a:focus-visible,
body.page-get-started .ssc-formlink:focus-visible,
body.page-get-started .ssc-restart:focus-visible,
body.page-get-started .ssc-switch a:focus-visible {
  outline: 2px solid var(--sx-mint, #8BF0A0);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Stepper labels (circles stay white / green so they still pop). */
body.ss-focus-page .ssg-progress li,
body.page-get-started .ssg-progress li {
  color: var(--sx-d-muted, #A7BDB0) !important;
}
body.ss-focus-page .ssg-progress li.is-current,
body.page-get-started .ssg-progress li.is-current {
  color: var(--sx-d-text, #E7F1EB) !important;
}
body.ss-focus-page .ssg-progress li.is-done,
body.page-get-started .ssg-progress li.is-done {
  color: var(--sx-mint, #8BF0A0) !important;
}
body.ss-focus-page .ssg-progress li::after,
body.page-get-started .ssg-progress li::after {
  background: rgba(255, 255, 255, 0.18);
}
body.ss-focus-page .ssg-progress li.is-done::after,
body.page-get-started .ssg-progress li.is-done::after {
  background: linear-gradient(90deg, var(--sx-green, #3BAA4A), var(--sx-teal, #5EEAD4));
}
body.ss-focus-page .ssg-progress li.is-current span {
  box-shadow: 0 0 0 4px rgba(139, 240, 160, 0.18);
}

/* Logged-out / verify-email kicker sits on the dark canvas. */
body.ss-focus-page .ssg-kicker,
body.ss-focus-page .ssg-wizard > .ssg-kicker,
body.ss-focus-page .ssg-wizard-auth > .ssg-kicker,
body.page-get-started .ssg-kicker,
body.page-get-started .ssg-wizard > .ssg-kicker,
body.page-get-started .ssg-wizard-auth > .ssg-kicker {
  color: var(--sx-mint, #8BF0A0) !important;
}

/* Wizard copy on the canvas is light; the white form card keeps dark ink. */
body.ss-focus-page .ssg-wizard,
body.page-get-started .ssg-wizard {
  color: var(--sx-d-text, #E7F1EB);
}
body.ss-focus-page .ssg-wizard-form,
body.ss-focus-page .ssg-auth,
body.ss-focus-page .ssg-check-email,
body.page-get-started .ssg-wizard-form,
body.page-get-started .ssg-auth,
body.page-get-started .ssg-check-email {
  color: var(--sx-text, #1F2937);
}

/* Notices that render above the form card. */
body.ss-focus-page .ss-form-error,
body.page-get-started .ss-form-error {
  background: #fff;
  color: #8A1F11;
  border: 1px solid #F1C0B8;
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

/* ==========================================================================
   1.4.12 — Mobile layout: no horizontal overflow, compact stepper, chat
   height that fits the visible viewport (URL bar + keyboard).
   ========================================================================== */
@media (max-width: 959px) {
  html body.ss-focus-page,
  html body.page-get-started {
    overflow-x: hidden;
  }

  html body.ss-focus-page .ssg-wizard,
  html body.ss-focus-page .ssg-chat-mode,
  html body.ss-focus-page .ss-get-started,
  html body.page-get-started .ssg-wizard,
  html body.page-get-started .ssg-chat-mode,
  html body.page-get-started .ss-get-started {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box;
  }

  html body.ss-focus-page .ssc,
  html body.ss-focus-page .ssc-top,
  html body.ss-focus-page .ssc-grid,
  html body.ss-focus-page .ssc-chat,
  html body.ss-focus-page .ssc-proof,
  html body.ss-focus-page .ssc-scroll,
  html body.ss-focus-page .ssc-dock,
  html body.ss-focus-page .ssc-msg,
  html body.ss-focus-page .ssc-log,
  html body.page-get-started .ssc,
  html body.page-get-started .ssc-top,
  html body.page-get-started .ssc-grid,
  html body.page-get-started .ssc-chat,
  html body.page-get-started .ssc-proof,
  html body.page-get-started .ssc-scroll,
  html body.page-get-started .ssc-dock,
  html body.page-get-started .ssc-msg,
  html body.page-get-started .ssc-log {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  html body.ss-focus-page .ssc-chat,
  html body.page-get-started .ssc-chat {
    overflow-x: hidden;
  }

  html body.ss-focus-page .ssc-say,
  html body.ss-focus-page .ssc-ans,
  html body.page-get-started .ssc-say,
  html body.page-get-started .ssc-ans {
    max-width: 85% !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Chip row scrolls inside the card; never widens the page. */
  html body.ss-focus-page .ssc-dock .ssc-chiprow,
  html body.ss-focus-page .ssc-chiprow,
  html body.page-get-started .ssc-dock .ssc-chiprow,
  html body.page-get-started .ssc-chiprow {
    display: flex;
    flex-wrap: nowrap;
    gap: .5rem;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
  html body.ss-focus-page .ssc-dock .ssc-chip,
  html body.page-get-started .ssc-dock .ssc-chip {
    flex: 0 0 auto;
    max-width: min(80%, 16rem);
  }
  html body.ss-focus-page .ssc-inrow,
  html body.page-get-started .ssc-inrow {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  /* Compact stepper — stays on one row, labels wrap inside their slot. */
  html body.ss-focus-page .ssc-top,
  html body.page-get-started .ssc-top {
    margin-bottom: 0.4rem;
  }
  html body.ss-focus-page .ssc-top .ssg-progress,
  html body.page-get-started .ssc-top .ssg-progress {
    padding-bottom: 0.35rem !important;
    margin-bottom: 0.25rem !important;
  }
  html body.ss-focus-page .ssg-progress li,
  html body.page-get-started .ssg-progress li {
    min-width: 0;
    flex: 1 1 0;
    font-size: 0.62rem !important;
    line-height: 1.15;
    gap: 0.2rem;
    overflow: hidden;
  }
  html body.ss-focus-page .ssg-progress li span,
  html body.page-get-started .ssg-progress li span {
    width: 1.45rem !important;
    height: 1.45rem !important;
    font-size: 0.68rem !important;
  }
  html body.ss-focus-page .ssc-top-meta,
  html body.page-get-started .ssc-top-meta {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Chat height fallback (JS visualViewport replaces --ssc-h). */
  html body.ss-focus-page .ssc,
  html body.page-get-started .ssc {
    --ss-focus-rest: 118px;
    --ssc-h-css: max(240px, calc(100svh - var(--ss-header-h, 56px) - var(--ss-focus-rest, 118px)));
  }
}

@supports (height: 100dvh) {
  @media (max-width: 959px) {
    html body.ss-focus-page .ssc,
    html body.page-get-started .ssc {
      --ssc-h-css: max(240px, calc(100dvh - var(--ss-header-h, 56px) - var(--ss-focus-rest, 118px)));
    }
  }
}
