:root {
  --site-shell-nav: #0f172a;
  --site-shell-nav-border: #1e293b;
  --site-shell-accent: #22d3ee;
  --site-shell-interactive: #4338ca;
  --site-shell-interactive-dark: #1e293b;
}

.site-shell-legacy-theme-compat {
  display: none !important;
}

.site-shell-header {
  align-items: center;
  background: var(--site-shell-nav);
  border-bottom: 1px solid var(--site-shell-nav-border);
  box-sizing: border-box;
  color: #f8fafc;
  display: flex;
  flex: 0 0 58px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  height: 58px;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 4rem);
  position: relative;
  width: 100%;
  z-index: 50;
}

.site-shell-brand,
.site-shell-home {
  align-items: center;
  color: inherit;
  display: inline-flex;
  font-weight: 700;
  gap: 0.15rem;
  text-decoration: none;
}

.site-shell-brand {
  font-family: Consolas, "Courier New", monospace;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.site-shell-brand-mark,
.site-shell-brand-name {
  color: var(--site-shell-accent);
}

.site-shell-brand-word {
  color: #e2e8f0;
  margin-left: 0.45rem;
}

.site-shell-home {
  border-radius: 0.45rem;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
}

.site-shell-home:hover,
.site-shell-home:focus-visible {
  background: #1e293b;
  outline: none;
}

/* Kept as a defensive fallback if an old branch still contains a copied header. */
.site-shell-source-header {
  display: none !important;
}

.interactive-shell-header {
  align-items: center !important;
  background: var(--site-shell-interactive) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.16) !important;
  box-sizing: border-box !important;
  color: #fff !important;
  display: flex !important;
  flex: 0 0 auto !important;
  gap: 1rem !important;
  justify-content: space-between !important;
  left: auto !important;
  margin-top: calc(-1 * var(--interactive-shell-top-shift, 0px)) !important;
  margin-left: calc((100% - var(--site-shell-page-width, 100vw)) / 2) !important;
  margin-right: calc((100% - var(--site-shell-page-width, 100vw)) / 2) !important;
  max-width: none !important;
  min-height: 64px !important;
  padding: 0.75rem clamp(1rem, 4vw, 4rem) !important;
  position: relative !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  width: var(--site-shell-page-width, 100vw) !important;
  z-index: 40 !important;
}

/* Some authored toolbars use a flat header; do not add a shadow band beneath them. */
.interactive-shell-header[data-interactive-flat-header] {
  box-shadow: none !important;
}

html.dark .interactive-shell-header {
  background: var(--site-shell-interactive-dark) !important;
}

.interactive-shell-header,
.interactive-shell-header * {
  box-sizing: border-box;
}

.interactive-shell-header > :only-child {
  align-items: center !important;
  display: flex !important;
  gap: 1rem !important;
  justify-content: space-between !important;
  margin: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

.interactive-shell-header h1,
.interactive-shell-header h2,
.interactive-shell-header h3,
.interactive-shell-header .interactive-shell-title {
  color: #fff !important;
  flex: 1 1 auto !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: clamp(1.05rem, 2vw, 1.35rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  text-align: left !important;
}

.interactive-shell-title-block {
  align-items: flex-start !important;
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  gap: 0.18rem !important;
  justify-content: center !important;
  margin: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
}

.interactive-shell-header .interactive-shell-subtitle,
.interactive-shell-title-block p {
  color: #dbeafe !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 0.84rem !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  max-width: min(48rem, 70vw) !important;
  text-align: left !important;
}

.interactive-shell-title-block .interactive-shell-title {
  order: 0 !important;
}

.interactive-shell-title-block .interactive-shell-subtitle {
  order: 1 !important;
}

.interactive-shell-title-source {
  display: none !important;
}

.interactive-shell-actions {
  align-items: center !important;
  display: flex !important;
  flex: 0 0 auto !important;
  gap: 0.75rem !important;
  margin-left: auto !important;
}

.interactive-shell-unclip {
  overflow: visible !important;
}

.interactive-shell-top-layout {
  margin-top: 0 !important;
}

.interactive-shell-top-layout-row {
  align-items: flex-start !important;
}

.interactive-shell-top-layout-column {
  justify-content: flex-start !important;
}

.interactive-shell-filter-anchor {
  position: relative !important;
}

.interactive-shell-filter-popover {
  background: #fff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 0.75rem !important;
  bottom: auto !important;
  box-shadow: 0 18px 44px rgb(15 23 42 / 0.22) !important;
  color: #1e293b !important;
  left: auto !important;
  margin: 1.25rem 0 0 !important;
  max-height: min(70vh, 34rem) !important;
  max-width: calc(100vw - 2rem) !important;
  min-width: min(18rem, calc(100vw - 2rem)) !important;
  overflow-y: auto !important;
  padding: 2.9rem 0.85rem 0.85rem !important;
  position: absolute !important;
  right: 0 !important;
  top: 100% !important;
  transform: translate(
    var(--interactive-shell-filter-shift-x, 0),
    var(--interactive-shell-filter-shift-y, 0)
  ) !important;
  z-index: 90 !important;
}

html.dark .interactive-shell-filter-popover {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #f1f5f9 !important;
}

.interactive-shell-filter-popover [class*="border-b"]:first-of-type,
.interactive-shell-filter-popover h2,
.interactive-shell-filter-popover h3,
.interactive-shell-filter-popover h4 {
  margin-top: 0 !important;
}

.interactive-shell-filter-close {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0.4rem !important;
  color: #64748b !important;
  cursor: pointer !important;
  display: inline-flex !important;
  height: 2rem !important;
  justify-content: center !important;
  padding: 0 !important;
  position: absolute !important;
  right: 0.75rem !important;
  top: 0.65rem !important;
  width: 2rem !important;
}

.interactive-shell-filter-close:hover,
.interactive-shell-filter-close:focus-visible {
  background: #eef2f7 !important;
  color: #0f172a !important;
  outline: 2px solid #94a3b8 !important;
}

html.dark .interactive-shell-filter-close:hover,
html.dark .interactive-shell-filter-close:focus-visible {
  background: #334155 !important;
  color: #fff !important;
}

.interactive-shell-filter-close svg {
  height: 1.1rem !important;
  width: 1.1rem !important;
}

.interactive-shell-filter-options {
  display: grid !important;
  gap: 0.15rem !important;
  margin-bottom: 0.75rem !important;
}

.interactive-shell-filter-option,
.interactive-shell-filter-popover label:has(input[type="checkbox"]) {
  align-items: flex-start !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0.45rem !important;
  color: inherit !important;
  cursor: pointer !important;
  display: flex !important;
  font: 500 0.88rem/1.35 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  gap: 0.6rem !important;
  margin: 0 !important;
  padding: 0.48rem 0.45rem !important;
  text-align: left !important;
}

.interactive-shell-filter-option:hover,
.interactive-shell-filter-popover label:has(input[type="checkbox"]):hover {
  background: #f1f5f9 !important;
}

html.dark .interactive-shell-filter-option:hover,
html.dark .interactive-shell-filter-popover label:has(input[type="checkbox"]):hover {
  background: #334155 !important;
}

.interactive-shell-filter-option input,
.interactive-shell-filter-popover input[type="checkbox"] {
  accent-color: #2563eb !important;
  flex: 0 0 auto !important;
  height: 1rem !important;
  margin: 0.08rem 0 0 !important;
  width: 1rem !important;
}

.interactive-shell-filter-apply {
  background: #2563eb !important;
  border: 0 !important;
  border-radius: 0.48rem !important;
  color: #fff !important;
  cursor: pointer !important;
  display: block !important;
  font: 700 0.9rem/1 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  margin: 0.65rem 0 0 !important;
  min-height: 2.4rem !important;
  padding: 0.65rem 1rem !important;
  width: 100% !important;
}

.interactive-shell-filter-apply:hover,
.interactive-shell-filter-apply:focus-visible {
  background: #1d4ed8 !important;
  outline: 2px solid #93c5fd !important;
  outline-offset: 2px !important;
}

.interactive-shell-filter-apply:disabled {
  background: #cbd5e1 !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

.interactive-shell-filter-legacy-action {
  display: none !important;
}

.interactive-shell-filter-legacy-heading {
  display: none !important;
}

.interactive-shell-filter-source-group {
  display: none !important;
}

.interactive-shell-filter-source-wrapper {
  margin: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.interactive-shell-filter-force-open {
  display: block !important;
}

.interactive-shell-control,
.interactive-shell-theme {
  align-items: center;
  background: rgb(255 255 255 / 0.12);
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: 600 0.875rem/1 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  gap: 0.45rem;
  height: 38px;
  justify-content: center;
  padding: 0 0.8rem;
  white-space: nowrap;
}

html:not(.dark) .interactive-shell-header [data-interactive-filter],
html:not(.dark) .interactive-shell-header [data-interactive-filter-proxy] {
  background: #fff !important;
  border-color: #dbeafe !important;
  color: #1e3a8a !important;
}

html.dark .interactive-shell-header [data-interactive-filter],
html.dark .interactive-shell-header [data-interactive-filter-proxy] {
  background: #1e293b !important;
  border-color: #64748b !important;
  color: #f8fafc !important;
}

.interactive-shell-theme {
  flex: 0 0 38px;
  padding: 0;
  width: 38px;
}

.interactive-shell-control:hover,
.interactive-shell-control:focus-visible,
.interactive-shell-theme:hover,
.interactive-shell-theme:focus-visible {
  background: rgb(255 255 255 / 0.22);
  outline: 2px solid rgb(255 255 255 / 0.75);
  outline-offset: 2px;
}

.interactive-shell-theme svg,
.interactive-shell-control svg {
  height: 18px;
  pointer-events: none;
  width: 18px;
}

.interactive-shell-filter-source {
  border: 0 !important;
  box-sizing: border-box !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  left: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  top: 0 !important;
  transform: none !important;
  white-space: nowrap !important;
  width: 1px !important;
}

.interactive-shell-question-control {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0.5rem !important;
  color: #fff !important;
  display: inline-flex !important;
  font: 600 0.78rem/1 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  gap: 0 !important;
  height: 38px !important;
  padding: 0 !important;
}

.interactive-shell-question-control [data-interactive-navigation-label] {
  display: none !important;
}

.interactive-shell-question-select,
.interactive-shell-header select.interactive-shell-question-select {
  appearance: auto !important;
  background: #fff !important;
  border: 1px solid #dbeafe !important;
  border-radius: 0.5rem !important;
  color: #1e293b !important;
  cursor: pointer !important;
  font: 600 0.84rem/1 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  height: 38px !important;
  margin: 0 !important;
  max-width: min(22rem, 42vw) !important;
  padding: 0 0.75rem !important;
}

.interactive-shell-question-source,
.interactive-shell-question-source-host,
.interactive-shell-question-source-label {
  display: none !important;
}

.interactive-shell-stat {
  align-items: center !important;
  background: #eef2ff !important;
  border: 1px solid #c7d2fe !important;
  border-radius: 999px !important;
  color: #3730a3 !important;
  display: inline-flex !important;
  font: 700 0.82rem/1 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  gap: 0.3rem !important;
  min-height: 2rem !important;
  padding: 0.45rem 0.75rem !important;
  white-space: nowrap !important;
}

html.dark .interactive-shell-stat {
  background: #312e81 !important;
  border-color: #6366f1 !important;
  color: #e0e7ff !important;
}

html:not(.dark) .interactive-shell-light-surface {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html:not(.dark) .interactive-shell-light-surface:is(input, textarea),
html:not(.dark) input.interactive-shell-light-surface,
html:not(.dark) textarea.interactive-shell-light-surface {
  background: #fff !important;
  caret-color: #0f172a !important;
  color: #0f172a !important;
}

html:not(.dark) .interactive-shell-light-surface :is(.text-white, .text-slate-100, .text-slate-200, .text-slate-300, .text-gray-100, .text-gray-200, .text-gray-300):not(button):not(button *) {
  color: #1e293b !important;
}

html:not(.dark) .interactive-shell-light-surface :is(.text-blue-100, .text-blue-200, .text-blue-300, .text-blue-400, .text-sky-100, .text-sky-200, .text-sky-300, .text-sky-400, .text-cyan-100, .text-cyan-200, .text-cyan-300, .text-cyan-400) {
  color: #1d4ed8 !important;
}

html:not(.dark) .interactive-shell-light-surface :is(.text-green-100, .text-green-200, .text-green-300, .text-green-400, .text-emerald-100, .text-emerald-200, .text-emerald-300, .text-emerald-400) {
  color: #047857 !important;
}

html:not(.dark) .interactive-shell-light-surface :is(.text-orange-100, .text-orange-200, .text-orange-300, .text-orange-400, .text-amber-100, .text-amber-200, .text-amber-300, .text-amber-400, .text-yellow-100, .text-yellow-200, .text-yellow-300, .text-yellow-400) {
  color: #9a3412 !important;
}

html:not(.dark) .interactive-shell-light-surface :is(.text-pink-100, .text-pink-200, .text-pink-300, .text-pink-400, .text-red-100, .text-red-200, .text-red-300, .text-red-400) {
  color: #be123c !important;
}

html:not(.dark) .interactive-shell-light-surface :is(.text-purple-100, .text-purple-200, .text-purple-300, .text-purple-400, .text-indigo-100, .text-indigo-200, .text-indigo-300, .text-indigo-400) {
  color: #6d28d9 !important;
}

html:not(.dark) .interactive-shell-light-surface::placeholder {
  color: #64748b !important;
}

html.dark .interactive-shell-dark-surface {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .interactive-shell-dark-surface:is(input, textarea),
html.dark input.interactive-shell-dark-surface,
html.dark textarea.interactive-shell-dark-surface {
  background: #0f172a !important;
  caret-color: #f8fafc !important;
  color: #f8fafc !important;
}

html.dark .interactive-shell-dark-surface :is(.text-black, .text-slate-900, .text-slate-800, .text-gray-900, .text-gray-800):not(button):not(button *) {
  color: #e2e8f0 !important;
}

html.dark .interactive-shell-dark-surface::placeholder {
  color: #94a3b8 !important;
}

input::placeholder,
textarea::placeholder {
  text-align: left !important;
}

.interactive-shell-content-after-header {
  box-sizing: border-box !important;
  margin-top: 0 !important;
  padding-top: clamp(1rem, 2vw, 1.5rem) !important;
}

.interactive-shell-card-content-gap {
  margin-top: clamp(0.75rem, 1.5vw, 1rem) !important;
}

.interactive-shell-flow-flex-column {
  justify-content: flex-start !important;
}

.interactive-shell-flow-grid {
  align-content: start !important;
}

.interactive-shell-excess-top-space {
  height: auto !important;
  min-height: 0 !important;
}

.interactive-shell-duplicate-title {
  display: none !important;
}

@media (max-width: 640px) {
  .site-shell-header {
    padding: 0 1rem;
  }

  .interactive-shell-header {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    padding: 0.75rem 1rem !important;
  }

  .interactive-shell-header > * {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .interactive-shell-header > :not(:first-child),
  .interactive-shell-actions {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    margin-left: 0 !important;
    width: 100% !important;
  }

  .interactive-shell-header select {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .interactive-shell-header > :not(:first-child):has(> select):has([data-interactive-filter]) > select {
    flex: 1 1 100% !important;
    order: -1 !important;
    width: 100% !important;
  }

  .interactive-shell-title {
    flex: 1 1 12rem;
  }

  .interactive-shell-title-block {
    flex-basis: 100% !important;
  }

  .interactive-shell-header .interactive-shell-subtitle,
  .interactive-shell-title-block p {
    max-width: 100% !important;
  }

  .interactive-shell-question-control {
    flex: 1 1 100% !important;
  }

  .interactive-shell-question-select,
  .interactive-shell-header select.interactive-shell-question-select {
    flex: 1 1 auto !important;
    max-width: none !important;
  }
}
