:root {
  color-scheme: dark;
  --bg: #080808;
  --panel: #101010;
  --panel-2: #151515;
  --panel-3: #1b1b1b;
  --border: #2a2a2a;
  --border-strong: #3d3d3d;
  --text: #eeeeee;
  --muted: #b8b8b8;
  --soft: #868686;
  --accent: #d7d7d7;
  --code-bg: #050505;
  --shadow: rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 16px;
  border-right: 1px solid var(--border);
  background: #0d0d0d;
}

.brand {
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 14px;
}

.brand-logo {
  display: block;
  width: min(100%, 201px);
  max-width: 201px;
  height: auto;
  flex: 0 1 auto;
}

.brand-subtitle {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
  text-align: center;
}

.search-label {
  display: block;
  margin-top: 18px;
  margin-bottom: 6px;
  color: var(--soft);
  font-size: 12px;
  text-transform: uppercase;
}

.search {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  color: var(--text);
  background: #090909;
  border: 1px solid var(--border);
  border-radius: 3px;
  outline: none;
}

.search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.nav-groups {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

details {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 3px;
}

summary {
  cursor: pointer;
  padding: 9px 10px;
  color: var(--text);
  font-weight: 700;
  user-select: none;
}

.nav-link {
  display: block;
  width: calc(100% - 12px);
  margin: 0 6px 6px;
  padding: 7px 9px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--text);
  background: #181818;
  border-color: var(--border);
  outline: none;
}

.nav-link.active {
  color: #080808;
  background: var(--accent);
  border-color: var(--accent);
}

.nav-link.hidden {
  display: none;
}

.content {
  min-width: 0;
  padding: 46px clamp(22px, 6vw, 72px);
}

.doc-page {
  display: none;
  max-width: 960px;
}

.doc-page.visible {
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 30px 0 10px;
  font-size: 19px;
  font-weight: 700;
}

p {
  color: var(--muted);
}

.lead {
  max-width: 760px;
  color: #d0d0d0;
  font-size: 18px;
}

a {
  color: var(--text);
}

code {
  padding: 1px 4px;
  color: #eeeeee;
  background: #171717;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95em;
}

pre {
  position: relative;
  overflow-x: auto;
  padding: 16px;
  padding-top: 46px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: 0 14px 32px var(--shadow);
}

pre code {
  padding: 0;
  color: #e6e6e6;
  background: transparent;
  border: 0;
}

.code-copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(18, 18, 18, 0.92);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}

.code-copy-button:hover,
.code-copy-button:focus {
  color: var(--text);
  background: rgba(28, 28, 28, 0.98);
  border-color: var(--border-strong);
  outline: none;
}

.code-copy-button[data-copied="true"] {
  color: #080808;
  background: var(--accent);
  border-color: var(--accent);
}

.code-copy-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.code-copy-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.code-copy-label {
  font-size: 12px;
  line-height: 1;
}

code.language-csharp .syntax-keyword {
  color: #4ea1ff;
}

code.language-csharp .syntax-type {
  color: #35d0c5;
}

code.language-csharp .syntax-string {
  color: #9ad06d;
}

code.language-csharp .syntax-number {
  color: #d7b37c;
}

code.language-csharp .syntax-comment {
  color: #8a8a8a;
}

code.language-csharp .syntax-method {
  color: #4ea1ff;
}

code.language-csharp .syntax-operator {
  color: #f0d96c;
}

ul,
ol {
  color: var(--muted);
  padding-left: 22px;
}

li {
  margin: 7px 0;
}

.patch-notes-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 360px);
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 520px;
  min-height: 62px;
  margin: 22px 0;
  padding: 12px 14px;
  background: #111111;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.patch-notes-toolbar label {
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.patch-notes-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.patch-notes-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  color: var(--text);
  font: inherit;
  text-align: left;
  background: #090909;
  border: 1px solid var(--border);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.patch-notes-select-button:hover {
  background: #121212;
  border-color: #4b4f54;
}

.patch-notes-select-button:focus,
.patch-notes-select[data-open="true"] .patch-notes-select-button {
  background: #141414;
  border-color: #5a5f66;
  box-shadow: 0 0 0 2px rgba(84, 89, 96, 0.22);
}

.patch-notes-select-button span:first-child {
  min-width: 0;
}

.patch-notes-select-caret {
  width: 0;
  height: 0;
  margin-left: 12px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #a3a8ae;
  flex: 0 0 auto;
}

.patch-notes-select[data-open="true"] .patch-notes-select-caret {
  border-top: 0;
  border-bottom: 6px solid #a3a8ae;
}

.patch-notes-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 4px;
  padding: 6px;
  background: #101010;
  border: 1px solid #3b4046;
  border-radius: 3px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34);
}

.patch-notes-select-menu[hidden] {
  display: none !important;
}

.patch-notes-select-option {
  display: block;
  width: 100%;
  padding: 8px 10px;
  color: #d9dde2;
  font: inherit;
  text-align: left;
  background: #161616;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.patch-notes-select-option:hover,
.patch-notes-select-option:focus {
  color: #f0f2f4;
  background: #24282c;
  border-color: #4e545b;
  outline: none;
}

.patch-notes-select-option[aria-selected="true"] {
  color: #f5f6f7;
  background: #2c3136;
  border-color: #616871;
}

.patch-notes-content {
  padding-bottom: 32px;
}

.patch-notes-content h3 {
  margin-top: 24px;
}

.patch-note-meta {
  margin-top: -8px;
  color: var(--soft);
  font-size: 13px;
}

@media (max-width: 560px) {
  .patch-notes-toolbar {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

.callout {
  margin: 22px 0;
  padding: 14px 16px;
  color: #dddddd;
  background: #111111;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
}

.experimental-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 22px 0 18px;
  padding: 16px 18px;
  color: #ffe7bf;
  background:
    linear-gradient(135deg, rgba(255, 190, 92, 0.16), rgba(255, 149, 0, 0.04)),
    linear-gradient(180deg, #23170c, #17100a);
  border: 1px solid #7a5525;
  border-radius: 4px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
}

.experimental-warning-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-top: 0px;
  color: #ffb347;
  background: rgba(255, 179, 71, 0.1);
  border: 1px solid rgba(255, 179, 71, 0.32);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 239, 205, 0.08);
}

.experimental-warning-icon svg {
  width: 22px;
  height: 22px;
  margin-top:-2px;
  fill: currentColor;
}

.experimental-warning-copy {
  min-width: 0;
}

.experimental-warning-eyebrow {
  margin: 0 0 5px;
  color: #ffbf66;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.experimental-warning-copy h3 {
  margin: 0 0 6px;
  color: #fff0d5;
  font-size: 22px;
}

.experimental-warning-copy p:last-child {
  margin: 0;
  color: #f3d7a5;
}

.download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 20px 0 24px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #141414, #0d0d0d);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 0 10px 22px var(--shadow);
}

.download-panel-copy h3 {
  margin: 2px 0 0;
  font-size: 22px;
}

.download-version-loading,
.download-callout-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.download-version-spinner {
  width: 0.9em;
  height: 0.9em;
  border: 2px solid rgba(203, 213, 225, 0.28);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: download-version-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.download-version-text {
  display: inline-block;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.doc-action-button,
.download-callout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  color: var(--text);
  font: inherit;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
}

.doc-action-button:hover,
.doc-action-button:focus,
.download-callout-button:hover,
.download-callout-button:focus {
  border-color: var(--accent);
  outline: none;
}

.doc-action-button-secondary {
  background: #191919;
}

.doc-action-button-ghost {
  background: transparent;
}

.license-badge {
  display: inline-flex;
  align-items: stretch;
  color: var(--text);
  text-decoration: none;
  border: 1px solid #30363d;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.license-badge:hover,
.license-badge:focus {
  outline: none;
  border-color: #4b5563;
}

.license-badge-label,
.license-badge-value {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.license-badge-label {
  color: #f0f6fc;
  background: #161b22;
}

.license-badge-value {
  color: #f0f6fc;
  background: linear-gradient(180deg, #57606a, #424a53);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.download-panel-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0;
}

.patch-notes-callout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 11px 17px;
  color: #d2d7dd;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(180deg, #2a2d31, #1f2226);
  border: 1px solid #3f454c;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
}

.patch-notes-callout-button:hover,
.patch-notes-callout-button:focus {
  color: #eceff2;
  background: linear-gradient(180deg, #34383d, #292d31);
  border-color: #5a6169;
  outline: none;
}

.patch-notes-callout-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex: 0 0 auto;
}

.download-callout-button {
  gap: 10px;
  min-width: 138px;
  padding: 11px 19px;
  color: #e5e7eb;
  background: linear-gradient(180deg, #565b63, #484d55);
  border-color: #666c75;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.download-callout-button[hidden],
.download-callout-label[hidden],
.download-callout-version[hidden],
.download-callout-loading[hidden],
.download-callout-icon[hidden] {
  display: none !important;
}

.download-callout-button-loading {
  color: #c5cbd3;
  background: linear-gradient(180deg, #3f444b, #353940);
  border-color: #545a63;
  cursor: default;
  pointer-events: none;
}

.download-callout-label {
  color: inherit;
}

.download-callout-version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.download-callout-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.download-callout-button-loading .download-callout-icon {
  display: none;
}

.download-callout-button:hover,
.download-callout-button:focus {
  color: #f5f5f5;
  background: linear-gradient(180deg, #6a7078, #5a6068);
  border-color: #9097a1;
}

.download-callout-button:hover .download-callout-version,
.download-callout-button:focus .download-callout-version {
  color: #f3f4f6;
}

@keyframes download-version-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.license-document {
  margin-top: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}

.doc-gallery {
  display: grid;
  gap: 16px;
  margin: 24px 0 28px;
}

.doc-gallery-two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doc-gallery-three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doc-figure {
  margin: 24px 0;
}

.doc-figure-hero {
  margin-top: 28px;
}

.doc-image-button {
  display: block;
  width: 100%;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  cursor: zoom-in;
}

.doc-image-button:hover,
.doc-image-button:focus {
  border-color: var(--border-strong);
  box-shadow: 0 18px 34px var(--shadow);
  outline: none;
}

.doc-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #050505;
}

.doc-figure figcaption {
  margin-top: 8px;
  color: var(--soft);
  font-size: 12px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(0, 0, 0, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--text);
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
  border-color: var(--accent);
  outline: none;
}

.lightbox-frame {
  display: grid;
  gap: 10px;
  max-width: min(100%, 1480px);
  max-height: 100%;
  width: auto;
  padding: 18px;
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  cursor: zoom-out;
}

.lightbox-image {
  display: block;
  max-width: min(100%, 1440px);
  max-height: calc(100vh - 132px);
  width: auto;
  height: auto;
  border-radius: 2px;
}

.lightbox-caption {
  color: var(--soft);
  font-size: 12px;
  text-align: left;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.mini-card {
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.mini-card h3 {
  margin-top: 0;
  font-size: 16px;
}

.mini-card p {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 3px;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text);
  background: var(--panel-3);
}

td {
  color: var(--muted);
  background: var(--panel);
}

tr:last-child td {
  border-bottom: 0;
}

.data-list {
  display: grid;
  gap: 8px;
}

.data-list dt {
  color: var(--text);
  font-weight: 700;
}

.data-list dd {
  margin: 0 0 12px;
  color: var(--muted);
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .content {
    padding: 32px 18px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .download-panel {
    grid-template-columns: 1fr;
  }

  .download-panel-cta {
    justify-content: flex-start;
  }

  .download-callout-button {
    justify-content: center;
  }

  .experimental-warning {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .experimental-warning-icon {
    margin-top: 0;
  }

  .doc-gallery-two-up,
  .doc-gallery-three-up {
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-frame {
    width: 100%;
    padding: 12px;
  }

  .lightbox-image {
    max-height: calc(100vh - 108px);
  }
}
