/* SCP Knowledge Base (help.html, help/*.html, built by blog-tools/help.mjs). Brand navy + gold; each category brings
   its own accent (--c, an "r, g, b" triple) for its banner glow, chip and tag. */
.kb { padding: 104px 0 80px; }
.kb-wrap { max-width: 1120px; }

/* ---------- Portal hero ---------- */
.kb-hero { position: relative; padding: 52px 24px 40px; border-radius: 28px; text-align: center; overflow: hidden;
  background: radial-gradient(120% 140% at 50% -20%, rgba(240, 184, 74, 0.16), transparent 55%), linear-gradient(180deg, #17213d, #0f1830);
  border: 1px solid rgba(240, 184, 74, 0.18); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8); }
.kb-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.kb-hero > * { position: relative; }
.kb-hero-ic { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: linear-gradient(135deg, #f7d488, #f0b84a 55%, #d99a2b); color: #121b33; box-shadow: 0 12px 30px -10px rgba(240, 184, 74, 0.7); }
.kb-hero-ic svg { width: 26px; height: 26px; }
.kb-hero-k { margin: 18px 0 0; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.kb-hero h1 { margin: 6px 0 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fff 0%, #fff 30%, #f7d488 60%, #f0b84a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kb-hero-s { max-width: 560px; margin: 14px auto 0; color: #c3cbe0; font-size: 17px; line-height: 1.55; }
.kb-search { position: relative; display: flex; align-items: center; gap: 10px; max-width: 620px; margin: 26px auto 0; padding: 0 16px; height: 58px; border-radius: 16px;
  background: #fff; color: #121b33; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.8); cursor: text; }
.kb-search svg { width: 20px; height: 20px; flex: none; color: #6b7488; }
.kb-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: inherit; font: inherit; font-size: 16px; }
.kb-search kbd { flex: none; padding: 2px 8px; border-radius: 6px; border: 1px solid #d8dde8; color: #6b7488; font: 12px/1.4 inherit; }
.kb-results { display: grid; gap: 6px; max-width: 620px; margin: 10px auto 0; text-align: left; }
.kb-results a { display: grid; gap: 2px; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); }
.kb-results a:hover, .kb-results a:focus-visible { border-color: rgba(240, 184, 74, 0.5); background: rgba(240, 184, 74, 0.08); }
.kb-results b { color: #fff; font-weight: 600; }
.kb-results small { color: var(--muted); font-size: 13px; }
.kb-results em { font-style: normal; color: var(--gold); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.kb-none { margin: 14px auto 0; color: var(--muted); font-size: 14px; }
.kb-none a { color: var(--gold); }

/* ---------- Section heads ---------- */
.kb-sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.kb-sec-h h2, .kb-cats h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; letter-spacing: -0.02em; color: #fff; }
.kb-sec-h p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.kb-sec-h > a { flex: none; color: var(--gold); font-size: 14px; font-weight: 600; }
.kb-sec-h h2 i { font-style: normal; padding: 2px 9px; border-radius: 999px; background: rgba(var(--c, 240, 184, 74), 0.16); color: rgb(var(--c, 240, 184, 74)); font-size: 12.5px; font-weight: 700; }
.kb-star { width: 20px; height: 20px; color: var(--gold); }
.kb-start, .kb-cats, .kb-recs, .kb-catsec, .kb-more { margin-top: 56px; }

/* ---------- Start here ---------- */
.kb-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.kb-steps a { position: relative; display: grid; align-content: start; gap: 6px; height: 100%; min-height: 150px; padding: 20px 18px 44px; border-radius: 18px;
  background: var(--surface-2, #1d2845); border: 1px solid rgba(255, 255, 255, 0.07); transition: border-color 0.15s, transform 0.15s; }
.kb-steps a:hover { border-color: rgba(240, 184, 74, 0.45); transform: translateY(-2px); }
.kb-step-n { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 8px; border-radius: 50%; background: linear-gradient(135deg, #f7d488, #f0b84a); color: #121b33; font-weight: 800; font-size: 14px; }
.kb-steps b { color: #fff; font-size: 16px; }
.kb-steps small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.kb-step-go { position: absolute; left: 18px; bottom: 16px; width: 18px; height: 18px; color: var(--muted); }
.kb-steps a:hover .kb-step-go { color: var(--gold); }

/* ---------- Category chips ---------- */
.kb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.kb-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: var(--surface-2, #1d2845); color: #dfe5f2; font-size: 14px; font-weight: 500; }
.kb-chip i { font-style: normal; color: rgb(var(--c)); font-size: 12.5px; font-weight: 700; }
.kb-chip:hover { border-color: rgba(var(--c), 0.6); background: rgba(var(--c), 0.1); }

/* ---------- Cards + banners ---------- */
.kb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.kb-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 18px; background: var(--surface-2, #1d2845); border: 1px solid rgba(255, 255, 255, 0.07); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.kb-card:hover { transform: translateY(-3px); border-color: rgba(240, 184, 74, 0.4); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9); }
.kb-card-b { display: grid; align-content: space-between; gap: 12px; padding: 16px 18px 18px; }
.kb-card-b b { color: #fff; font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.kb-rec { justify-self: start; padding: 3px 9px; border-radius: 7px; background: rgba(240, 184, 74, 0.14); color: var(--gold); font-size: 12px; font-style: normal; font-weight: 600; }
.kb-ban { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 2 / 1; overflow: hidden;
  background: radial-gradient(60% 90% at 50% 50%, rgba(var(--c), 0.55), transparent 70%), linear-gradient(180deg, #111a33, #0b1226); }
.kb-ban::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1.4px), radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1.4px);
  background-size: 140px 90px, 90px 130px; background-position: 20px 14px, 60px 50px; opacity: 0.5; }
.kb-ban-ic { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 15px; background: #fff; color: rgb(var(--c)); box-shadow: 0 0 34px rgba(var(--c), 0.55); }
.kb-ban-ic svg { width: 27px; height: 27px; }
.kb-ban-l { position: relative; padding: 8px 13px; border-radius: 10px; background: rgba(10, 14, 28, 0.85); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.kb-ban-lg { aspect-ratio: auto; height: 220px; border-radius: 24px; margin-top: 18px; }
.kb-ban-lg .kb-ban-ic { width: 76px; height: 76px; border-radius: 20px; }
.kb-ban-lg .kb-ban-ic svg { width: 36px; height: 36px; }
.kb-ban-lg .kb-ban-l { padding: 11px 18px; font-size: 22px; border-radius: 13px; }
.kb-catsec .kb-cat-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(var(--c), 0.16); color: rgb(var(--c)); }
.kb-catsec .kb-cat-ic svg { width: 18px; height: 18px; }
.kb-catsec { scroll-margin-top: 96px; }

/* ---------- Article ---------- */
.kb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--muted); }
.kb-crumbs a { color: var(--muted); }
.kb-crumbs a:hover { color: var(--gold); }
.kb-art { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 56px; margin-top: 34px; }
.kb-main h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; color: #fff; }
.kb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.kb-tag { padding: 3px 10px; border-radius: 7px; background: rgba(var(--c), 0.16); color: rgb(var(--c)); font-size: 12.5px; font-weight: 600; filter: brightness(1.35); }
.kb-tag-rec { --c: 240, 184, 74; filter: none; }
.kb-lead { margin: 22px 0 0; font-size: 19px; line-height: 1.6; color: #dfe5f2; }
.kb-body { margin-top: 10px; font-size: 17px; line-height: 1.72; color: #d0d8e8; }
.kb-body section { scroll-margin-top: 96px; }
.kb-body h2 { margin: 42px 0 12px; font-size: 24px; letter-spacing: -0.02em; color: #fff; }
.kb-body h3 { margin: 26px 0 8px; font-size: 18.5px; color: #fff; }
.kb-body p { margin: 0 0 14px; }
.kb-body ul, .kb-body ol { margin: 0 0 16px; padding-left: 22px; }
.kb-body li { margin: 6px 0; }
.kb-body li::marker { color: var(--gold); font-weight: 700; }
.kb-body strong, .kb-body b { color: #fff; }
.kb-body a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(240, 184, 74, 0.4); text-underline-offset: 3px; }
.kb-body .kb-note { margin: 18px 0; padding: 14px 18px; border-radius: 14px; background: rgba(240, 184, 74, 0.08); border: 1px solid rgba(240, 184, 74, 0.25); }
.kb-body .kb-note p:last-child { margin: 0; }
.kb-faq details { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.kb-faq summary { padding: 16px 0; color: #fff; font-weight: 600; cursor: pointer; }
.kb-faq details p { margin: 0 0 16px; }
.kb-toc { position: sticky; top: 100px; align-self: start; padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.kb-toc p { margin: 0 0 10px; color: #fff; font-size: 14px; font-weight: 600; }
.kb-toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.kb-toc a { position: relative; display: block; padding: 6px 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.kb-toc a:hover { color: #fff; }
.kb-toc a.is-on { color: var(--gold); }
.kb-toc a.is-on::before { content: ""; position: absolute; left: -19px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--gold); }
.kb-try, .kb-stuck { display: flex; align-items: center; gap: 16px; margin-top: 40px; padding: 20px 22px; border-radius: 18px; }
.kb-try { background: linear-gradient(135deg, rgba(240, 184, 74, 0.14), rgba(240, 184, 74, 0.03)); border: 1px solid rgba(240, 184, 74, 0.3); }
.kb-stuck { margin-top: 16px; background: var(--surface-2, #1d2845); border: 1px solid rgba(255, 255, 255, 0.08); }
.kb-try > div, .kb-stuck > div { flex: 1; min-width: 0; }
.kb-try b, .kb-stuck b { color: #fff; font-size: 16px; }
.kb-try p, .kb-stuck p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.kb-try .btn, .kb-stuck .btn { flex: none; }
.kb-stuck-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(240, 184, 74, 0.14); color: var(--gold); }
.kb-stuck-ic svg { width: 21px; height: 21px; }
.kb-more { padding-top: 40px; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* ---------- Light theme ---------- */
:root[data-theme="light"] .kb-sec-h h2, :root[data-theme="light"] .kb-cats h2, :root[data-theme="light"] .kb-steps b, :root[data-theme="light"] .kb-card-b b,
:root[data-theme="light"] .kb-main h1, :root[data-theme="light"] .kb-body h2, :root[data-theme="light"] .kb-body h3, :root[data-theme="light"] .kb-body strong,
:root[data-theme="light"] .kb-body b, :root[data-theme="light"] .kb-faq summary, :root[data-theme="light"] .kb-toc p, :root[data-theme="light"] .kb-try b,
:root[data-theme="light"] .kb-stuck b, :root[data-theme="light"] .kb-toc a:hover { color: #121b33; }
:root[data-theme="light"] .kb-lead, :root[data-theme="light"] .kb-body { color: #2b3550; }
:root[data-theme="light"] .kb-steps a, :root[data-theme="light"] .kb-card, :root[data-theme="light"] .kb-chip, :root[data-theme="light"] .kb-stuck { background: #fff; border-color: rgba(18, 27, 51, 0.09); }
:root[data-theme="light"] .kb-chip { color: #2b3550; }
:root[data-theme="light"] .kb-toc { border-color: rgba(18, 27, 51, 0.12); }
:root[data-theme="light"] .kb-faq details, :root[data-theme="light"] .kb-more { border-color: rgba(18, 27, 51, 0.1); }

/* ---------- Tablets and phones ---------- */
@media (max-width: 980px) {
  .kb-art { grid-template-columns: minmax(0, 1fr); }
  .kb-toc { display: none; }
  .kb-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .kb { padding-top: 84px; }
  .kb-hero { padding: 40px 16px 28px; border-radius: 22px; }
  .kb-search kbd { display: none; }
  .kb-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .kb-steps a { min-height: 0; padding: 16px 48px 16px 16px; grid-template-columns: auto 1fr; column-gap: 12px; }
  .kb-step-n { grid-row: span 2; margin: 0; }
  .kb-step-go { left: auto; right: 16px; top: 50%; bottom: auto; transform: translateY(-50%); }
  .kb-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .kb-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .kb-chip { flex: none; }
  .kb-ban-lg { height: 160px; border-radius: 18px; }
  .kb-ban-lg .kb-ban-ic { width: 56px; height: 56px; }
  .kb-ban-lg .kb-ban-l { font-size: 17px; }
  .kb-body { font-size: 16.5px; }
  .kb-try, .kb-stuck { flex-direction: column; align-items: stretch; text-align: left; }
  .kb-stuck-ic { display: none; }
  .kb-sec-h { flex-direction: column; align-items: flex-start; }
}

/* ---------- Next step ---------- */
.kb-next { display: flex; align-items: center; gap: 16px; margin-top: 44px; padding: 18px 20px; border-radius: 18px; background: linear-gradient(135deg, rgba(var(--c), 0.18), rgba(var(--c), 0.04)); border: 1px solid rgba(var(--c), 0.4); transition: transform 0.15s; }
.kb-next:hover { transform: translateY(-2px); }
.kb-next-ic { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 13px; background: #fff; color: rgb(var(--c)); }
.kb-next-ic svg { width: 22px; height: 22px; }
.kb-next > span:nth-child(2) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.kb-next em { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(var(--c)); filter: brightness(1.4); }
.kb-next b { color: #fff; font-size: 17px; }
.kb-next-go { flex: none; width: 22px; height: 22px; color: #fff; }
:root[data-theme="light"] .kb-next b, :root[data-theme="light"] .kb-next-go { color: #121b33; }

/* ---------- Tables (plan comparison) ---------- */
.kb-body table { width: 100%; margin: 8px 0 20px; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.kb-body th, .kb-body td { padding: 11px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.kb-body th { color: #fff; font-weight: 600; background: rgba(240, 184, 74, 0.08); white-space: nowrap; }
:root[data-theme="light"] .kb-body th { color: #121b33; }
:root[data-theme="light"] .kb-body th, :root[data-theme="light"] .kb-body td { border-color: rgba(18, 27, 51, 0.1); }
.kb-results small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Product screenshots ---------- */
.kb-shot { margin: 22px 0 26px; }
.kb-shot img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9); background: #0e1730; }
.kb-shot figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.5; text-align: center; }
:root[data-theme="light"] .kb-shot img { border-color: rgba(18, 27, 51, 0.12); }
