/* Approved Guest Landing mobile layer.
   Desktop, authenticated shells, and Guest discovery routes are unreachable. */

body.app-shell-guest #home .ghb-lead-mobile,
body.app-shell-guest #home .ghb-mobile-proof,
body.app-shell-guest #home .ghb-mobile-competition-list,
body.app-shell-guest #home .ghb-actions-mobile,
body.app-shell-guest #home .ghb-footer-auth-label,
body.app-shell-guest #home .ghb-category-title-mobile {
  display: none;
}

@media (max-width: 640px) {
  html body.app-shell-guest:has(#home.active-view) > .topbar {
    height: 60px;
    min-height: 60px;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 8px 16px;
    background: #241d14 !important;
  }

  body.app-shell-guest:has(#home.active-view) > .topbar > .auth-actions {
    display: none !important;
  }

  body.app-shell-guest:has(#home.active-view) > .topbar > .mobile-menu-button {
    grid-column: 2;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  body.app-shell-guest.mobile-menu-open:has(#home.active-view) > .topbar > .main-nav.open,
  body.app-shell-guest.guest-menu-closing:has(#home.active-view) > .topbar > .main-nav.open.guest-menu-closing {
    top: 60px !important;
    height: calc(100dvh - 60px) !important;
  }

  body.app-shell-guest #home .ghb {
    overflow: clip;
  }

  body.app-shell-guest #home .ghb-hero {
    width: calc(100% - 40px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'kicker'
      'title'
      'lead'
      'actions'
      'proof';
    padding: 22px 0 26px;
  }

  body.app-shell-guest #home .ghb-kicker {
    gap: 8px;
    color: var(--w2g-orange-ink);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
  }

  body.app-shell-guest #home .ghb-kicker::before {
    display: block;
    width: 16px;
  }

  body.app-shell-guest #home .ghb-title {
    margin-top: 12px;
    font-size: 33px;
    line-height: 1.26;
    letter-spacing: -0.01em;
  }

  body.app-shell-guest #home .ghb-lead {
    margin-top: 14px;
    color: var(--w2g-body);
    font-size: 15px;
    line-height: 1.68;
  }

  body.app-shell-guest #home .ghb-lead-desktop {
    display: none;
  }

  body.app-shell-guest #home .ghb-lead-mobile {
    display: inline;
  }

  body.app-shell-guest #home .ghb-hero-visual,
  body.app-shell-guest #home .ghb-journey {
    display: none !important;
  }

  body.app-shell-guest #home .ghb-hero > .ghb-actions {
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 18px;
  }

  body.app-shell-guest #home .ghb-hero > .ghb-actions > .ghb-button-primary {
    width: 100%;
    min-height: 50px;
    align-self: stretch;
    padding: 12px 18px;
    font-size: 16px;
  }

  body.app-shell-guest #home .ghb-mobile-proof {
    display: block;
    grid-area: proof;
    margin-top: 24px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-label {
    margin: 0 0 10px;
    color: var(--w2g-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
  }

  body.app-shell-guest #home .ghb-mobile-proof-card,
  body.app-shell-guest #home .ghb-mobile-proof-empty {
    overflow: hidden;
    border: 1px solid var(--w2g-line);
    border-radius: 12px;
    background: var(--w2g-surface);
  }

  body.app-shell-guest #home .ghb-mobile-proof-competition,
  body.app-shell-guest #home .ghb-mobile-competition-main {
    appearance: none;
    display: grid;
    width: 100%;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
  }

  body.app-shell-guest #home .ghb-mobile-proof-competition .ghb-poster-frame,
  body.app-shell-guest #home .ghb-mobile-competition-main .ghb-poster-frame {
    width: 104px;
    height: 104px;
    min-height: 104px;
    padding: 0;
    border-radius: 8px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-competition .ghb-poster-frame img,
  body.app-shell-guest #home .ghb-mobile-competition-main .ghb-poster-frame img {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    background: var(--w2g-surface);
  }

  body.app-shell-guest #home .ghb-mobile-proof-competition .ghb-poster-fallback,
  body.app-shell-guest #home .ghb-mobile-competition-main .ghb-poster-fallback {
    min-height: 104px;
    padding: 10px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-competition .ghb-poster-fallback strong,
  body.app-shell-guest #home .ghb-mobile-competition-main .ghb-poster-fallback strong {
    font-size: 18px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-competition .ghb-poster-fallback span,
  body.app-shell-guest #home .ghb-mobile-competition-main .ghb-poster-fallback span {
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.35;
  }

  body.app-shell-guest #home .ghb-mobile-proof-copy,
  body.app-shell-guest #home .ghb-mobile-competition-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
  }

  body.app-shell-guest #home .ghb-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  body.app-shell-guest #home .ghb-mobile-badges .ghb-comp-cat,
  body.app-shell-guest #home .ghb-mobile-badges .ghb-urgency {
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 10.5px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-copy > strong,
  body.app-shell-guest #home .ghb-mobile-competition-copy > strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15.5px;
    line-height: 1.42;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.app-shell-guest #home .ghb-mobile-proof-copy small,
  body.app-shell-guest #home .ghb-mobile-competition-copy small {
    color: var(--w2g-muted);
    font-size: 12.5px;
    line-height: 1.45;
  }

  body.app-shell-guest #home .ghb-mobile-proof-team,
  body.app-shell-guest #home .ghb-mobile-competition-bridge {
    padding: 12px;
    border-top: 1px solid var(--w2g-line);
    background: var(--w2g-orange-soft);
  }

  body.app-shell-guest #home .ghb-mobile-proof-team-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--w2g-muted);
    font-size: 12px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-team h2 {
    margin: 8px 0 0;
    font-size: 17px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  body.app-shell-guest #home .ghb-mobile-proof-team p,
  body.app-shell-guest #home .ghb-mobile-competition-bridge p {
    margin: 6px 0 0;
    color: var(--w2g-body);
    font-size: 13px;
    line-height: 1.55;
  }

  body.app-shell-guest #home .ghb-mobile-proof-team .ghb-link,
  body.app-shell-guest #home .ghb-mobile-competition-bridge .ghb-link {
    min-height: 40px;
    margin-top: 4px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-empty {
    padding: 16px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-empty h2 {
    margin: 0;
    font-size: 18px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-empty p {
    margin: 6px 0;
    font-size: 13.5px;
    line-height: 1.55;
  }

  body.app-shell-guest #home .ghb-category-ticker,
  body.app-shell-guest #home .ghb-category-head > div:last-child {
    display: none;
  }

  body.app-shell-guest #home .ghb-categories {
    padding-bottom: 28px;
  }

  body.app-shell-guest #home .ghb-category-head,
  body.app-shell-guest #home .ghb-category-marquee,
  body.app-shell-guest #home .ghb-showcase,
  body.app-shell-guest #home .ghb-loop {
    width: calc(100% - 40px);
  }

  body.app-shell-guest #home .ghb-category-head {
    display: block;
    padding: 28px 0 16px;
  }

  body.app-shell-guest #home .ghb-category-head h2,
  body.app-shell-guest #home .ghb-showcase-head h2,
  body.app-shell-guest #home .ghb-section-head h2,
  body.app-shell-guest #home .ghb-loop h2 {
    font-size: 25px;
    line-height: 1.3;
  }

  body.app-shell-guest #home .ghb-category-marquee {
    margin: 0 auto;
    padding: 0;
    overflow: visible;
    touch-action: auto;
  }

  body.app-shell-guest #home .ghb-category-track {
    display: block;
    width: 100%;
    animation: none;
    transform: none !important;
  }

  body.app-shell-guest #home .ghb-category-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  body.app-shell-guest #home .ghb-category-grid-clone {
    display: none;
  }

  body.app-shell-guest #home .ghb-category-card {
    width: auto;
    height: 64px;
    min-height: 64px;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 10px;
  }

  body.app-shell-guest #home .ghb-category-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 7px;
  }

  body.app-shell-guest #home .ghb-category-title {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 13.5px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.app-shell-guest #home .ghb-category-title-desktop {
    display: none;
  }

  body.app-shell-guest #home .ghb-category-title-mobile {
    display: block;
  }

  body.app-shell-guest #home .ghb-category-arrow {
    display: none;
  }

  body.app-shell-guest #home .ghb-showcase {
    display: flex;
    flex-direction: column;
    padding: 28px 0;
  }

  body.app-shell-guest #home .ghb-showcase-head,
  body.app-shell-guest #home .ghb-section-head {
    display: contents;
  }

  body.app-shell-guest #home .ghb-showcase-head > div,
  body.app-shell-guest #home .ghb-section-head > div {
    order: 1;
    padding-bottom: 16px;
  }

  body.app-shell-guest #home .ghb-showcase-head p:not(.ghb-section-label),
  body.app-shell-guest #home .ghb-recruiting-copy,
  body.app-shell-guest #home .ghb-showcase-list-desktop {
    display: none;
  }

  body.app-shell-guest #home .ghb-mobile-competition-list {
    display: flex;
    order: 2;
    flex-direction: column;
    gap: 12px;
  }

  body.app-shell-guest #home .ghb-mobile-competition-card {
    overflow: hidden;
    border: 1px solid var(--w2g-line);
    border-radius: 12px;
    background: var(--w2g-surface);
  }

  body.app-shell-guest #home .ghb-mobile-competition-bridge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  body.app-shell-guest #home .ghb-mobile-competition-bridge p {
    margin: 0;
  }

  body.app-shell-guest #home .ghb-mobile-competition-bridge .ghb-link {
    flex: 0 0 auto;
    margin: 0;
  }

  body.app-shell-guest #home .ghb-showcase-head > .ghb-link,
  body.app-shell-guest #home .ghb-section-head > .ghb-link {
    display: inline-flex;
    order: 3;
    align-self: flex-start;
    min-height: 44px;
    margin-top: 12px;
  }

  body.app-shell-guest #home .ghb-connector {
    display: none;
  }

  body.app-shell-guest #home .ghb-recruiting {
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
  }

  body.app-shell-guest #home .ghb-team-grid {
    order: 2;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 0;
  }

  body.app-shell-guest #home .ghb-team-card {
    min-height: 0;
    gap: 9px;
    padding: 16px;
  }

  body.app-shell-guest #home .ghb-team-card h3 {
    font-size: 18px;
    line-height: 1.38;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
  }

  body.app-shell-guest #home .ghb-team-role-block {
    padding: 12px;
  }

  body.app-shell-guest #home .ghb-team-roles.is-desktop {
    display: none;
  }

  body.app-shell-guest #home .ghb-team-roles.is-mobile {
    display: flex;
  }

  body.app-shell-guest #home .ghb-team-actions {
    margin-top: 0;
  }

  body.app-shell-guest #home .ghb-team-cta {
    width: auto;
    min-height: 44px;
  }

  body.app-shell-guest #home .ghb-team-empty {
    order: 2;
    align-items: flex-start;
    flex-direction: column;
    margin-top: 0;
    padding: 16px;
  }

  body.app-shell-guest #home .ghb-loop {
    gap: 18px;
    padding: 30px 0;
  }

  body.app-shell-guest #home .ghb-loop-copy {
    font-size: 14px;
  }

  body.app-shell-guest #home .ghb-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  body.app-shell-guest #home .ghb-step,
  body.app-shell-guest #home .ghb-step:nth-child(even) {
    padding: 14px 0;
    border-right: 0;
  }

  body.app-shell-guest #home .ghb-close {
    gap: 18px;
    padding: 28px 20px;
  }

  body.app-shell-guest #home .ghb-close h2 {
    font-size: 26px;
    line-height: 1.3;
  }

  body.app-shell-guest #home .ghb-close p {
    font-size: 14px;
  }

  body.app-shell-guest #home .ghb-close .ghb-actions-desktop {
    display: none;
  }

  body.app-shell-guest #home .ghb-close .ghb-actions-mobile {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  body.app-shell-guest #home .ghb-close .ghb-actions-mobile .ghb-button {
    width: 100%;
    min-height: 50px;
  }

  body.app-shell-guest #home .ghb-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
    padding: 28px 20px 0;
  }

  body.app-shell-guest #home .ghb-footer-brand,
  body.app-shell-guest #home .ghb-footer > div:last-child {
    grid-column: 1 / -1;
  }

  body.app-shell-guest #home .ghb-footer-auth-label {
    display: block;
    margin-top: -6px;
    color: var(--w2g-muted);
    font-size: 11.5px;
    line-height: 1.4;
  }

  body.app-shell-guest #home .ghb button:focus-visible,
  body.app-shell-guest #home .ghb a:focus-visible {
    outline: 2px solid var(--w2g-orange);
    outline-offset: 3px;
  }
}

@media (max-width: 370px) {
  body.app-shell-guest:has(#home.active-view) > .topbar {
    padding-inline: 12px;
  }

  body.app-shell-guest:has(#home.active-view) > .topbar > .brand > span:last-child {
    display: none;
  }

  body.app-shell-guest #home .ghb-title {
    font-size: 31px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-competition,
  body.app-shell-guest #home .ghb-mobile-competition-main {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
  }

  body.app-shell-guest #home .ghb-mobile-proof-competition .ghb-poster-frame,
  body.app-shell-guest #home .ghb-mobile-competition-main .ghb-poster-frame {
    width: 96px;
    height: 96px;
    min-height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.app-shell-guest #home .ghb *,
  body.app-shell-guest #home .ghb *::before,
  body.app-shell-guest #home .ghb *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 640px) {
  html[data-theme="light"] body.app-shell-guest:has(#home.active-view) > .topbar {
    border-bottom-color: #E5E7EB !important;
    background: #FFFFFF !important;
    color: #18181B !important;
  }

}
