/*
 * Documentation skins for the site styles other than Professional.
 *
 * Docs wear the style the team configured in content/site.json (<html data-site-theme>), like
 * leapterm.com. themes.css (generated) supplies each style's colours, fonts and radii; this file
 * adds each style's signature details to the docs chrome, the landing page and articles, kept
 * quieter than the marketing page so long guides stay easy to read. Every rule is scoped to a
 * non-Professional style, so Professional docs keep the original look exactly.
 */

/* ---- Shared by every non-Professional style ------------------------------------------ */
:root:is([data-site-theme="live-wire"], [data-site-theme="pop-shell"], [data-site-theme="blueprint"])
  :is(.article-header h1, .prose h2, .prose h3, .guide-card h2, .search-top h2, .docs-header .brand-logo span,
      .docs-wordmark, .docs-hero h1, .topic-card h2, .docs-start h2) {
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  letter-spacing: var(--font-display-tracking);
}
:root:is([data-site-theme="live-wire"], [data-site-theme="pop-shell"], [data-site-theme="blueprint"]) .docs-toc a {
  color: var(--text-secondary);
}
:root:is([data-site-theme="live-wire"], [data-site-theme="pop-shell"], [data-site-theme="blueprint"]) .docs-toc a:hover {
  color: var(--text-primary);
}
@media (max-width: 800px) {
  :root:is([data-site-theme="live-wire"], [data-site-theme="pop-shell"], [data-site-theme="blueprint"]) .docs-top-nav {
    border-top-color: color-mix(in srgb, var(--border-color) 70%, transparent);
  }
}

/* ---- Live Wire: mint, cyan and violet; a wire under the header; soft glows ------------- */
:root[data-site-theme="live-wire"] {
  --lw-violet: #a898ff;
  --lw-wire: linear-gradient(90deg, transparent, var(--accent), var(--highlight), var(--lw-violet), transparent);
  --lw-edge: linear-gradient(135deg, var(--accent), var(--highlight), var(--lw-violet));
  --lw-tint: color-mix(in srgb, var(--accent) 9%, transparent);
}
@media (prefers-color-scheme: light) {
  :root[data-site-theme="live-wire"]:not([data-theme="dark"]) { --lw-violet: #5b47e0; }
}
:root[data-site-theme="live-wire"][data-theme="light"] { --lw-violet: #5b47e0; }

/* A faint glow at the top of every page, like the homepage hero. */
:root[data-site-theme="live-wire"] .docs-body {
  background-image:
    radial-gradient(42rem 22rem at 12% -6rem, var(--glow-1), transparent 70%),
    radial-gradient(38rem 20rem at 88% -8rem, var(--glow-2), transparent 70%);
  background-repeat: no-repeat;
  background-size: 100% 34rem;
}
:root[data-site-theme="live-wire"] .site-header {
  border-bottom-color: transparent;
  background: color-mix(in srgb, var(--bg-primary) 74%, transparent);
}
:root[data-site-theme="live-wire"] .site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  pointer-events: none;
  background: var(--lw-wire) no-repeat 50% 0 / 36% 100%, color-mix(in srgb, var(--border-color) 80%, transparent);
}
:root[data-site-theme="live-wire"] .docs-header .brand-logo span { font-weight: 700; }
:root[data-site-theme="live-wire"] .docs-top-nav a { transition: color .2s; }
:root[data-site-theme="live-wire"] .docs-search-trigger {
  border-radius: var(--radius-md);
  transition: border-color .2s, box-shadow .2s;
}
:root[data-site-theme="live-wire"] .docs-search-trigger:hover {
  border-color: color-mix(in srgb, var(--accent-text) 55%, transparent);
  box-shadow: 0 0 0 4px var(--lw-tint);
}

/* Eyebrows become the homepage's pill labels. */
:root[data-site-theme="live-wire"] .eyebrow {
  display: inline-flex;
  align-items: center;
  padding: .42rem .75rem .42rem 1.5rem;
  border: 1px solid color-mix(in srgb, var(--accent-text) 30%, transparent);
  border-radius: 999px;
  background:
    radial-gradient(circle at .8rem 50%, var(--accent-text) 3px, transparent 3.5px),
    color-mix(in srgb, var(--accent-text) 5%, transparent);
  color: var(--accent-text);
  font: 600 .68rem/1 var(--font-mono);
  letter-spacing: .14em;
}

/* Sidebar: the current guide gets the accent edge and tint. */
:root[data-site-theme="live-wire"] .nav-group h2 { font-family: var(--font-mono); font-weight: 500; letter-spacing: .12em; }
:root[data-site-theme="live-wire"] .nav-group a { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; transition: background-color .15s, color .15s; }
:root[data-site-theme="live-wire"] .nav-group a[aria-current] {
  border-left-color: var(--accent-text);
  background: var(--lw-tint);
  color: var(--text-primary);
}
:root[data-site-theme="live-wire"] .docs-toc { border-left-color: color-mix(in srgb, var(--border-color) 80%, transparent); }

/* Cards and pagination: the gradient edge on hover. */
:root[data-site-theme="live-wire"] :is(.guide-card, .topic-card, .article-pagination a) {
  border-radius: var(--radius-lg);
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease, border-color .2s ease;
}
:root[data-site-theme="live-wire"] :is(.guide-card, .topic-card, .article-pagination a):hover {
  border-color: transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box, var(--lw-edge) border-box;
  box-shadow: 0 22px 46px -30px color-mix(in srgb, var(--accent) 70%, transparent);
  transform: translateY(-2px);
}
:root[data-site-theme="live-wire"] .card-kicker { color: var(--accent-text); font-family: var(--font-mono); }
:root[data-site-theme="live-wire"] :is(.guide-card h2 span, .article-pagination strong span) { color: var(--accent-text); }

/* Article details. */
:root[data-site-theme="live-wire"] .prose a { text-decoration-color: color-mix(in srgb, var(--accent-text) 45%, transparent); }
:root[data-site-theme="live-wire"] .prose li::marker { color: var(--accent-text); }
:root[data-site-theme="live-wire"] .prose code {
  border-color: color-mix(in srgb, var(--accent-text) 22%, var(--border-color));
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-card));
}
:root[data-site-theme="live-wire"] .prose pre {
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 35%, transparent);
}
:root[data-site-theme="live-wire"] .prose pre code { background: transparent; }
:root[data-site-theme="live-wire"] .prose blockquote {
  border-left: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--lw-edge) left / 3px 100% no-repeat, color-mix(in srgb, var(--accent) 6%, transparent);
}
:root[data-site-theme="live-wire"] .prose th { background: color-mix(in srgb, var(--accent) 7%, var(--bg-card)); }
:root[data-site-theme="live-wire"] :is(.table-scroll, .prose-image-trigger) { border-radius: var(--radius-md); }
:root[data-site-theme="live-wire"] .prose-image-trigger:hover,
:root[data-site-theme="live-wire"] .prose-image-trigger:focus-visible {
  border-color: color-mix(in srgb, var(--accent-text) 55%, transparent);
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--accent) 60%, transparent);
}
:root[data-site-theme="live-wire"] :is(.search-dialog, .image-dialog) { border-radius: var(--radius-xl); }
:root[data-site-theme="live-wire"] .search-dialog { box-shadow: 0 30px 100px #0009, 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); }
:root[data-site-theme="live-wire"] .docs-footer { position: relative; border-top-color: transparent; }
:root[data-site-theme="live-wire"] .docs-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  pointer-events: none;
  background: var(--lw-wire) no-repeat 0 0 / 60% 100%, color-mix(in srgb, var(--border-color) 80%, transparent);
}

/* ---- Pop Shell: ink outlines, hard offset shadows and colourful stickers ---------------- */
:root[data-site-theme="pop-shell"] {
  --ps-line: var(--border-width) solid var(--border-hover);
  --ps-hop: cubic-bezier(.34, 1.56, .64, 1);
  --ps-peach: #ff9a6b;
  --ps-lilac: #c4b5fd;
  --ps-mint: #86efac;
  --ps-pink: #ff8fb8;
  --ps-yellow: #ffd45c;
  --ps-sky: #7dd3fc;
}
:root[data-site-theme="pop-shell"] .site-header { border-bottom: var(--ps-line); }
:root[data-site-theme="pop-shell"] .docs-wordmark { border-left: var(--ps-line); }
:root[data-site-theme="pop-shell"] .docs-search-trigger {
  border: var(--ps-line);
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0 var(--shadow-color);
}
:root[data-site-theme="pop-shell"] .eyebrow { color: var(--accent-text); font: 600 .74rem/1 var(--font-mono); letter-spacing: .14em; }
:root[data-site-theme="pop-shell"] .nav-group a[aria-current] {
  border-left: 0;
  border-radius: 999px;
  background: var(--ps-yellow);
  color: var(--accent-ink);
  font-weight: 600;
}
:root[data-site-theme="pop-shell"] :is(.guide-card, .topic-card, .article-pagination a) {
  border: var(--ps-line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: 4px 4px 0 var(--shadow-color);
  transition: transform .4s var(--ps-hop), box-shadow .4s var(--ps-hop);
}
:root[data-site-theme="pop-shell"] :is(.guide-card, .topic-card, .article-pagination a):hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
  box-shadow: 7px 7px 0 var(--shadow-color);
  transform: translate(-3px, -3px);
}
:root[data-site-theme="pop-shell"] .card-kicker { color: var(--accent-text); font-family: var(--font-mono); font-weight: 600; }
:root[data-site-theme="pop-shell"] :is(.guide-card h2 span, .article-pagination strong span) { color: var(--accent-text); }
:root[data-site-theme="pop-shell"] .prose code { border: 1.5px solid var(--border-hover); }
:root[data-site-theme="pop-shell"] .prose pre { border: var(--ps-line); border-radius: var(--radius-md); box-shadow: 4px 4px 0 var(--shadow-color); }
:root[data-site-theme="pop-shell"] .prose pre code { border: 0; }
:root[data-site-theme="pop-shell"] .prose blockquote { border-left: 4px solid var(--accent); }
:root[data-site-theme="pop-shell"] :is(.table-scroll, .prose-image-trigger) { border: var(--ps-line); border-radius: var(--radius-md); }
:root[data-site-theme="pop-shell"] :is(.search-dialog, .image-dialog) { border: var(--ps-line); box-shadow: 8px 8px 0 var(--shadow-color); }
:root[data-site-theme="pop-shell"] .docs-footer { border-top: var(--ps-line); }

/* ---- Blueprint: graph paper, mono labels, rules and crosshair marks --------------------- */
:root[data-site-theme="blueprint"] { --bp-mark: var(--outline); }
:root[data-site-theme="blueprint"] .docs-body {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
:root[data-site-theme="blueprint"] .site-header { border-bottom-color: var(--border-hover); }
:root[data-site-theme="blueprint"] .eyebrow::before { content: "§ "; }
:root[data-site-theme="blueprint"] :is(.eyebrow, .card-kicker, .nav-group h2, .breadcrumbs, .reading-time) {
  font-family: var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
:root[data-site-theme="blueprint"] .eyebrow { color: var(--accent-text); }
:root[data-site-theme="blueprint"] .docs-search-trigger { border-color: var(--border-hover); border-radius: var(--radius-sm); }
:root[data-site-theme="blueprint"] .nav-group a { border-radius: 0; }
:root[data-site-theme="blueprint"] .nav-group a[aria-current] {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
:root[data-site-theme="blueprint"] :is(.guide-card, .topic-card, .article-pagination a) {
  position: relative;
  border-color: var(--border-hover);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}
:root[data-site-theme="blueprint"] :is(.guide-card, .topic-card, .article-pagination a):hover { border-color: var(--accent); background: var(--bg-card); }
/* Crosshair corner marks, drawn inside the box so nothing pokes past the page edge. */
:root[data-site-theme="blueprint"] :is(.guide-card, .topic-card)::after {
  content: "";
  position: absolute;
  inset: 3px;
  pointer-events: none;
  background:
    linear-gradient(var(--bp-mark), var(--bp-mark)) 0 0 / 8px 1px,
    linear-gradient(var(--bp-mark), var(--bp-mark)) 0 0 / 1px 8px,
    linear-gradient(var(--bp-mark), var(--bp-mark)) 100% 0 / 8px 1px,
    linear-gradient(var(--bp-mark), var(--bp-mark)) 100% 0 / 1px 8px,
    linear-gradient(var(--bp-mark), var(--bp-mark)) 0 100% / 8px 1px,
    linear-gradient(var(--bp-mark), var(--bp-mark)) 0 100% / 1px 8px,
    linear-gradient(var(--bp-mark), var(--bp-mark)) 100% 100% / 8px 1px,
    linear-gradient(var(--bp-mark), var(--bp-mark)) 100% 100% / 1px 8px;
  background-repeat: no-repeat;
}
:root[data-site-theme="blueprint"] :is(.prose pre, .table-scroll, .prose-image-trigger) { border-color: var(--border-hover); border-radius: var(--radius-sm); }
:root[data-site-theme="blueprint"] .prose code { border-style: dashed; border-radius: 2px; }
:root[data-site-theme="blueprint"] .prose pre code { border: 0; }
:root[data-site-theme="blueprint"] .prose blockquote { border-left-color: var(--accent); border-radius: 0; }
:root[data-site-theme="blueprint"] :is(.search-dialog, .image-dialog) { border-color: var(--border-hover); border-radius: var(--radius-sm); }
:root[data-site-theme="blueprint"] .docs-footer { border-top-color: var(--border-hover); font-family: var(--font-mono); }
