/* MindSupplier Help Center mobile layout hardening. */
html { overflow-x: hidden; }
body { min-width: 320px; overflow-x: clip; }

.faq-list { display: grid; gap: 9px; }
.nav-divider { height: 1px; margin: 14px 10px 8px; background: rgba(255,255,255,.16); }
.faq-nav-link { display: flex; align-items: center; gap: 8px; padding: 9px 10px; color: #C9D8EA; border-radius: 6px; text-decoration: none; font-size: 13px; font-weight: 700; }
.faq-nav-link:hover, .faq-nav-link:focus-visible, .faq-nav-link.active { background: #1A3353; color: #fff; outline: none; }
.faq-item { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 9px; }
.faq-item summary { cursor: pointer; list-style: none; padding: 15px 18px; color: var(--ink); font-size: 14px; font-weight: 750; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--teal); font-size: 20px; font-weight: 400; line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover, .faq-item summary:focus-visible { background: var(--soft); color: var(--teal); }
.faq-item p { margin: 0; padding: 0 18px 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.faq-page h1 { margin-bottom: 8px; }
.faq-controls { display: grid; grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(130px, 1fr)); gap: 10px; align-items: end; margin: 24px 0 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.faq-controls label { display: grid; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 750; }
.faq-controls input, .faq-controls select { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafc; color: var(--ink); font: inherit; font-size: 13px; }
.faq-controls input:focus-visible, .faq-controls select:focus-visible { outline: 2px solid #55BDB7; outline-offset: 2px; }
.faq-clear { min-height: 40px; white-space: nowrap; }
.faq-result-status { min-height: 18px; margin: 10px 2px; color: var(--muted); font-size: 12px; }
.faq-page-list { display: grid; gap: 10px; }
.faq-page-item { border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); }
.faq-page-item summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; padding: 16px 18px; color: var(--ink); font-size: 14px; font-weight: 750; }
.faq-page-item summary::-webkit-details-marker { display: none; }
.faq-page-item summary::after { content: '+'; flex: 0 0 auto; color: var(--teal); font-size: 20px; font-weight: 400; line-height: 1; }
.faq-page-item[open] summary::after { content: '−'; }
.faq-page-item summary:hover, .faq-page-item summary:focus-visible { background: var(--soft); color: var(--teal); }
.faq-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; }
.faq-tags span { padding: 4px 7px; border: 1px solid #C6E5E1; border-radius: 999px; background: #EFF8F7; color: #285D5B; font-size: 10px; font-weight: 700; white-space: nowrap; }
.faq-page-item p { margin: 0; padding: 0 18px 10px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.faq-item-meta { padding: 0 18px 16px; color: var(--muted); font-size: 12px; }
.faq-item-meta strong { color: var(--ink); }
.faq-empty { margin: 16px 0; padding: 28px 20px; border: 1px dashed #BFD8D8; border-radius: 10px; background: #F7FBFB; text-align: center; }
.faq-empty h2 { margin: 0 0 4px; font-size: 17px; }
.faq-empty p { margin: 0; color: var(--muted); font-size: 13px; }

.top {
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}

.top .crumb {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top > div:last-child {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.top-mobile-logo {
  flex: 0 0 auto;
  min-width: 0;
}

.top-mobile-logo img {
  max-width: 32vw;
  height: auto;
}

@media (max-width: 740px) {
  .top {
    height: 64px;
    gap: 8px;
  }

  .shell {
    min-height: 100dvh;
    padding-top: 64px;
  }

  .side {
    top: 64px;
    height: calc(100dvh - 64px);
    min-height: calc(100dvh - 64px);
  }

  .top .crumb {
    display: block;
    flex: 1 1 auto;
    font-size: 11px;
  }

  .top-mobile-logo {
    margin-right: 0;
  }

  .top-mobile-logo img {
    width: 104px;
    max-width: 30vw;
    max-height: 24px;
  }

  .page {
    padding: 20px 14px 42px;
  }

  .home-sections {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero {
    padding: 24px 16px 22px;
  }

  .hero h1,
  .hero p {
    max-width: none;
  }

  .hero-ai-mark {
    display: none;
  }

  .content {
    width: 100%;
    min-width: 0;
  }

  .form {
    flex-wrap: wrap;
  }

  .form .btn {
    width: 100%;
  }

  .faq-controls { grid-template-columns: 1fr; padding: 14px; }
  .faq-page-item summary { display: block; }
  .faq-page-item summary::after { float: right; margin-left: 10px; }
  .faq-tags { margin: 9px 0 0; }
}

@media (max-width: 380px) {
  .top-mobile-logo img {
    width: 88px;
  }

  .top .crumb {
    font-size: 10px;
  }
}

/* Keep the topic orientation card readable on narrow phones. The desktop
   two-column treatment leaves the copy column unusably narrow at 320px. */
@media (max-width: 740px) {
  .topic-ux {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
    padding: 18px 16px;
  }

  .topic-ux-main,
  .topic-ux-main h2,
  .topic-ux-main p {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .topic-ux-main h2 {
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .topic-ux-start {
    max-width: 100%;
    white-space: normal;
  }

  .topic-ux-stats {
    display: none;
  }

  /* Apply the same safe stacking behavior to the other guidance cards. */
  .sop-guide-head,
  .troubleshoot-head,
  .phase2-tools {
    min-width: 0;
  }

  .sop-guide-head p,
  .troubleshoot-head p {
    max-width: none;
  }

  .sop-step-title {
    min-width: 0;
  }

  .sop-step-title h3,
  .sop-step-title p,
  .sop-check {
    overflow-wrap: anywhere;
  }

  .sop-check strong {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .side {
    transition: none;
  }
}

/* Keep the desktop sidebar background aligned with the full content column. */
@media (min-width: 741px) {
  /* Keep the article-level table of contents attached to the document scroll. */
  body { overflow-y: visible; }

  .phase2-reading-grid { align-items: start; }
  .phase2-toc {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
  }

  .shell { min-height: calc(100vh - 72px); align-items: stretch; }
  .side { position: fixed; inset: 72px auto 0 0; width: 286px; height: auto; max-height: none; min-height: 0; align-self: initial; overflow-y: auto; }
  .main { grid-column: 2; min-width: 0; }
}

/* Give the orientation content a clear entry point without changing layout. */
.topic button,
.topic-link {
  letter-spacing: normal;
  text-transform: none;
}
.nav-priority-label {
  padding: 14px 10px 6px;
  color: #9be4d6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-priority-divider {
  margin: 6px 10px 10px;
}
.topic-featured > button {
  color: #d9f3ef;
  background: #1a3353;
  border: 1px solid #2d5975;
}
.topic-badge {
  margin-left: auto;
  color: #9be4d6;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.topic-featured > button > span:last-child { margin-left: 8px; }
.topic-featured .topic-link {
  color: #d9f3ef;
  letter-spacing: normal;
  text-transform: none;
}
.topic-featured .topic-head::after {
  content: "Recommended";
  margin-left: 4px;
  color: #9be4d6;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.card[href="/why-mindsupplier"] {
  position: relative;
  border-color: #8acfc3;
  background: linear-gradient(145deg, #f4fbfa, #ffffff 72%);
  box-shadow: 0 8px 20px rgba(14, 130, 127, .12);
}
.card[href="/why-mindsupplier"]::before {
  content: "Recommended starting point";
  display: inline-block;
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero-illustration {
  position: absolute;
  z-index: 0;
  right: clamp(8px, 3vw, 48px);
  top: 50%;
  width: min(48%, 620px);
  max-height: 92%;
  transform: translateY(-50%);
  object-fit: contain;
  object-position: right center;
  pointer-events: none;
  filter: drop-shadow(0 18px 28px rgba(3, 20, 45, .16));
}

@media (max-width: 740px) {
  .hero-illustration {
    display: none;
  }
}
