/* The guide (/docs, src/docs.js). Loaded after style.css.
 * Liquid glass: frosted (backdrop-filter) only on the sidebar panel, the
 * search results, callouts and pager cards. Everything else is a flat tint,
 * so long pages stay cheap to scroll. */
/* ---- docs (/docs, src/docs.js) ---- */
.docs .wrap.wide { max-width: 1240px; }
.docs .brand .crumb { font-style: normal; color: var(--muted); font-weight: 600; margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line); }
.docs-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 48px; padding-top: 32px; padding-bottom: 80px; }
.docs-main { min-width: 0; }

/* Sidebar: a sticky frosted panel holding the search and the contents. */
.docs-side {
  position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 104px); overflow-y: auto; overflow-x: hidden;
  padding: 16px 12px 18px; border-radius: var(--radius); border: 1px solid var(--glass-border);
  background: var(--glass); box-shadow: var(--glass-highlight), var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent;
}

/* Search: a glass field with a solid cyan focus ring. */
.docs-search { position: relative; margin-bottom: 18px; }
.docs-search input {
  width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.docs-search input::placeholder { color: var(--muted); opacity: 1; }
.docs-search input:hover { border-color: var(--glass-border-strong); }
.docs-search input:focus {
  outline: 2px solid var(--cyan); outline-offset: 2px; border-color: var(--cyan); background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* Results: readable over anything (--glass-strong), frosted, hover = glass pill. */
.docs-results {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border-strong); border-radius: 14px; padding: 6px;
  box-shadow: var(--glass-highlight), 0 18px 50px rgba(0, 0, 0, .6); max-height: 70vh; overflow-y: auto;
}
.docs-results a {
  display: block; padding: 10px 12px; border-radius: 10px; color: var(--text);
  border: 1px solid transparent; transition: background .15s ease, border-color .15s ease;
}
.docs-results a:hover { background: var(--glass-2); border-color: var(--glass-border); text-decoration: none; }
.docs-results b { display: block; font-size: 15px; }
.docs-results small { display: block; color: var(--cyan); font-size: 12.5px; margin: 1px 0 3px; }
.docs-results span { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.docs-results mark {
  background: var(--hazard); color: #1a1206; border-radius: 4px; padding: 0 3px;
}
.docs-results .none { margin: 10px 12px; color: var(--muted); font-size: 14px; }

/* Contents. */
.docs-side details.toc { background: none; border: 0; padding: 0; margin: 0; }
.docs-side details.toc summary { display: none; }
.toc-chapter { margin-bottom: 18px; }
.toc-title { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px 10px; }
.toc-chapter a {
  position: relative; display: block; padding: 6px 10px 6px 12px; border-radius: 10px; border: 1px solid transparent;
  color: #d9d4e6; font-size: 14.5px; line-height: 1.35; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.toc-chapter a:hover { background: var(--glass); border-color: var(--glass-border); text-decoration: none; color: var(--text); }
/* The current page: a solid tinted pill with a solid rust bar on its left edge. */
.toc-chapter a.current {
  color: var(--text); font-weight: 700;
  background: rgba(255, 106, 43, .16);
  border-color: rgba(255, 106, 43, .38);
  box-shadow: var(--glass-highlight);
}
.toc-chapter a.current::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--rust);
}

/* Article. */
.docs-crumb { color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.docs-article { max-width: 780px; min-width: 0; overflow-wrap: break-word; }
.docs-article h1 {
  font-size: clamp(30px, 4vw, 40px); line-height: 1.15; margin: 0 0 18px; letter-spacing: -.01em;
  color: var(--text); padding-bottom: 4px;
}
.docs-article h2 { font-size: 24px; margin: 44px 0 12px; letter-spacing: -.005em; }
/* A subtle glass divider above each section, instead of a hard rule. */
.docs-article h2::before {
  content: ""; display: block; height: 1px; margin-bottom: 20px;
  background: var(--glass-border);
}
.docs-article h3 { font-size: 18.5px; margin: 28px 0 8px; color: var(--text); }
.docs-article h2 a.anchor, .docs-article h3 a.anchor { color: inherit; }
.docs-article h2 a.anchor:hover::after, .docs-article h3 a.anchor:hover::after { content: " #"; color: var(--muted); }
.docs-article h2, .docs-article h3 { scroll-margin-top: 84px; }
.docs-article p, .docs-article li { color: #d9d4e6; }
.docs-article a:not(.anchor) { color: var(--cyan); text-decoration: underline; text-decoration-color: rgba(56, 225, 255, .35); text-underline-offset: 3px; }
.docs-article a:not(.anchor):hover { text-decoration-color: var(--cyan); }
.docs-article ul, .docs-article ol { padding-left: 24px; }
.docs-article li { margin: 6px 0; }
.docs-article ul li::marker { color: var(--pink); }
.docs-article ol li::marker { color: var(--rust-2); font-weight: 800; }

/* Code: inline as small glass chips, blocks as darker glass. */
.docs-article code {
  white-space: normal; color: #ffd6bd; background: rgba(255, 255, 255, .07);
  border: 1px solid var(--glass-border); padding: 1px 6px; border-radius: 6px;
}
.docs-article pre {
  background: rgba(5, 4, 10, .6); border: 1px solid var(--glass-border); border-radius: 14px;
  padding: 16px 18px; overflow-x: auto; box-shadow: var(--glass-highlight);
}
.docs-article pre code { background: none; border: 0; padding: 0; color: #f6d3b8; white-space: pre; font-weight: 500; font-size: 14px; line-height: 1.6; }

/* Tables: one glass container, a tinted header, hairline row dividers. */
.docs-article .table {
  overflow-x: auto; margin: 18px 0; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 14px; box-shadow: var(--glass-highlight);
}
.docs-article table { border-collapse: collapse; width: 100%; font-size: 15px; }
.docs-article th, .docs-article td { border: 0; padding: 10px 14px; text-align: left; vertical-align: top; }
.docs-article th {
  color: var(--text); font-weight: 700;
  background: rgba(255, 106, 43, .12);
  border-bottom: 1px solid rgba(255, 106, 43, .35);
}
.docs-article td { color: #d9d4e6; }
.docs-article tbody tr + tr td { border-top: 1px solid rgba(255, 255, 255, .08); }

/* Callouts: glass cards with a solid coloured edge. --accent sets the colour. */
.docs-lang-note {
  margin: 0 0 18px; padding: 10px 14px; font-size: 14px; color: var(--muted);
  background: var(--glass); border: 1px solid var(--glass-border); border-left: 4px solid var(--cyan);
  border-radius: var(--radius-sm);
}
.docs-lang-note a { font-weight: 600; }

.callout {
  --accent: var(--muted);
  position: relative; margin: 20px 0; padding: 14px 18px; color: #e4e0ee;
  background: var(--glass);
  border: 1px solid var(--glass-border); border-left: 4px solid var(--accent); border-radius: var(--radius-sm);
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.callout b:first-child { color: var(--accent); margin-right: 4px; }
.callout.tip { --accent: var(--green); background: rgba(62, 224, 122, .10); }
.callout.note { --accent: var(--violet); background: rgba(167, 139, 250, .12); }
.callout.warn { --accent: var(--hazard); background: rgba(255, 194, 51, .10); }
.callout.premium {
  --accent: var(--rust); border-left-color: transparent;
  background: rgba(255, 106, 43, .12);
  box-shadow: var(--glass-highlight), var(--glass-shadow);
}
.callout.premium::before {
  content: ""; position: absolute; left: -4px; top: -1px; bottom: -1px; width: 4px;
  border-radius: 12px 0 0 12px; background: var(--rust);
}

/* "On this page" jump links: a row of glass pills. */
.on-page {
  display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; background: var(--glass);
  border: 1px solid var(--glass-border); border-radius: 14px; padding: 12px 14px; margin: 0 0 26px;
  font-size: 14.5px; box-shadow: var(--glass-highlight);
}
.on-page b { color: var(--muted); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; margin-right: 4px; }
.docs-article .on-page a {
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, .05);
  color: var(--text); text-decoration: none; font-size: 13.5px; transition: background .15s ease, border-color .15s ease;
}
.docs-article .on-page a:hover { background: rgba(56, 225, 255, .10); border-color: rgba(56, 225, 255, .55); text-decoration: none; }

/* Pager: two glass cards that lift and pick up the brand colour on hover. */
.docs-pager { display: flex; gap: 14px; justify-content: space-between; max-width: 780px; margin-top: 48px; }
.docs-pager a {
  position: relative; flex: 1; max-width: 48%; overflow: hidden; background: var(--glass);
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 16px 18px;
  color: var(--text); font-weight: 700; box-shadow: var(--glass-highlight), 0 10px 30px rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.docs-pager a::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--rust);
  opacity: .35; transition: opacity .18s ease;
}
.docs-pager a:hover {
  transform: translateY(-3px); border-color: rgba(255, 106, 43, .55); text-decoration: none;
  box-shadow: var(--glass-highlight), var(--glass-shadow);
}
.docs-pager a:hover::before { opacity: 1; }
.docs-pager a.next { text-align: right; margin-left: auto; }
.docs-pager small { display: block; color: var(--violet); font-weight: 700; font-size: 12.5px; letter-spacing: .04em; }
.docs-help { max-width: 780px; color: var(--muted); font-size: 14.5px; margin-top: 28px; }

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 20px; }
  /* On phones the sidebar is not a panel; only the contents drop-down is a card. */
  .docs-side {
    position: static; max-height: none; overflow: visible; padding: 0; border: 0; background: none;
    box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .docs-side details.toc {
    background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 0 16px;
    box-shadow: var(--glass-highlight), var(--glass-shadow);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  }
  .docs-side details.toc summary { display: flex; }
  .docs .brand .crumb { display: none; }
  .docs-pager { flex-direction: column; }
  .docs-pager a { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .docs-pager a:hover { transform: none; }
}

/* Figures: screenshots with a glass rim and a soft shadow. */
.docs-article figure { margin: 22px 0; }
.docs-article figure img {
  max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), 0 14px 40px rgba(0, 0, 0, .45);
}
.docs-article figcaption { color: var(--muted); font-size: 13.5px; margin-top: 10px; text-align: center; }

/* Generated previews (src/docs-previews.js): the paid setups' price list, modes and kill feed colours. */
.pv { margin: 18px 0; }
.pv .pv-lead, .pv .pv-legend { color: var(--muted); font-size: 14px; margin: 8px 0; }
.pv .pv-legend span { font-weight: 700; }
.pv-cat { margin: 10px 0; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 14px; box-shadow: var(--glass-highlight); }
.pv-cat > summary { cursor: pointer; padding: 11px 16px; font-weight: 700; color: var(--text); list-style-position: inside; }
.pv-cat > summary:hover { color: var(--rust-2); }
.pv-cat[open] > summary { border-bottom: 1px solid var(--glass-border); }
.pv-cat .table { margin: 0; border: 0; border-radius: 0 0 14px 14px; box-shadow: none; background: none; }
.docs-article .pv th.num, .docs-article .pv td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-prices td { vertical-align: middle; }
.pv-item { display: flex; align-items: center; gap: 10px; }
.pv-item > span:last-child { min-width: 0; }
.pv-item img, .pv-noicon { width: 30px; height: 30px; object-fit: contain; flex: none; }
.pv-cd { display: block; color: var(--hazard); font-size: 12px; font-weight: 600; }
.pv-amt { display: none; color: var(--muted); font-size: 12px; }
.pv-on { color: var(--green); font-weight: 700; }
.pv-off { color: var(--red); font-weight: 700; }
.pv-same { color: var(--muted); }
.docs-article .pv-modes td small { color: var(--muted); font-size: 13px; }
.pv-theme { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 12px; margin: 8px 0; }
.pv-theme b { color: var(--text); font-size: 14px; }
.pv-chat {
  padding: 9px 14px; border-radius: 12px; background: rgba(0, 0, 0, .45);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-highlight);
  font-size: 15px; text-shadow: 0 1px 2px #000; overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .pv-theme { grid-template-columns: 1fr; gap: 4px; }
  .docs-article .pv th, .docs-article .pv td { padding: 8px 9px; }
  .docs-article .pv-prices { font-size: 13px; }
  .docs-article .pv-prices th, .docs-article .pv-prices td { padding: 7px 6px; }
  .pv-item img, .pv-noicon { width: 20px; height: 20px; }
  .pv-item { gap: 7px; }
  .docs-article .pv .pv-amtcol { display: none; }
  .pv-amt { display: block; }
}
