/* ==============================================================================
 * FILE: training/knowledgebase/help.css
 * VERSION: 1.1.0 - TrackStage Help Center styles (layered on ../TSU/assets/tsu.css)
 * DATE: 2026-10-07
 * CHANGES:
 *   - v1.1.0: More space between numbered steps
 *   - v1.0.0: Initial. Sidebar layout, article typography, image rows, notes, search.
 * ============================================================================== */

.topnav .btn { white-space: nowrap; }
.topnav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--ts-gold); }

/* ---- Index hero ---- */
.kb-hero {
  color: #fff; padding: 56px 0 60px; position: relative; overflow: hidden;
  background: #0B0612 url("../TSU/assets/tsu-hero-bg.jpg") center right / cover no-repeat;
}
.kb-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 6, 18, .92) 0%, rgba(11, 6, 18, .75) 50%, rgba(11, 6, 18, .35) 100%);
}
.kb-hero .wrap { position: relative; }
.kb-hero h1 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 700; }
.kb-hero .lede a { color: var(--ts-gold); }
.kb-search--hero { max-width: 620px; }

/* ---- Index categories ---- */
.kb-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding-top: 48px; padding-bottom: 88px; }
.kb-cat h2 { font-size: 20px; font-weight: 600; }
.kb-cat ul { list-style: none; margin: 10px 0 0; padding: 0; }
.kb-cat li { border-top: 1px solid var(--line); }
.kb-cat li a { display: block; padding: 9px 0; text-decoration: none; color: var(--ink); font-size: 15px; }
.kb-cat li a:hover { color: var(--ts-purple); }
.kb-cat .kb-more { margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.kb-cat:hover { transform: none; }

/* ---- Article layout ---- */
.kb-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; padding-top: 36px; padding-bottom: 88px; align-items: start; }
.kb-aside { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; padding-right: 6px; }
.kb-search { margin-bottom: 18px; }
.kb-side details { border-bottom: 1px solid var(--line); }
.kb-side summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  padding: 11px 4px; font-weight: 600; font-size: 15px; color: var(--ink);
}
.kb-side summary::-webkit-details-marker { display: none; }
.kb-side summary::after { content: "+"; color: var(--ink-2); font-weight: 400; margin-left: 8px; }
.kb-side details[open] summary::after { content: "\2013"; }
.kb-side summary .n { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--chip); border-radius: 99px; padding: 1px 8px; }
.kb-side ul { list-style: none; margin: 0 0 10px; padding: 0; }
.kb-side li a {
  display: block; padding: 6px 10px; border-radius: 8px; font-size: 14px; line-height: 1.4;
  color: var(--ink-2); text-decoration: none;
}
.kb-side li a:hover { background: var(--chip); color: var(--ink); }
.kb-side li a[aria-current="page"] { background: var(--ts-deep); color: #fff; font-weight: 500; }

.kb-crumbs { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }
.kb-crumbs a { color: var(--ink-2); text-decoration: none; }
.kb-crumbs a:hover { color: var(--ts-purple); text-decoration: underline; }
.kb-article > h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin-bottom: 18px; }

/* ---- Article body ---- */
.kb-body { max-width: 760px; font-size: 16.5px; line-height: 1.75; }
.kb-body > p:first-child { font-size: 19px; color: var(--ink-2); font-weight: 300; }
.kb-body p { margin: 0 0 16px; }
.kb-body h2 { font-size: 24px; font-weight: 600; margin: 44px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.kb-body h3 { font-size: 19px; font-weight: 600; margin: 28px 0 8px; scroll-margin-top: 90px; }
.kb-body h4 { font-size: 16px; font-weight: 600; margin: 22px 0 6px; }
.kb-body [id] { scroll-margin-top: 90px; }
.kb-body ul, .kb-body ol { margin: 0 0 18px; padding-left: 24px; }
.kb-body li { margin: 0 0 8px; }
.kb-body ol > li { margin: 0 0 30px; }        /* numbered steps: room to breathe */
.kb-body ol > li:last-child { margin-bottom: 18px; }
.kb-body ol > li > ol, .kb-body ol > li > ul { margin-top: 10px; }
.kb-body li::marker { color: var(--ts-purple); font-weight: 600; }
.kb-body hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.kb-body strong { font-weight: 600; }
.kb-body a { font-weight: 500; }
.kb-body figure { margin: 8px 0 24px; }
.kb-body img.shot {
  height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  box-shadow: 0 6px 20px rgba(53, 27, 91, .10);
}
.kb-body img.icon { height: auto; display: inline-block; vertical-align: middle; }
.kb-body p img.shot { display: block; margin: 8px 0; }
.kb-body .note {
  display: block; background: var(--chip); border-left: 4px solid var(--ts-gold);
  border-radius: 0 10px 10px 0; padding: 12px 16px; font-style: normal; font-size: 15px;
}

/* Image + description rows (legacy layout tables) */
.kb-body table.rows { border-collapse: collapse; margin: 8px 0 24px; width: 100%; }
.kb-body table.rows td { vertical-align: top; padding: 10px 16px 18px 0; border: 0; }
.kb-body table.rows td:first-child { width: 1%; }
.kb-body table.rows td:first-child img { max-width: none; }
.kb-body table.rows tr + tr td { border-top: 1px solid var(--line); }
.kb-body table.rows ul { margin: 0; }

/* On this page */
.kb-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; margin: 0 0 24px; }
.kb-toc p { margin: 0 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.kb-toc ul { margin: 0; padding-left: 18px; }
.kb-toc li { margin: 2px 0; }

/* Prev / next */
.kb-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; max-width: 760px; }
.kb-pn a {
  display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px;
}
.kb-pn a:hover { border-color: var(--ts-purple); }
.kb-pn small { display: block; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.kb-pn .next { text-align: right; }

/* ---- Pagefind search theming ---- */
.kb .pagefind-ui {
  --pagefind-ui-scale: .8; --pagefind-ui-primary: var(--ts-purple); --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--surface); --pagefind-ui-border: var(--line); --pagefind-ui-tag: var(--chip);
  --pagefind-ui-border-width: 1px; --pagefind-ui-border-radius: 999px; --pagefind-ui-font: "Poppins", system-ui, sans-serif;
}
.kb-hero .pagefind-ui { --pagefind-ui-scale: 1; }
.kb-hero .pagefind-ui__drawer { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 4px 18px 14px; margin-top: 10px; box-shadow: var(--shadow); }
.kb .pagefind-ui__result-link { color: var(--ts-purple); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .kb-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
  .kb-aside { position: static; max-height: none; order: 2; }
  .kb-article { order: 1; }
}
@media (max-width: 600px) {
  .kb-body table.rows, .kb-body table.rows tbody, .kb-body table.rows tr, .kb-body table.rows td { display: block; width: auto !important; }
  .kb-body table.rows td { padding: 6px 0; }
  .kb-body table.rows td:first-child img { max-width: 100%; }
  .kb-body table.rows tr + tr td { border-top: 0; }
  .kb-body table.rows tr + tr { border-top: 1px solid var(--line); padding-top: 12px; }
  .kb-pn { grid-template-columns: 1fr; }
  .kb-pn .next { text-align: left; }
}

/* ==============================================================================
 * END OF FILE: training/knowledgebase/help.css | VERSION: 1.0.0
 * ============================================================================== */
