/* The portal keeps one sidebar interaction across market, playground and workspaces. */
body.gallery.sidebar-layout,
body.gallery .sidebar-layout {
  --sidebar-expanded-size: clamp(
    12rem,
    var(--sidebar-preferred-width, var(--sidebar-auto-width, 14.5rem)),
    min(25%, 18rem)
  );
  --sidebar-rail-size: min(18%, 3.75rem);
  --sidebar-current-size: var(--sidebar-expanded-size);
}
body.gallery.sidebar-layout[data-sidebar-collapsed="true"],
body.gallery .sidebar-layout[data-sidebar-collapsed="true"] {
  --sidebar-current-size: var(--sidebar-rail-size);
}
body.gallery .sidebar-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  max-width: 100%;
  padding: 0;
  border-radius: 0.75rem;
  color: var(--ui-muted);
  background: transparent;
}
body.gallery .sidebar-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
body.gallery .sidebar-toggle:hover {
  background: #eeedf7;
  color: var(--ui-accent);
}
body.gallery .sidebar-toggle:focus-visible {
  outline: 0.125rem solid var(--ui-accent);
  outline-offset: 0.125rem;
}
body.gallery .sidebar-toolbar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: none;
  margin-bottom: 0.875rem;
  min-width: 0;
}
body.gallery .sidebar-toolbar > span {
  font-size:var(--text-sm);
  font-weight: 550;
  color: var(--ui-muted);
}
body.gallery .portal-sidebar {
  overflow: visible;
  min-width: 0;
}
.sidebar-resize-handle {
  position: absolute;
  inset: 0 0 0 auto;
  width: 0.5rem;
  z-index: 7;
  cursor: col-resize;
  touch-action: none;
  border-radius: 0.25rem;
}
.sidebar-resize-handle::after {
  content: "";
  position: absolute;
  inset: 0 40%;
  background: transparent;
  transition: background-color 160ms;
}
.sidebar-resize-handle:hover::after,
.sidebar-resize-handle:focus-visible::after {
  background: #8a7dcc;
}
.sidebar-resize-handle:focus-visible {
  outline: 0.125rem solid #8a7dcc;
  outline-offset: -0.125rem;
}
body[data-sidebar-dragging="true"],
body[data-sidebar-dragging="true"] * {
  cursor: col-resize !important;
  user-select: none !important;
}
body[data-sidebar-dragging="true"] iframe {
  pointer-events: none;
}
body.gallery[data-sidebar-resizing="true"],
body.gallery[data-sidebar-resizing="true"]
  :is(.portal-sidebar, .workspace-main),
body.gallery [data-sidebar-resizing="true"],
body.gallery
  [data-sidebar-resizing="true"]
  :is(.portal-sidebar, .workspace-main) {
  transition: none !important;
}

/* Workspaces share their width preference, including the administrator routes. */
body.gallery.workspace-active.sidebar-layout {
  --workspace-sidebar-size: var(--sidebar-current-size);
}
body.gallery.workspace-active .workspace-sidebar {
  width: var(--workspace-sidebar-size);
  transform: none;
  backdrop-filter: none;
  transition: width 220ms var(--motion-settle);
}
body.gallery.workspace-active .workspace-main {
  transition:
    margin-left 220ms var(--motion-settle),
    width 220ms var(--motion-settle);
}
body.gallery .workspace-sidebar .sidebar-toolbar {
  padding-inline: 0.125rem;
}
body.gallery .workspace-sidebar nav :is(.workspace-link, summary) {
  position: relative;
}
body.gallery .workspace-sidebar nav :is(.workspace-link, summary) > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.gallery[data-sidebar-collapsed="true"] .workspace-sidebar {
  padding-inline: 0.5rem;
}
body.gallery[data-sidebar-collapsed="true"]
  .workspace-sidebar
  :is(
    .sidebar-toolbar > span,
    .workspace-nav-label,
    .workspace-platform-divider,
    .workspace-management-label,
    .workspace-sidebar-footer > div,
    .workspace-role-dot
  ) {
  display: none;
}
body.gallery[data-sidebar-collapsed="true"]
  .workspace-sidebar
  .sidebar-toolbar {
  justify-content: center;
  padding: 0;
}
body.gallery[data-sidebar-collapsed="true"]
  .workspace-sidebar
  nav
  :is(.workspace-link, .workspace-nav-group > summary) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 0;
  gap: 0;
  margin: 0.125rem 0;
}
body.gallery[data-sidebar-collapsed="true"]
  .workspace-sidebar
  nav
  :is(.workspace-link, summary)
  > span,
body.gallery[data-sidebar-collapsed="true"]
  .workspace-sidebar
  nav
  :is(.workspace-platform-entry, summary)
  > .workspace-icon:last-child {
  display: none;
}
body.gallery[data-sidebar-collapsed="true"]
  .workspace-sidebar
  .workspace-sidebar-footer {
  justify-content: center;
  padding-inline: 0;
}
body.gallery[data-sidebar-collapsed="true"] .workspace-nav-children {
  position: fixed;
  left: calc(var(--workspace-sidebar-size) + 0.5rem);
  top: var(--sidebar-flyout-top, 20%);
  width: min(20rem, calc(100% - var(--workspace-sidebar-size) - 1rem));
  max-height: calc(100dvh - var(--sidebar-flyout-top, 20dvh) - 1rem);
  margin: 0;
  padding: 0.625rem;
  overflow-y: auto;
  border: 0.0625rem solid #e1e3ed;
  background: #fff;
  box-shadow: 0 0.75rem 2rem #30324b1a;
  border-radius: 1rem;
  z-index: 12;
}
body.gallery[data-sidebar-collapsed="true"]
  .workspace-sidebar
  nav
  .workspace-nav-children
  .workspace-link {
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
}
body.gallery[data-sidebar-collapsed="true"]
  .workspace-sidebar
  nav
  .workspace-nav-children
  .workspace-link
  > span {
  display: block;
}

/* The history stays present as an icon rail, instead of moving into the main toolbar. */
body.gallery .refined-try.sidebar-layout,
body.gallery .refined-try.sidebar-layout.sidebar-collapsed {
  grid-template-columns: minmax(0, var(--sidebar-current-size)) minmax(0, 1fr);
}
body.gallery .refined-try.sidebar-layout .try-sidebar {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - var(--portal-header-height) - 1rem);
  min-width: 0;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: none;
}
body.gallery .refined-try.sidebar-layout .chat-sidebar-top {
  justify-content: flex-start;
  gap: 0.625rem;
  padding: 0;
  margin-bottom: 1rem;
}
body.gallery .refined-try.sidebar-layout .chat-sidebar-top h2 {
  margin: 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.gallery .refined-try.sidebar-layout .chat-sidebar-bottom a {
  min-height: 2.75rem;
}
body.gallery .refined-try.sidebar-layout .chat-sidebar-bottom a > .d-icon {
  flex-shrink: 0;
}
body.gallery .refined-try[data-sidebar-collapsed="true"] .try-sidebar {
  padding-inline: 0.5rem;
}
body.gallery
  .refined-try[data-sidebar-collapsed="true"]
  .try-sidebar
  :is(
    .chat-sidebar-top h2,
    .history-search,
    .history-section-title,
    .try-history,
    .chat-sidebar-bottom a > span,
    .new-chat-button > span,
    .portal-kind-nav button > span
  ) {
  display: none !important;
}
body.gallery .refined-try[data-sidebar-collapsed="true"] .chat-sidebar-top {
  justify-content: center;
}
body.gallery .refined-try[data-sidebar-collapsed="true"] .new-chat-button,
body.gallery
  .refined-try[data-sidebar-collapsed="true"]
  .portal-kind-nav
  button,
body.gallery
  .refined-try[data-sidebar-collapsed="true"]
  .chat-sidebar-bottom
  a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  min-height: 2.75rem;
  padding-inline: 0;
  margin-inline: 0;
  width: 100%;
}
body.gallery .refined-try[data-sidebar-collapsed="true"] .new-chat-button {
  margin-top: 1rem;
}
body.gallery .refined-try[data-sidebar-collapsed="true"] .chat-sidebar-bottom {
  padding-inline: 0;
}

/* Model filters use the same rail and keep the selected category available. */
body.gallery .market-layout.sidebar-layout {
  position: relative;
  grid-template-columns: minmax(0, var(--sidebar-current-size)) minmax(0, 1fr);
}
body.gallery .market-layout.sidebar-layout .market-filters {
  display: block;
  align-self: start;
  width: 100%;
  min-width: 0;
}
body.gallery .market-layout .filter-items button {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
body.gallery .market-layout .filter-items button > i {
  display: grid;
  place-items: center;
  width: 1.125rem;
  flex: none;
}
body.gallery .market-layout .filter-items button > .filter-label {
  flex: 1;
  text-align: left;
}
body.gallery
  .market-layout[data-sidebar-collapsed="true"]
  .market-filters
  :is(
    h3,
    .capability-filter,
    .filter-note,
    .reset-filters,
    .sidebar-toolbar > span,
    .filter-items button > span
  ) {
  display: none;
}
body.gallery .market-layout[data-sidebar-collapsed="true"] .sidebar-toolbar {
  justify-content: center;
}
body.gallery
  .market-layout[data-sidebar-collapsed="true"]
  .filter-items
  button {
  justify-content: center;
  padding: 0.75rem 0;
  min-height: 2.75rem;
}

@media (max-width: 50rem) {
  body.gallery.workspace-active .workspace-main {
    margin-left: var(--workspace-sidebar-size);
    width: calc(100% - var(--workspace-sidebar-size));
    padding-inline: clamp(0.75rem, 3%, 1.25rem);
  }
  body.gallery.workspace-active.sidebar-layout {
    --workspace-sidebar-size: var(--sidebar-rail-size);
  }
  body.gallery.workspace-active .workspace-sidebar {
    inset-block-start: var(--portal-header-height);
    width: var(--sidebar-rail-size);
    padding-top: 0.75rem;
  }
  body.gallery.workspace-active[data-sidebar-overlay="true"]
    .workspace-sidebar {
    width: min(86%, 20rem);
  }
  body.gallery.workspace-active[data-sidebar-overlay="true"]
    .workspace-backdrop {
    left: min(86%, 20rem);
  }
  body.gallery.workspace-active .management-savebar {
    left: calc(var(--workspace-sidebar-size) + 2%);
    right: 2%;
  }
  body.gallery
    .sidebar-layout[data-sidebar-mobile="true"]
    .sidebar-resize-handle {
    display: none;
  }
}
@media (max-width: 40.625rem) {
  body.gallery .refined-try.sidebar-layout {
    display: grid;
    --sidebar-current-size: var(--sidebar-rail-size);
  }
  body.gallery .refined-try.sidebar-layout .try-sidebar {
    display: flex;
    position: sticky;
    inset: auto;
    top: var(--portal-header-height);
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-height: calc(100dvh - var(--portal-header-height) - 1rem);
    padding: 0.75rem 0.375rem;
    border-right: 0.0625rem solid #e4e5ef;
    border-bottom: 0;
  }
  body.gallery .refined-try.sidebar-layout .try-main {
    grid-column: 2;
    width: auto;
    padding-inline: 0.75rem;
  }
  body.gallery
    .refined-try.sidebar-layout[data-sidebar-overlay="true"]
    .try-sidebar {
    position: absolute;
    inset: 0 auto auto 0;
    width: min(88%, 20rem);
    height: 100%;
    max-height: calc(100dvh - var(--portal-header-height) - 1rem);
    padding: 1rem;
    box-shadow: 1rem 0 2rem #2520311a;
    z-index: 20;
  }
  body.gallery .refined-try.sidebar-layout .portal-kind-nav {
    display: grid;
  }
  body.gallery .refined-try.sidebar-layout .chat-sidebar-bottom {
    display: block;
    margin-top: auto;
  }
  body.gallery .refined-try.sidebar-layout .portal-mobile-kinds {
    display: none !important;
  }
  body.gallery .refined-try.sidebar-layout .chat-topbar-left {
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
  }
  body.gallery .refined-try.sidebar-layout .try-model {
    max-width: 100%;
    width: 100%;
  }
  body.gallery .market-layout.sidebar-layout {
    display: grid;
    --sidebar-current-size: var(--sidebar-rail-size);
    column-gap: 3%;
  }
  body.gallery .market-layout.sidebar-layout .market-filters {
    display: block;
    position: sticky;
    top: calc(var(--portal-header-height) + 0.75rem);
    padding: 0;
  }
  body.gallery
    .market-layout.sidebar-layout[data-sidebar-overlay="true"]
    .market-filters {
    position: absolute;
    inset: 0 auto auto 0;
    width: min(88%, 20rem);
    padding: 1rem;
    z-index: 5;
    background: #fff;
    box-shadow: 0.5rem 0.75rem 2rem #30324b1a;
    border-radius: 1rem;
  }
  body.gallery .market-layout.sidebar-layout .market-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  body.gallery .market-layout.sidebar-layout .market-card {
    padding: 1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.gallery .sidebar-layout,
  body.gallery .sidebar-layout :is(.portal-sidebar, .workspace-main) {
    transition: none;
  }
}

.workspace-nav-group:not([open]) > .workspace-nav-children {
  display: none;
}

/* Keep labels compatible with the existing category-count updater. */
body.gallery .market-layout .filter-items button > i {
  order: 1;
}
body.gallery .market-layout .filter-items button > .filter-label {
  order: 2;
}
body.gallery .market-layout .filter-items button > .filter-count {
  order: 3;
}
body.gallery .market-layout[data-sidebar-collapsed="true"] .filter-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
body.gallery .refined-try.sidebar-layout {
  overflow: clip;
}
body.gallery .refined-try.sidebar-layout .try-sidebar {
  max-height: calc(100dvh - var(--portal-header-height) - 2rem);
}
body.gallery .refined-try.sidebar-layout .try-sidebar .chat-sidebar-top {
  justify-content: flex-start;
}
body.gallery
  .refined-try.sidebar-layout[data-sidebar-collapsed="true"]
  .try-sidebar
  .chat-sidebar-top {
  justify-content: center;
}
body.gallery .refined-try.sidebar-layout .try-intro p,
body.gallery.sidebar-layout .workspace-main h1 {
  text-wrap: balance;
}

body.gallery .market-layout.sidebar-layout > .market-filters {
  grid-column: 1;
  grid-row: 1;
}
body.gallery .market-layout.sidebar-layout > div {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
body.gallery .market-layout.sidebar-layout .filter-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
body.gallery
  .market-layout.sidebar-layout[data-sidebar-collapsed="false"]
  .market-filters
  > :is(h3, .capability-filter, .filter-note, .reset-filters) {
  display: block;
}
body.gallery .market-layout.sidebar-layout .model-probe .probe-chart {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 2em;
}
@media (max-width: 40.625rem) {
  body.gallery
    .market-layout.sidebar-layout[data-sidebar-overlay="true"]
    .market-filters {
    position: fixed;
    inset: calc(var(--portal-header-height) + 0.75rem) auto auto 3%;
    width: min(88%, 20rem);
    max-height: calc(100dvh - var(--portal-header-height) - 1.5rem);
    overflow-y: auto;
  }
}
@media (max-width: 37.5rem) {
  body.gallery.sidebar-layout .console-overview-grid .console-surface {
    padding-inline: 1rem;
  }
  body.gallery.sidebar-layout #usage-chart .live-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    padding-inline: 0;
  }
  body.gallery.sidebar-layout #usage-chart .live-chart > div {
    min-width: 0;
  }
}

body.gallery
  .market-layout.sidebar-layout
  .filter-items
  button
  > .filter-label {
  font: inherit;
  color: inherit;
  background: transparent;
  padding: 0;
  margin: 0;
  border-radius: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.gallery
  .market-layout.sidebar-layout[data-sidebar-collapsed="false"]
  .filter-items
  button
  > span,
body.gallery
  .market-layout.sidebar-layout[data-sidebar-collapsed="false"]
  .market-filters
  h3 {
  display: block;
}

/* Compact defaults and one fixed control position across all product sidebars. */
body.gallery .portal-sidebar{display:flex;flex-direction:column;min-inline-size:0}
body.gallery .sidebar-content{flex:1 1 auto;min-block-size:0;min-inline-size:0;display:flex;flex-direction:column;overflow:auto;scrollbar-width:thin;scrollbar-color:#d5d9e5 transparent;overscroll-behavior:contain}
body.gallery .sidebar-content>*{flex-shrink:0}
body.gallery .sidebar-toolbar{margin-block-end:.75rem;padding-inline:.65rem;min-block-size:2rem}
body.gallery .sidebar-toolbar>span{color:#596476;font-size:var(--text-sm);font-weight:550}
body.gallery .sidebar-bottom-controls{display:flex;align-items:center;gap:.25rem;flex:0 0 auto;min-inline-size:0;padding-block:.55rem max(.55rem,env(safe-area-inset-bottom));border-block-start:.0625rem solid #e2e5ed;background:inherit}
body.gallery .sidebar-bottom-controls .sidebar-toggle{display:flex;align-items:center;justify-content:flex-start;gap:.65rem;flex:1 1 auto;inline-size:auto;block-size:auto;min-block-size:2.75rem;min-inline-size:0;overflow:hidden;padding:.55rem .7rem;border-radius:.6rem;color:#4f5c70;font-size:var(--text-sm);line-height:1.5}
body.gallery .sidebar-toggle svg,body.gallery .sidebar-reset svg{inline-size:1.15rem;block-size:1.15rem;flex:none;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
body.gallery .sidebar-toggle-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-inline-size:0}
body.gallery .sidebar-reset{flex:0 0 auto;display:grid;place-items:center;inline-size:2.3rem;block-size:2.75rem;color:#667184;border-radius:.6rem;transition:background-color 160ms,color 160ms}
body.gallery .sidebar-reset:hover{background:#eeedf7;color:#54428f}
body.gallery .sidebar-reset:focus-visible{outline:.125rem solid #7663b0;outline-offset:-.125rem}
body.gallery .sidebar-resize-handle{inline-size:.75rem;inset-inline-end:-.375rem}
body.gallery .sidebar-resize-handle::after{inset-inline:43%;border-radius:1rem}
body.gallery .sidebar-layout:not([data-sidebar-overlay="true"]) .sidebar-bottom-controls .sidebar-toggle{box-shadow:none}
body.gallery [data-sidebar-collapsed="true"]>.portal-sidebar .sidebar-toggle-label,
body.gallery[data-sidebar-collapsed="true"] .workspace-sidebar .sidebar-toggle-label,
body.gallery [data-sidebar-collapsed="true"] .sidebar-bottom-controls .sidebar-reset{display:none}
body.gallery[data-sidebar-collapsed="true"] .workspace-sidebar .sidebar-reset{display:none}
body.gallery [data-sidebar-collapsed="true"] .sidebar-bottom-controls .sidebar-toggle,
body.gallery[data-sidebar-collapsed="true"] .workspace-sidebar .sidebar-bottom-controls .sidebar-toggle{justify-content:center;padding-inline:0;gap:0}
body.gallery [data-sidebar-collapsed="true"] .sidebar-toolbar,
body.gallery[data-sidebar-collapsed="true"] .workspace-sidebar .sidebar-toolbar{display:none}
body.gallery.workspace-active .workspace-layout{display:grid;grid-template-columns:minmax(0,var(--workspace-sidebar-size)) minmax(0,1fr);align-items:start;transition:grid-template-columns 240ms cubic-bezier(.22,.8,.25,1)}
body.gallery.workspace-active .workspace-sidebar{position:sticky;inset:auto;inset-block-start:var(--portal-header-height);grid-column:1;grid-row:1;align-self:start;width:100%;inline-size:100%;block-size:calc(100dvh - var(--portal-header-height));height:calc(100dvh - var(--portal-header-height));padding:.85rem .75rem 0;overflow:visible;transition:none}
body.gallery.workspace-active .workspace-sidebar>.sidebar-content{overflow:hidden}
body.gallery.workspace-active .workspace-sidebar .sidebar-content>nav{flex:1 1 auto;min-block-size:0;padding-block-end:1rem;gap:.15rem}
body.gallery.workspace-active .workspace-sidebar .sidebar-content>nav>.workspace-link,
body.gallery.workspace-active .workspace-sidebar .workspace-nav-group>summary{padding:.65rem .75rem;min-block-size:2.75rem;margin:.1rem 0;border-radius:.65rem;gap:.65rem;font-size:var(--text-sm)!important;color:#414c60;line-height:1.5}
body.gallery.workspace-active .workspace-sidebar .workspace-link.active{color:#54408f;background:#eae7f4;font-weight:550}
body.gallery.workspace-active .workspace-sidebar .workspace-platform-divider{margin:.7rem .5rem;height:.0625rem}
body.gallery.workspace-active .workspace-sidebar .workspace-management-label{padding:.45rem .75rem .65rem}
body.gallery.workspace-active .workspace-sidebar .workspace-return{margin-block-end:.4rem!important}
body.gallery.workspace-active .workspace-sidebar .workspace-nav-children{margin-inline-start:1.2rem;padding-inline-start:.6rem;overflow:hidden}
body.gallery.workspace-active .workspace-sidebar .workspace-nav-children .workspace-link{padding:.6rem .65rem;min-block-size:2.6rem;border-radius:.6rem;font-size:var(--text-sm)!important}
body.gallery.workspace-active .workspace-main{grid-column:2;grid-row:1;margin:0;inline-size:auto;width:auto;min-inline-size:0;padding-inline:clamp(1rem,2.5%,2rem);transition:none}
body.gallery.workspace-active .management-savebar{left:calc(var(--workspace-sidebar-size) + 2%);right:2%}
body.gallery.workspace-active .workspace-sidebar .workspace-sidebar-footer{display:none!important}
body.gallery[data-sidebar-collapsed="true"] .workspace-sidebar{padding-inline:.4rem}
body.gallery[data-sidebar-collapsed="true"] .workspace-sidebar nav :is(.workspace-link,.workspace-nav-group>summary){justify-content:center;padding-inline:0;gap:0}
body.gallery[data-sidebar-collapsed="true"] .workspace-sidebar .workspace-nav-children{margin:0;padding:.4rem;overflow:auto}
body.gallery[data-sidebar-collapsed="true"] .workspace-sidebar .workspace-nav-children .workspace-link{justify-content:flex-start;padding:.65rem .75rem;gap:.65rem}
body.gallery[data-sidebar-collapsed="true"] .workspace-nav-group[open] .workspace-nav-children{animation:sidebar-flyout-in 150ms cubic-bezier(.2,.8,.2,1)}
body.gallery .workspace-nav-group>summary>span{flex:1;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.gallery .workspace-nav-group>summary .workspace-icon{inline-size:1.1rem;block-size:1.1rem}
body.gallery .docs-layout.sidebar-layout,
body.gallery .market-layout.sidebar-layout,
body.gallery .refined-try.sidebar-layout{transition:grid-template-columns 240ms cubic-bezier(.22,.8,.25,1)}
body.gallery .docs-layout .docs-sidebar{block-size:calc(100dvh - var(--portal-header-height));padding:1rem .75rem 0;overflow:visible!important}
body.gallery .docs-sidebar .sidebar-content{overflow:hidden}
body.gallery .docs-sidebar #docs-nav{flex:1;min-block-size:0;overflow:auto;scrollbar-width:thin;padding-block-end:1rem}
body.gallery .docs-nav-group{margin-block:1rem}
body.gallery .docs-nav-group>h2{padding-inline:.65rem;margin-block-end:.5rem}
body.gallery .docs-nav-group a{padding:.65rem;gap:.65rem;border-radius:.6rem;min-block-size:2.75rem}
body.gallery .docs-nav-group a>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.gallery .docs-layout .docs-main{padding-inline:clamp(1rem,2.5%,2rem)}
body.gallery .refined-try.sidebar-layout .try-sidebar{padding:1rem .75rem 0;overflow:visible;max-block-size:calc(100dvh - var(--portal-header-height) - 2rem)}
body.gallery .refined-try .sidebar-content{overflow:hidden}
body.gallery .refined-try .try-sidebar>.sidebar-content{flex:1 1 auto;min-block-size:0;overflow:auto}
body.gallery .refined-try .sidebar-content .chat-sidebar-top{padding:.3rem .65rem .7rem;margin-block-end:.25rem}
body.gallery .refined-try .sidebar-content .chat-sidebar-top h2{font-size:var(--text-base);color:#41495c}
body.gallery .refined-try .portal-kind-nav{margin-block:0 .8rem;padding-block:0 .6rem;gap:.2rem}
body.gallery .refined-try .portal-kind-nav button{padding:.6rem .75rem;gap:.65rem;min-block-size:2.75rem;margin:0;border-radius:.65rem;font-size:var(--text-sm);text-align:left;justify-content:flex-start}
body.gallery .refined-try .portal-kind-nav button>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-inline-size:0}
body.gallery .refined-try .new-chat-button{padding:.6rem .75rem;margin-block:.2rem .75rem;min-block-size:2.75rem;font-size:var(--text-sm);border-radius:.65rem}
body.gallery .refined-try .history-search{margin-block:0 .5rem;padding:.5rem .65rem}
body.gallery .refined-try .history-section-title{padding-inline:.65rem;margin-block:.5rem}
body.gallery .refined-try .try-history{flex:1 1 auto;min-block-size:0;overflow:auto;padding-block-end:.75rem;scrollbar-width:thin}
body.gallery .refined-try .chat-sidebar-bottom{margin-block-start:0;padding-block:.5rem;flex:none}
body.gallery .refined-try .chat-sidebar-bottom a{padding-inline:.65rem;gap:.65rem;justify-content:flex-start;font-size:var(--text-sm)}
body.gallery .refined-try .chat-sidebar-bottom a>span{min-inline-size:0;margin-inline-start:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
body.gallery .market-layout.sidebar-layout .market-filters{display:flex;flex-direction:column;position:sticky;inset-block-start:calc(var(--portal-header-height) + 1rem);block-size:calc(100dvh - var(--portal-header-height) - 2rem);padding:.5rem .6rem 0;overflow:visible}
body.gallery .market-layout .market-filters .sidebar-content{padding-inline:.2rem}
body.gallery .market-layout .filter-items button{padding:.65rem .6rem;min-block-size:2.75rem;border-radius:.65rem}
body.gallery .market-layout .market-filters .sidebar-content h3{margin-block:1rem .5rem}
body.gallery [data-sidebar-collapsed="true"] .portal-sidebar{padding-inline:.4rem}
body.gallery [data-sidebar-collapsed="true"] .portal-sidebar .sidebar-content>.chat-sidebar-top{display:none!important}
body.gallery .refined-try[data-sidebar-collapsed="true"] .portal-kind-nav button,
body.gallery .refined-try[data-sidebar-collapsed="true"] .chat-sidebar-bottom a{justify-content:center;padding-inline:0;gap:0}
body.gallery .refined-try[data-sidebar-collapsed="true"] .new-chat-button{margin-block:.5rem .75rem}
body.gallery [data-sidebar-resizing="true"],body.gallery[data-sidebar-resizing="true"] .workspace-layout{transition:none!important}
@keyframes sidebar-label-in{from{opacity:0;transform:translateX(-.3rem)}to{opacity:1;transform:none}}
@keyframes sidebar-flyout-in{from{opacity:0;transform:translateX(-.3rem)}to{opacity:1;transform:none}}
body.gallery [data-sidebar-motion="expand"] .sidebar-content :is(.workspace-link>span,.workspace-nav-group>summary>span,.docs-nav-group a>span,.portal-kind-nav button>span),
body.gallery[data-sidebar-motion="expand"] .workspace-sidebar .sidebar-content :is(.workspace-link>span,.workspace-nav-group>summary>span){animation:sidebar-label-in 120ms ease-out 110ms backwards}
@media(max-width:50rem){
 body.gallery.workspace-active .workspace-layout{--workspace-sidebar-size:var(--sidebar-rail-size)}
 body.gallery.workspace-active .workspace-main{grid-column:2;margin:0;width:auto;padding-inline:clamp(.75rem,3%,1.25rem)}
 body.gallery.workspace-active .workspace-sidebar{position:fixed;inset:var(--portal-header-height) auto 0 0;inline-size:var(--sidebar-rail-size);block-size:calc(100dvh - var(--portal-header-height));padding:.65rem .4rem 0;transform:none;transition:inline-size 220ms cubic-bezier(.22,.8,.25,1)}
 body.gallery.workspace-active[data-sidebar-overlay="true"] .workspace-sidebar{inline-size:min(86%,18rem);width:min(86%,18rem);padding-inline:.75rem}
 body.gallery.workspace-active[data-sidebar-overlay="true"] .workspace-backdrop{left:min(86%,18rem)}
 body.gallery .docs-layout.sidebar-layout[data-sidebar-mobile="true"],body.gallery .refined-try.sidebar-layout[data-sidebar-mobile="true"],body.gallery .market-layout.sidebar-layout[data-sidebar-mobile="true"]{--sidebar-current-size:var(--sidebar-rail-size)}
 body.gallery .refined-try.sidebar-layout[data-sidebar-mobile="true"] .try-sidebar{display:flex;position:sticky;inset:auto;inset-block-start:var(--portal-header-height);grid-column:1;grid-row:1;inline-size:100%;padding:.6rem .4rem 0;border-inline-end:.0625rem solid #e4e5ef}
 body.gallery .refined-try.sidebar-layout[data-sidebar-mobile="true"] .try-main{grid-column:2;width:auto;padding-inline:.75rem}
 body.gallery .refined-try.sidebar-layout[data-sidebar-overlay="true"] .try-sidebar{position:absolute;inset:0 auto 0 0;inline-size:min(88%,18rem);width:min(88%,18rem);height:100%;padding-inline:.75rem;z-index:20;background:#fafafe;box-shadow:.7rem 0 2rem #2520311a}
 body.gallery .refined-try.sidebar-layout .chat-sidebar-bottom{display:block}
 body.gallery .refined-try.sidebar-layout .portal-kind-nav{display:grid}
 body.gallery .market-layout.sidebar-layout .market-filters{inset-block-start:calc(var(--portal-header-height) + .75rem)}
 body.gallery .market-layout.sidebar-layout[data-sidebar-overlay="true"] .market-filters{position:fixed;inset:calc(var(--portal-header-height) + .75rem) auto auto 3%;inline-size:min(88%,18rem);width:min(88%,18rem);max-block-size:calc(100dvh - var(--portal-header-height) - 1.5rem);padding-inline:.75rem;z-index:20;background:#fff}
 body.gallery .docs-layout[data-sidebar-overlay="true"] .docs-sidebar{inline-size:min(88%,18rem);padding-inline:.75rem}
 body.gallery .market-layout.sidebar-layout[data-sidebar-collapsed="false"] .market-filters .sidebar-content :is(h3,.capability-filter,.filter-note,.reset-filters){display:block}
}
@media(prefers-reduced-motion:reduce){body.gallery .sidebar-layout,body.gallery .workspace-layout,body.gallery .portal-sidebar,body.gallery .sidebar-layout *,body.gallery .workspace-sidebar *{animation:none!important;transition:none!important}}
body.gallery.workspace-active .workspace-sidebar .sidebar-content>.sidebar-toolbar{padding-inline:.75rem}
body.gallery[data-sidebar-mobile="true"] .sidebar-resize-handle{display:none}

body.gallery.workspace-active .workspace-sidebar .sidebar-content>nav>*{flex:0 0 auto}

body.gallery .refined-try.sidebar-layout .sidebar-bottom-controls #collapse-history{display:flex;flex:1 1 auto;inline-size:auto;block-size:auto;min-block-size:2.75rem;padding:.55rem .7rem}
body.gallery .refined-try.sidebar-layout[data-sidebar-collapsed="true"] .sidebar-bottom-controls #collapse-history{justify-content:center;padding-inline:0}
body.gallery [data-sidebar-motion="expand"] .sidebar-toggle-label,body.gallery[data-sidebar-motion="expand"] .workspace-sidebar .sidebar-toggle-label{animation:sidebar-label-in 120ms ease-out 110ms backwards}
