/* Slimo3D Help / tutorial — light docs layout on landing tokens */

.help-page {
  --help-sidebar-w: 260px;
  --help-content-w: 44rem;
  --help-link: var(--color-green-dark);
  --help-tip-bg: #f0fdf4;
  --help-tip-border: #16a34a;
  --help-warn-bg: #fffbeb;
  --help-warn-border: #d97706;
  --help-mistake-bg: #fef2f2;
  --help-mistake-border: #dc2626;
  --help-plan-bg: #eff6ff;
  --help-plan-border: #2563eb;
}

html {
  scroll-padding-top: calc(var(--header-h) + 12px);
}

.help-page .header .nav {
  gap: 4px;
}

.help-page .header .nav .nav-link.is-current {
  color: var(--color-text);
  font-weight: 600;
}

.help-page .header .nav [hidden] {
  display: none !important;
}

.help-page .header .nav .nav-sep {
  display: inline-block;
  padding: 0 12px;
  color: var(--color-text-muted);
  opacity: 0.45;
  user-select: none;
  pointer-events: none;
}

.help-page .header .nav .btn-nav {
  margin-left: 12px;
}

.help-skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  padding: 8px 14px;
  background: var(--color-text);
  color: var(--color-white);
}

.help-skip:focus {
  left: 12px;
  top: 12px;
}

.help-mobile-bar {
  display: none;
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.help-toc-toggle {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
}

.help-toc-toggle:hover,
.help-toc-toggle[aria-expanded="true"] {
  background: var(--color-bg-light);
}

.help-shell {
  display: grid;
  grid-template-columns: var(--help-sidebar-w) minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h));
  align-items: start;
}

.help-sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow: auto;
  padding: 20px 16px 48px;
  border-right: 1px solid var(--color-border);
  background: var(--color-white);
}

.help-search-wrap {
  margin-bottom: 16px;
}

.help-search {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-light);
  color: var(--color-text);
}

.help-search:focus {
  outline: 2px solid var(--color-green);
  outline-offset: 1px;
  background: var(--color-white);
}

.help-search-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--color-text-light);
}

.help-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-toc a {
  display: block;
  padding: 6px 10px;
  margin: 1px 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  line-height: 1.35;
}

.help-toc a:hover {
  color: var(--color-text);
  background: var(--color-bg-light);
}

.help-toc a.is-active {
  color: var(--color-text);
  background: var(--color-green-light);
  font-weight: 600;
}

.help-toc-empty {
  display: none;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.help-toc-empty.is-visible {
  display: block;
}

.help-sidebar-backdrop {
  display: none;
}

.help-main {
  min-width: 0;
  padding: 32px 40px 80px;
}

.help-article {
  max-width: var(--help-content-w);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.65;
}

.help-article h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

.help-lede {
  margin: 0 0 28px;
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.help-article h2 {
  margin: 2.75rem 0 0.75rem;
  padding-top: 0.25rem;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.help-article h2:first-of-type {
  margin-top: 0;
}

.help-article h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--color-text);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.help-article p {
  margin: 0 0 0.85rem;
}

.help-article ul,
.help-article ol {
  margin: 0.4rem 0 1rem;
  padding-left: 1.35rem;
}

.help-article ul {
  list-style: disc;
}

.help-article ol {
  list-style: decimal;
}

.help-article li {
  margin: 0.28rem 0;
}

.help-article li > ul,
.help-article li > ol {
  margin: 0.2rem 0 0.4rem;
}

.help-article a {
  color: var(--help-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-article a:hover {
  color: var(--color-green);
}

.help-article kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg-light);
}

.help-article code,
.help-ui {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.help-ui {
  font-weight: 600;
  font-family: var(--font-sans);
}

.help-article h2 .help-anchor,
.help-article h3 .help-anchor {
  margin-left: 0.35rem;
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: 500;
  opacity: 0;
}

.help-article h2:hover .help-anchor,
.help-article h3:hover .help-anchor,
.help-article h2:focus-within .help-anchor,
.help-article h3:focus-within .help-anchor,
.help-anchor:focus {
  opacity: 1;
}

.help-goal {
  margin: 0 0 0.5rem;
  color: var(--color-text-muted);
}

.help-goal strong {
  color: var(--color-text);
}

.help-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.help-who-label {
  font-weight: 600;
  color: var(--color-text);
}

.help-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.6;
  border: 1px solid var(--color-border);
  background: var(--color-bg-light);
  color: var(--color-text);
  vertical-align: middle;
}

.help-pill--free {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.help-pill--entry {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

.help-pill--pro {
  background: #dcfce7;
  border-color: #22c55e;
  color: #14532d;
}

.help-pill--soon {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.help-on-page {
  margin: 0 0 1.25rem;
  padding: 12px 16px;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.help-on-page strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.help-on-page ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.help-on-page a {
  text-decoration: none;
}

.help-on-page a:hover {
  text-decoration: underline;
}

.help-hub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 1.25rem;
}

.help-hub-card {
  display: block;
  padding: 16px 16px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-light);
  text-decoration: none !important;
  color: var(--color-text) !important;
}

.help-hub-card:hover {
  border-color: var(--color-green);
  background: var(--color-green-light);
}

.help-hub-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.help-hub-card span {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.help-callout {
  margin: 1rem 0 1.15rem;
  padding: 12px 14px 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  font-size: 0.95rem;
}

.help-callout p:last-child {
  margin-bottom: 0;
}

.help-callout-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.help-callout--tip {
  background: var(--help-tip-bg);
  border-left-color: var(--help-tip-border);
}

.help-callout--tip .help-callout-label {
  color: #166534;
}

.help-callout--warning {
  background: var(--help-warn-bg);
  border-left-color: var(--help-warn-border);
}

.help-callout--warning .help-callout-label {
  color: #92400e;
}

.help-callout--mistake {
  background: var(--help-mistake-bg);
  border-left-color: var(--help-mistake-border);
}

.help-callout--mistake .help-callout-label {
  color: #991b1b;
}

.help-callout--plan {
  background: var(--help-plan-bg);
  border-left-color: var(--help-plan-border);
}

.help-callout--plan .help-callout-label {
  color: #1e40af;
}

.help-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.45;
}

.help-table th,
.help-table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

.help-table th {
  background: var(--color-bg-light);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.help-table tr:last-child td {
  border-bottom: none;
}

.help-table td:first-child,
.help-table th:first-child {
  white-space: nowrap;
}

.help-wire {
  display: grid;
  grid-template-columns: 88px 1fr 100px;
  grid-template-rows: auto auto 140px;
  gap: 4px;
  margin: 0.75rem 0 1.25rem;
  font-size: 12px;
  line-height: 1.3;
}

.help-wire a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none !important;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-light);
  padding: 8px 6px;
}

.help-wire a:hover {
  border-color: var(--color-green);
  background: var(--color-green-light);
}

.help-wire-header {
  grid-column: 1 / -1;
}

.help-wire-toolbar {
  grid-column: 1 / -1;
}

.help-wire-view {
  font-weight: 600;
  background: #eef2ff !important;
}

.help-faq {
  border-top: 1px solid var(--color-border);
}

.help-faq h3 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.help-faq:last-of-type {
  border-bottom: 1px solid var(--color-border);
}

.help-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--color-text);
  background: none;
  border: 0;
  cursor: pointer;
}

.help-faq-q:hover,
.help-faq-q:focus-visible {
  color: var(--color-green-dark);
}

.help-faq-q::after {
  content: "+";
  flex-shrink: 0;
  font-weight: 400;
  color: var(--color-text-muted);
}

.help-faq-q[aria-expanded="true"]::after {
  content: "–";
}

.help-faq-a {
  padding: 0 0 12px;
  color: var(--color-text-muted);
}

.help-faq-a[hidden] {
  display: none;
}

.help-glossary dt {
  margin-top: 1rem;
  font-weight: 650;
}

.help-glossary dd {
  margin: 0.2rem 0 0;
  color: var(--color-text-muted);
}

.help-section-divider {
  margin: 3rem 0 0;
  border: 0;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 900px) {
  .help-mobile-bar {
    display: flex;
  }

  .help-shell {
    grid-template-columns: 1fr;
  }

  .help-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(17, 24, 39, 0.35);
    border: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
  }

  .help-sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .help-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 120;
    width: min(280px, 88vw);
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: none;
  }

  .help-sidebar.is-open {
    transform: translateX(0);
    box-shadow: var(--shadow-md);
  }

  .help-main {
    padding: 20px 16px 64px;
  }

  .help-hub {
    grid-template-columns: 1fr;
  }

  .help-wire {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .help-wire-header,
  .help-wire-toolbar,
  .help-wire-tree,
  .help-wire-view,
  .help-wire-right {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .help-page .header .nav .nav-link-keep {
    display: inline-flex;
  }

  /* Help / Log in hide via landing.css; drop their "|" so App | Account | Log out stays clean. */
  .help-page .header .nav .nav-sep-desktop {
    display: none !important;
  }
}
