/* ===========================================================================
   Ember Docs — shell styling.
   Evolved from the Fabric Knowledgebase shell: same surface language, with the
   accent generalised to per-site tokens (--accent / --accent-soft / …) supplied
   by the engine-emitted kb/theme.css. The seven accent vars carry the approved
   Ember brand palette as defaults, so a missing kb/theme.css degrades gracefully.
   Self-contained: no CDN fonts or scripts.
   =========================================================================== */

:root {
  /* per-site identity — in production these come from kb/theme.css (site.json).
     Palette composed from the Ember Consult Colour Scheme:
       accent      = Pink (Signature) primary  — interaction
       accent-2    = Purple primary            — gradient partner / brand depth
       accent-mid  = Plum primary              — the bridge (quotes, eyebrows)
     Gradients run pink -> purple, the scheme read left to right. */
  --accent: #d460a0;
  --accent-soft: #df88b8;
  --accent-deep: #c93888;
  --accent-2: #77338c;
  --accent-2-soft: #9741b1;
  --accent-mid: #a14090;
  --accent-mid-soft: #bc58ab;
  --grad: linear-gradient(160deg, var(--accent), var(--accent-2));

  --ok: #4ade80;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --topbar-h: 60px;
  --sidebar-w: 274px;
  --toc-w: 220px;
}

/* Neutrals derive from the scheme's Charcoal ramp (dark) and
   White / Silver / Steel Haze ramps (light). */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414;            /* Charcoal darker */
  --surface: #1e1e1e;       /* derived: Charcoal darker <-> primary */
  --surface-2: #191919;     /* derived */
  --surface-3: #292929;     /* Charcoal primary */
  --code-bg: #101010;       /* derived: below bg */
  --line: rgba(254, 254, 254, 0.09);
  --line-strong: rgba(254, 254, 254, 0.16);
  --text: #f7f7f7;          /* White darker */
  --heading: #fefefe;       /* White lighter */
  --muted: #a3a3a3;         /* derived: Silver darker toward Charcoal */
  --link: var(--accent-soft);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f9f9f9;            /* Silver lighter */
  --surface: #fefefe;       /* White lighter */
  --surface-2: #f7f7f7;     /* White darker */
  --surface-3: #ecf1f6;     /* derived: Steel Haze midpoint */
  --code-bg: #f4f4f4;       /* derived: Silver */
  --line: rgba(20, 20, 20, 0.10);
  --line-strong: rgba(20, 20, 20, 0.18);
  --text: #292929;          /* Charcoal primary */
  --heading: #141414;       /* Charcoal darker */
  --muted: #6b6b6b;         /* derived: Charcoal <-> Silver */
  --link: var(--accent-deep);
  --shadow: 0 20px 48px rgba(20, 20, 20, 0.10);
}

* { box-sizing: border-box; }

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); }

/* ---------- initial loading splash (index.html) ---------- */

.app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 100vh;
  color: var(--muted);
  font-family: var(--sans);
}

/* ---------- flame glyph ---------- */

.app-loading .flame,
.flame {
  width: 12px;
  height: 12px;
  border-radius: 50% 50% 50% 2px;
  background: var(--grad);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent);
  transform: rotate(-45deg);
  flex: none;
}

/* ---------- shell ---------- */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-right { flex: 1; justify-content: flex-end; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.02rem;
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark strong { font-weight: 800; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.hamburger span { display: block; height: 2px; border-radius: 2px; background: var(--text); }

.app-body {
  flex: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
}

/* ---------- sidebar ---------- */

.sidebar {
  position: sticky;
  top: var(--topbar-h);
  align-self: start;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 20px 14px 40px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}

.sidebar-backdrop { display: none; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-loading { color: var(--muted); font-size: 0.88rem; padding: 6px 10px; }
.nav-section { margin-bottom: 16px; }

.nav-section-title {
  display: block;
  padding: 6px 10px;
  color: var(--heading);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
}
.nav-section-title:hover { text-decoration: none; color: var(--accent-soft); }
.nav-section-title.active { color: var(--accent-soft); }

.nav-children { display: flex; flex-direction: column; gap: 1px; }
.nav-group .nav-children { margin-left: 10px; border-left: 1px solid var(--line); padding-left: 6px; }

.nav-link {
  display: block;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  border-radius: 6px;
}
.nav-link:hover { color: var(--text); background: var(--surface-3); text-decoration: none; }
.nav-link.active {
  color: var(--accent-soft);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-weight: 600;
}

.nav-group-head { display: flex; align-items: center; gap: 2px; }
.nav-group-head .nav-link { flex: 1; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 26px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  flex: none;
}
.chevron {
  width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 120ms ease;
}
.chevron.open { transform: rotate(90deg); }

/* ---------- search ---------- */

.search { position: relative; display: flex; align-items: center; width: min(420px, 46vw); }
.search-icon { position: absolute; left: 12px; font-size: 0.82rem; opacity: 0.6; pointer-events: none; }
.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus {
  outline: none;
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 60;
}
.search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
}
.search-result.active { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.search-result-title { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.search-result-crumb { font-size: 0.76rem; color: var(--muted); }
.search-empty { padding: 10px; color: var(--muted); font-size: 0.88rem; }

/* ---------- theme toggle ---------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  flex: none;
}
.theme-toggle:hover { border-color: var(--accent-soft); }

/* ---------- content column + toc rail (rail arrives with Phase 5) ---------- */

.content { min-width: 0; padding: 34px clamp(20px, 4vw, 60px) 80px; }

.doc-loading { color: var(--muted); }

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--toc-w);
  gap: 48px;
  max-width: calc(820px + var(--toc-w) + 48px);
  margin: 0 auto;
}

/* Centres the doc when rendered on its own (no .doc-layout grid yet, Phase 2). */
.doc { max-width: 820px; min-width: 0; margin: 0 auto; }

/* on-page TOC (Phase 5 furniture; styles ship now) */
.toc {
  position: sticky;
  top: calc(var(--topbar-h) + 34px);
  align-self: start;
  max-height: calc(100vh - var(--topbar-h) - 68px);
  overflow-y: auto;
  font-size: 0.84rem;
  padding-left: 2px;
}
.toc-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--heading);
  margin: 0 0 10px;
}
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a {
  display: block;
  padding: 4px 0 4px 14px;
  margin-left: -1px;
  color: var(--muted);
  border-left: 2px solid transparent;
  line-height: 1.45;
}
.toc li a:hover { color: var(--text); text-decoration: none; }
.toc li a.active { color: var(--accent-soft); border-left-color: var(--accent); }
.toc li.toc-h3 a { padding-left: 28px; font-size: 0.8rem; }

.doc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.breadcrumb { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-soft); }
.crumb-sep { opacity: 0.5; }

.edit-link {
  font-size: 0.82rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  white-space: nowrap;
}
.edit-link:hover { color: var(--accent-soft); border-color: var(--accent-soft); text-decoration: none; }

.doc-foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- markdown typography ---------- */

.doc-body { font-size: 1rem; line-height: 1.72; color: var(--text); }

.doc-body h1, .doc-body h2, .doc-body h3, .doc-body h4 {
  color: var(--heading);
  line-height: 1.25;
  font-weight: 800;
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}
.doc-body h1 { font-size: clamp(1.9rem, 3vw, 2.4rem); margin: 0 0 20px; }
.doc-body h2 { font-size: 1.5rem; margin: 40px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc-body h3 { font-size: 1.2rem; margin: 30px 0 10px; }
.doc-body h4 { font-size: 1.02rem; margin: 24px 0 8px; }

.doc-body p { margin: 0 0 16px; }
.doc-body ul, .doc-body ol { margin: 0 0 16px; padding-left: 24px; }
.doc-body li { margin: 4px 0; }
.doc-body li > ul, .doc-body li > ol { margin: 4px 0; }
.doc-body a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.doc-body a:hover { color: var(--accent); }
.doc-body strong { color: var(--heading); font-weight: 700; }
.doc-body hr { border: none; border-top: 1px solid var(--line); margin: 32px 0; }

.doc-body :not(pre) > code {
  font-size: 0.86em;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.12em 0.4em;
  color: var(--accent-soft);
}

.doc-body pre {
  position: relative;
  margin: 0 0 20px;
  padding: 16px 18px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.6;
}
.doc-body pre code { background: none; border: none; padding: 0; color: var(--text); font-size: inherit; white-space: pre; }

.doc-body blockquote {
  margin: 0 0 20px;
  padding: 4px 18px;
  border-left: 3px solid var(--accent-mid);
  background: color-mix(in srgb, var(--accent-mid) 7%, transparent);
  border-radius: 0 8px 8px 0;
  color: var(--text);
}
.doc-body blockquote p:last-child { margin-bottom: 0; }

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}
.doc-body thead th { text-align: left; background: var(--surface-2); color: var(--heading); font-weight: 700; }
.doc-body th, .doc-body td { border: 1px solid var(--line); padding: 8px 12px; vertical-align: top; }
.doc-body tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }

.doc-body img { max-width: 100%; height: auto; border-radius: 8px; }

/* ===========================================================================
   Rich-content components (:::note / :::steps / :::tabs) + copy-code buttons.
   Emitted by the generator; styled here to match the site accent.
   =========================================================================== */

/* ---------- callouts ---------- */

.doc-body .kb-callout {
  --kb-accent: var(--accent);
  --kb-glyph: "\2731";
  margin: 0 0 20px;
  padding: 14px 18px 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--kb-accent);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--kb-accent) 8%, var(--surface));
}
.doc-body .kb-callout-note    { --kb-accent: #4aa3ff; --kb-glyph: "\2139"; }
.doc-body .kb-callout-tip     { --kb-accent: var(--ok); --kb-glyph: "\2726"; }
.doc-body .kb-callout-warning { --kb-accent: #f5a524; --kb-glyph: "\26A0"; }
.doc-body .kb-callout-danger  { --kb-accent: #ff4d5e; --kb-glyph: "\2715"; }

.doc-body .kb-callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--kb-accent);
  margin-bottom: 4px;
}
.doc-body .kb-callout-title::before {
  content: var(--kb-glyph);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  font-size: 0.92em;
  font-weight: 700;
  line-height: 1;
}
.doc-body .kb-callout-body > :first-child { margin-top: 0; }
.doc-body .kb-callout-body > :last-child { margin-bottom: 0; }
.doc-body .kb-callout-body { color: var(--text); }

/* ---------- steps ---------- */

.doc-body .kb-steps { margin: 0 0 24px; padding: 0; counter-reset: kb-step; }

.doc-body .kb-step {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 22px;
}
.doc-body .kb-step::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 34px;
  bottom: -4px;
  width: 2px;
  background: var(--line-strong);
}
.doc-body .kb-step:last-child { padding-bottom: 0; }
.doc-body .kb-step:last-child::before { display: none; }

.doc-body .kb-step-marker {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fefefe;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 3px 14px color-mix(in srgb, var(--accent) 32%, transparent);
}
.doc-body .kb-step-body { min-width: 0; padding-top: 2px; }
.doc-body .kb-step-body > :first-child { margin-top: 0; }
.doc-body .kb-step-body > :last-child { margin-bottom: 0; }
.doc-body .kb-step-body h2,
.doc-body .kb-step-body h3 { margin: 0 0 10px; padding: 0; border: none; font-size: 1.15rem; }

/* ---------- tabs ---------- */

.doc-body .kb-tabs { margin: 0 0 22px; }
.doc-body .kb-tab-list { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.doc-body .kb-tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 9px 14px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.doc-body .kb-tab:hover { color: var(--text); }
.doc-body .kb-tab.active { color: var(--accent-soft); border-bottom-color: var(--accent); }
.doc-body .kb-tab:focus-visible {
  outline: none;
  color: var(--text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 6px 6px 0 0;
}
.doc-body .kb-tab-panel { display: none; padding-top: 16px; }
.doc-body .kb-tab-panel.active { display: block; }
.doc-body .kb-tab-panel > :first-child { margin-top: 0; }
.doc-body .kb-tab-panel > :last-child { margin-bottom: 0; }

/* ---------- copy button ---------- */

.doc-body .kb-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease, color 120ms ease, border-color 120ms ease;
}
.doc-body pre:hover .kb-copy-btn, .doc-body .kb-copy-btn:focus-visible { opacity: 1; }
.doc-body .kb-copy-btn:hover { color: var(--text); border-color: var(--accent-soft); }
.doc-body .kb-copy-btn.copied { color: var(--ok); border-color: var(--ok); opacity: 1; }

/* ---------- prev/next pager (Phase 5 furniture; styles ship now) ---------- */

.doc-pager {
  display: flex;
  gap: 14px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.doc-pager-spacer { flex: 1; }
.doc-pager-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.doc-pager-link:hover { border-color: var(--accent-soft); transform: translateY(-2px); text-decoration: none; }
.doc-pager-next { text-align: right; }
.doc-pager-dir { font-size: 0.78rem; font-weight: 600; color: var(--accent-soft); }
.doc-pager-title { font-size: 0.98rem; font-weight: 700; color: var(--heading); }

/* ---------- home (Phase 4; styles ship now) ---------- */

.home { max-width: 960px; margin: 0 auto; padding-top: 10px; }
.home-hero {
  position: relative;
  text-align: center;
  padding: 40px 0 36px;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: -60px -120px 0;
  background: radial-gradient(ellipse 60% 70% at 50% 20%,
    color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.home-hero > * { position: relative; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-mid-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.home-hero h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; color: var(--heading); }
.home-lede { max-width: 42rem; margin: 18px auto 0; color: var(--muted); font-size: 1.1rem; line-height: 1.7; }
.home-search { margin: 28px auto 0; max-width: 560px; }
.home-search .search { width: 100%; }
.home-cta { margin: 28px 0 4px; display: flex; justify-content: center; }

.home-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.section-card {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  transition: border-color 150ms ease, transform 150ms ease;
}
.section-card:hover { border-color: var(--accent-soft); transform: translateY(-2px); text-decoration: none; }
.section-card h2 { margin: 0 0 8px; font-size: 1.2rem; font-weight: 800; color: var(--heading); border: none; padding: 0; }
.section-card p { margin: 0 0 16px; color: var(--muted); font-size: 0.94rem; line-height: 1.6; flex: 1; }
.section-card-go { color: var(--accent-soft); font-size: 0.88rem; font-weight: 600; }

/* ---------- buttons & not-found ---------- */

.button {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  background: var(--grad);
  color: #fefefe;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 24px color-mix(in srgb, var(--accent) 32%, transparent);
}
.button:hover { text-decoration: none; transform: translateY(-1px); }

.not-found { max-width: 620px; margin: 8vh auto; text-align: center; }
.not-found h1 { color: var(--heading); font-size: 2rem; margin: 6px 0 12px; }
.not-found p { color: var(--muted); margin: 0 0 18px; }

/* ---------- footer ---------- */

.app-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px clamp(20px, 4vw, 60px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  background: var(--surface-2);
}
.footer-spacer { flex: 1; }
.build-stamp code { background: var(--surface-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--text); }
.footer-brand { font-weight: 700; color: var(--text); }

/* ---------- blazor error ui ---------- */

#blazor-error-ui {
  background: lightyellow;
  color: #111;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ---------- responsive ---------- */

@media (max-width: 1200px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
  .toc { display: none; }
}

@media (max-width: 920px) {
  .hamburger { display: inline-flex; }
  .app-body { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    width: min(300px, 82vw);
    height: calc(100vh - var(--topbar-h));
    transform: translateX(-100%);
    transition: transform 180ms ease;
    z-index: 50;
  }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 45;
  }
  .search { width: min(320px, 52vw); }
}

@media (max-width: 560px) {
  .wordmark span:not(.flame) { font-size: 0.95rem; }
  .search-input { font-size: 0.85rem; }
  .content { padding: 24px 18px 60px; }
  .doc-pager { flex-direction: column; }
}

/* ---------- link cards (:::cards) and live-check badge (:::live-check) ---------- */

.doc-body .kb-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}

.doc-body .kb-card {
  position: relative;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.doc-body .kb-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.doc-body .kb-card-title { color: var(--text); font-weight: 600; text-decoration: none; }
.doc-body .kb-card-title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.doc-body .kb-card-desc { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.doc-body .kb-card-desc a { position: relative; z-index: 1; }

.doc-body .kb-live-check { margin: 0 0 20px; }
.doc-body .kb-live-check-badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 2px 10px;
  border: 1px solid color-mix(in srgb, var(--ok) 50%, var(--line));
  border-radius: 99px;
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- product sidebar and home categories (products packs) ---------- */

.nav-back { display: block; margin: 0 0 14px; color: var(--muted); font-size: 13px; text-decoration: none; }
.nav-back:hover { color: var(--text); text-decoration: none; }
.nav-group-label {
  margin: 14px 0 4px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.home-category { margin: 36px 0 12px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
