:root {
  --bg: #09090b;
  --bg-elevated: #0f0f12;
  --sidebar: #0c0c0f;
  --card: #18181b;
  --border: #27272a;
  --text: #fafafa;
  --muted: #a1a1aa;
  --faint: #71717a;
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.14);
  --header-h: 3.5rem;
  --welcome-h: 2.25rem;
  --sidebar-w: 16.5rem;
  --toc-w: 13.5rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* —— Welcome bar —— */
.welcome-bar {
  background: #1c1917;
  border-bottom: 1px solid #44403c;
  color: #fde68a;
  font-size: 0.8rem;
  text-align: center;
  padding: 0.55rem 1rem;
  min-height: var(--welcome-h);
}

.welcome-bar a {
  color: #fef3c7;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.welcome-bar a:hover { color: #fff; }

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 9, 11, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 90rem;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--blue-dim);
  border: 1px solid rgba(59, 130, 246, 0.35);
  display: grid;
  place-items: center;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.68rem;
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-wrap: wrap;
}

.header-nav > a,
.nav-dd-btn {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: 0.4rem;
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.2;
}

.header-nav > a:hover,
.nav-dd-btn:hover {
  color: var(--text);
  background: #18181b;
}

.header-nav > a.is-active,
.nav-dd-btn.is-active,
.nav-dd.is-open .nav-dd-btn {
  color: var(--text);
  background: var(--blue-dim);
}

.nav-dd {
  position: relative;
}

.nav-dd-chevron {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.75;
}

.nav-dd.is-open .nav-dd-chevron {
  transform: rotate(-135deg) translateY(-1px);
}

.nav-dd-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 50;
  min-width: 22rem;
  max-width: min(38rem, calc(100vw - 2rem));
  max-height: min(28rem, calc(100vh - 5.5rem));
  overflow: auto;
  background: #111114;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 0.6rem;
}

.nav-dd-panel--legal {
  min-width: 16.5rem;
  max-width: 20rem;
}

.nav-dd-panel[hidden] {
  display: none;
}

.nav-dd-home {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  border-radius: 0.4rem;
  margin-bottom: 0.35rem;
}

.nav-dd-home:hover {
  background: var(--blue-dim);
}

.nav-dd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.12rem 0.4rem;
}

.nav-dd-panel a[role="menuitem"] {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 0.55rem;
  border-radius: 0.35rem;
  display: block;
}

.nav-dd-panel a[role="menuitem"]:hover,
.nav-dd-panel a[role="menuitem"]:focus {
  color: var(--text);
  background: #18181b;
  outline: none;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #111114;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  min-width: 11rem;
}

.header-search svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke: var(--faint);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.header-search input {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  outline: none;
  width: 100%;
  min-width: 0;
}

.header-search input::placeholder { color: var(--faint); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.pill {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: var(--blue-dim);
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 0.45rem;
  border: 0;
  cursor: pointer;
}

.btn:hover { filter: brightness(1.08); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

/* —— Download button —— */
.btn-download {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: linear-gradient(180deg, #4f8ef7 0%, var(--blue) 100%);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(147, 197, 253, 0.35);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25), 0 8px 24px rgba(37, 99, 235, 0.28);
  border-radius: 0.55rem;
  padding: 0.55rem 0.95rem 0.55rem 0.7rem;
  cursor: pointer;
}

.btn-download:hover { filter: brightness(1.08); }
.btn-download:hover .dl-arrow { animation-duration: 0.7s; }

.dl-icon {
  position: relative;
  width: 1.55rem;
  height: 1.55rem;
  flex-shrink: 0;
}

.dl-icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dl-arrow { animation: dl-bounce 1.8s ease-in-out infinite; }
.dl-check { opacity: 0; transform: scale(0.6); }

.dl-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}

.dl-label { font-size: 0.8rem; font-weight: 700; letter-spacing: -0.01em; }
.dl-label-saved,
.btn-download.is-saved .dl-label-idle { display: none; }
.btn-download.is-saved .dl-label-saved { display: inline; }
.dl-file { font-size: 0.62rem; font-weight: 500; opacity: 0.85; }

.dl-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: #fff;
  opacity: 0.85;
}

.btn-download.is-saving .dl-progress { animation: dl-fill 0.7s ease forwards; }
.btn-download.is-saving .dl-arrow { animation: dl-slide 0.55s ease forwards; }
.btn-download.is-saved .dl-arrow,
.btn-download.is-saved .dl-tray { opacity: 0; }
.btn-download.is-saved .dl-check {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-download--header {
  padding: 0.4rem 0.75rem 0.4rem 0.55rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-download--header .dl-file { display: none; }

.btn-download--hero {
  padding: 0.85rem 1.2rem 0.85rem 0.9rem;
  border-radius: 0.7rem;
  gap: 0.9rem;
}

.btn-download--hero .dl-icon { width: 2rem; height: 2rem; }
.btn-download--hero .dl-label { font-size: 1rem; }
.btn-download--hero .dl-file { font-size: 0.72rem; margin-top: 0.15rem; }

.download-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 1.15rem 1.25rem;
  margin: 0 0 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.download-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes dl-bounce {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(4px); }
}

@keyframes dl-slide {
  0% { transform: translateY(-4px); opacity: 1; }
  100% { transform: translateY(10px); opacity: 0.15; }
}

@keyframes dl-fill {
  from { width: 0; }
  to { width: 100%; }
}

/* —— Layout shell —— */
.hc-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 0;
  max-width: 90rem;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  align-items: start;
}

.hc-sidebar {
  position: sticky;
  top: calc(var(--welcome-h) + var(--header-h));
  max-height: calc(100vh - var(--welcome-h) - var(--header-h));
  overflow: auto;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0.85rem 2rem;
}

.hc-sidebar-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  padding: 0.75rem 0.65rem 0.35rem;
}

.hc-nav a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.4rem 0.65rem;
  border-radius: 0.4rem;
  border-left: 2px solid transparent;
  margin-left: 0.15rem;
}

.hc-nav a:hover {
  color: var(--text);
  background: #18181b;
}

.hc-nav a.is-active {
  color: var(--text);
  background: var(--blue-dim);
  border-left-color: var(--blue);
  font-weight: 600;
}

.hc-nav .nav-child {
  padding-left: 1.15rem;
  font-size: 0.8rem;
}

.hc-nav a.is-hidden { display: none; }

.hc-main {
  min-width: 0;
  padding: 1.75rem 2rem 3.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--faint);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--text); }

.breadcrumb span { color: var(--faint); }

.article {
  max-width: 46rem;
}

.article h1 {
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  font-weight: 650;
}

.article h2 {
  font-size: 1.15rem;
  margin: 2.25rem 0 0.7rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  letter-spacing: -0.02em;
  scroll-margin-top: 5.5rem;
}

.article h2:first-of-type { border-top: none; padding-top: 0; }

.article h3 {
  font-size: 1rem;
  margin: 1.35rem 0 0.45rem;
  color: #e4e4e7;
  scroll-margin-top: 5.5rem;
}

.article p,
.article li { color: #d4d4d8; font-size: 0.95rem; }

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.notice {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 0.65rem;
  padding: 0.9rem 1rem;
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: #d4d4d8;
}

.notice a { color: #93c5fd; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: #18181b;
  color: #e4e4e7;
  font-weight: 600;
}

tr:last-child td { border-bottom: 0; }

code {
  font-size: 0.85em;
  background: #27272a;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

mark {
  background: rgba(250, 204, 21, 0.18);
  color: #fde68a;
  padding: 0.05rem 0.2rem;
  border-radius: 0.2rem;
}

ol, ul { padding-left: 1.25rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  color: inherit;
  display: block;
}

a.card:hover { border-color: #3f3f46; }

.card h2 {
  border: 0;
  padding: 0;
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  background: #050507;
  margin-top: auto;
}

.footer-manual {
  max-width: 90rem;
  margin: 0 auto;
  padding: 2.75rem 2.25rem 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-manual-copy {
  max-width: 34rem;
}

.footer-manual-copy h2 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.footer-manual-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.footer-manual .btn-download {
  flex-shrink: 0;
}

.footer-rule {
  max-width: 90rem;
  margin: 0 auto;
  border: 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 90rem;
  margin: 0 auto;
  padding: 2.5rem 2.25rem 2rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.75rem 3.5rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.footer-brand p {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 20rem;
  line-height: 1.6;
}

.footer-brand a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--blue);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-brand a:hover { text-decoration: underline; }

.footer-col h3 {
  margin: 0 0 1.1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.footer-col a {
  display: block;
  color: #d4d4d8;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  line-height: 1.45;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  max-width: 90rem;
  margin: 0 auto;
  padding: 1.25rem 2.25rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* —— Support widget —— */
.support-root {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.support-panel {
  width: min(22rem, calc(100vw - 2rem));
  background: #121216;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: none;
}

.support-panel.is-open { display: block; }

.support-panel-head {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 1rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.support-panel-head strong { display: block; font-size: 0.95rem; }
.support-panel-head span { display: block; font-size: 0.78rem; opacity: 0.9; margin-top: 0.2rem; }

.support-close {
  background: rgba(255, 255, 255, 0.15);
  border: 0;
  color: #fff;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.support-panel-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.support-panel-body p {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.support-action {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.support-action:hover { border-color: #3f3f46; }
.support-action small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.2rem;
  font-size: 0.75rem;
}

.support-fab {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.45);
  background: linear-gradient(180deg, #4f8ef7, var(--blue));
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.45);
}

.support-fab:hover { filter: brightness(1.08); }

@media (max-width: 1100px) {
  .hc-shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
}

@media (max-width: 800px) {
  .hc-shell { grid-template-columns: 1fr; }
  .hc-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .hc-main { padding: 1.25rem 1.15rem 3rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-manual,
  .footer-inner,
  .footer-bottom { padding-left: 1.25rem; padding-right: 1.25rem; }
  .header-search { min-width: 8rem; width: 100%; order: 5; flex: 1 1 100%; }
}

@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
  .nav-dd-grid { grid-template-columns: 1fr; }
  .nav-dd-panel { min-width: 16.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-arrow,
  .btn-download.is-saving .dl-arrow,
  .btn-download.is-saving .dl-progress {
    animation: none;
  }
  html { scroll-behavior: auto; }
}

/* ---- "Was this page helpful?" ------------------------------------------ */

.hc-feedback {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.hc-feedback-q {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.hc-feedback-btns {
  display: flex;
  gap: 0.5rem;
}

.hc-vote {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.hc-vote svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hc-vote:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
}

.hc-vote:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* The chosen answer stays lit so the reader can see what they said. */
.hc-vote.is-chosen {
  border-color: var(--blue);
  background: var(--blue-dim);
  color: var(--blue);
}

.hc-vote:disabled {
  cursor: default;
}

.hc-vote:disabled:not(.is-chosen) {
  opacity: 0.45;
}

.hc-feedback-msg {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.hc-feedback-msg.is-error {
  color: #f87171;
}
