/* The shared application frame: the sidebar beside the top bar and the screen it shows; the learning area and the
   editor each own their scrolling. Its colors are tokens of 01-tokens-and-base.css. */
:root {
  --nav-width: 220px;
}
.app {
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100dvh;
  min-height: 0;
  background: var(--canvas);
}
.app > .topbar,
.app > .banners,
.app > #main-content,
.app > .values {
  grid-column: 2;
}
#main-content {
  min-height: 0;
  min-width: 0;
  grid-row: 3;
  outline: none;
}
#learning {
  height: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
}
#main-content > .panes {
  height: 100%;
  min-width: 0;
}
.app:not([data-screen='explorer']) > .values {
  display: none;
}
.work-nav {
  grid-area: 1 / 1 / 5 / 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--nav-bg);
  border-right: 1px solid var(--rule);
  padding: 0 16px;
  z-index: 5;
}
.work-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 75px;
  flex: none;
  text-decoration: none;
  white-space: nowrap;
  color: var(--heading);
  font-size: 20px;
  letter-spacing: -1px;
  font-weight: 740;
  padding-left: 8px;
}
.work-brand strong {
  font-weight: 540;
}
.work-brand img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}
#work-links {
  display: flex;
  flex-direction: column;
  overflow: auto;
  flex: 1;
  padding-bottom: 18px;
}
.work-nav-group {
  margin-top: 24px;
}
/* The names of the sidebar's groups and the small labels above a pane: in sentence case, as every other text. */
.work-nav-group h2,
.work-kicker {
  font: 600 12px/1.5 var(--ui);
  color: var(--ink-3);
}
.work-nav-group h2 {
  margin: 0 0 8px 13px;
}
.work-nav-group:last-child {
  margin-top: auto;
  padding-top: 30px;
}
.work-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  font: 500 14px/1.3 var(--ui);
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  color: var(--ink-2);
  background: transparent;
  text-decoration: none;
  text-align: left;
  padding: 9px 13px;
  cursor: pointer;
  white-space: nowrap;
}
.work-nav-item .work-icon {
  color: var(--ink-3);
}
.work-nav-item:hover,
.work-nav-item:focus-visible {
  background: var(--surface-2);
  color: var(--ink);
}
.work-nav-item[aria-current='page'] {
  background: var(--nav-sel);
  color: var(--accent);
  font-weight: 650;
}
.work-nav-item[aria-current='page'] .work-icon {
  color: var(--accent);
}
.work-nav-item [data-nav-label] {
  display: flex;
  gap: 6px;
  align-items: center;
}
.work-nav-item .dot.off {
  display: none;
}
.work-nav-item .badge {
  margin: 0;
  font: 600 10px/16px var(--mono);
  height: 16px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  color: var(--ink-3);
}
.work-icon {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}
.app .topbar {
  height: 64px;
  padding: 0 clamp(18px, 3vw, 48px);
  gap: 14px;
  flex-wrap: nowrap;
  min-width: 0;
  align-items: center;
  background: var(--surface);
  overflow: visible;
}
.work-crumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
}
.work-crumb strong {
  font-weight: 600;
  color: var(--ink);
}
.work-crumb > span:nth-child(2) {
  color: var(--rule-strong);
}
.work-search,
.tool-icon {
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}
.work-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 6px 10px;
  font-size: 12px;
  min-height: 32px;
}
.work-search kbd {
  font: 500 10px var(--mono);
  color: var(--ink-3);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  padding: 2px 4px;
  border-radius: 4px;
}
.topbar .env {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  order: initial;
  border-radius: 20px;
  background: var(--nav-sel);
  color: var(--accent);
  font-size: 11.5px;
  padding: 4px 10px;
}
.topbar .env::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.topbar .env.live {
  background: var(--err-tint);
  color: var(--err);
}
.topbar .conn {
  order: initial;
  max-width: 180px;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 550;
  min-height: 32px;
}
.topbar .conn-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.conn .dot.bad {
  background: var(--ink-3);
}
.conn .dot.bad.failed {
  background: var(--err);
}
.mobile-menu,
.nav-scrim {
  display: none;
}
.skip-main {
  position: fixed;
  top: -5rem;
  left: 10px;
  z-index: 30;
  padding: 8px;
  background: var(--surface);
}
.skip-main:focus {
  top: 8px;
}
/* The explorer trades the full navigation column for a compact rail so JSON and responses have room. */
@media (min-width: 761px) {
  .app[data-screen='explorer'] {
    --nav-width: 68px;
  }
  .app[data-screen='explorer'] .work-nav {
    padding: 0 10px;
  }
  .app[data-screen='explorer'] .work-nav-group h2,
  .app[data-screen='explorer'] .work-brand span,
  .app[data-screen='explorer'] .work-nav-item [data-nav-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .app[data-screen='explorer'] .work-nav-item,
  .app[data-screen='explorer'] .work-brand {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
}
.app[data-screen='explorer'] .cat-head::before {
  content: 'API endpoints';
  display: block;
  margin: 0 0 12px;
  color: var(--heading);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.035em;
}
.request .work-kicker {
  margin-bottom: 8px;
  color: var(--accent);
}
.request .req-title h2 {
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.04em;
}
.request .summary {
  line-height: 1.65;
}
.exchange .response-empty {
  max-width: 470px;
  margin: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.response-empty h2 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.035em;
  margin: 14px 0 8px;
}
.response-empty p {
  line-height: 1.6;
}
.response-empty .work-text-link {
  display: flex;
  margin-top: 10px;
}
dialog {
  box-shadow: 0 22px 80px #071c2333;
  border-color: var(--rule);
}
dialog::backdrop {
  background: #061c1b80;
  backdrop-filter: blur(2px);
}
.dlg-head h2 {
  letter-spacing: -0.03em;
}
.find-body {
  padding: 18px 22px 22px;
}
#work-find {
  width: min(580px, calc(100vw - 24px));
}
#work-query {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  padding: 10px 12px;
}
#find-results {
  max-height: 48vh;
  overflow: auto;
}
.find-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--rule);
}
.find-row:hover,
.find-row:focus-visible {
  background: var(--nav-sel);
}
.find-row strong,
.find-row small {
  display: block;
}
.find-row small {
  color: var(--ink-3);
}
@media (max-width: 1020px) {
  .app {
    --nav-width: 188px;
  }
  .work-nav {
    padding: 0 10px;
  }
  .work-brand {
    font-size: 18px;
  }
  .work-crumb {
    gap: 8px;
  }
  .app .topbar {
    gap: 9px;
  }
}
@media (max-width: 820px) {
  #main-content > .panes {
    height: auto;
    min-height: 100%;
  }
  #main-content {
    overflow: auto;
  }
  .app > .values {
    position: static;
  }
}
@media (max-width: 760px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .app > .topbar,
  .app > .banners,
  .app > #main-content,
  .app > .values {
    grid-column: 1;
  }
  .app .topbar {
    height: 55px;
    padding: 0 14px;
    gap: 8px;
  }
  .work-nav {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(267px, 83vw);
    padding: 0 17px;
    z-index: 15;
    box-shadow: var(--shadow);
  }
  .work-nav.visible {
    display: flex;
  }
  .nav-scrim:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: #0d201b70;
    z-index: 14;
    border: 0;
  }
  .mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 34px;
    height: 34px;
  }
  .work-crumb {
    font-size: 12px;
  }
  .work-crumb > span,
  .work-search span,
  .work-search kbd {
    display: none;
  }
  .work-search {
    padding: 0;
    justify-content: center;
    width: 34px;
    height: 34px;
  }
  .topbar .conn {
    max-width: 105px;
    padding: 5px 7px;
  }
  .work-nav-group:last-child {
    padding-top: 15px;
  }
  .work-nav-group {
    margin-top: 14px;
  }
  .work-brand {
    height: 58px;
  }
}
@media (max-width: 355px) {
  .work-crumb {
    display: none;
  }
}
/* Keep the chapter in view while navigating a long guide. */
.mobile-chapters {
  display: none;
}
#guide .gd-page .gd-head h3 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.045em;
  margin-bottom: 8px;
  color: var(--heading);
}
#guide .gd-head .help {
  font-size: 15px;
  line-height: 1.6;
}
#guide .gd-nav-pages .fl-nav[aria-current='true'] {
  background: var(--nav-sel);
  border-color: transparent;
}
#guide .gd-page .sub-h {
  letter-spacing: -0.02em;
}
#setup .su-panel h3 {
  font-size: clamp(23px, 2vw, 30px);
  letter-spacing: -0.035em;
}
#guide .gd-glossary dd {
  line-height: 1.6;
}
@media (max-width: 820px) {
  #guide .gd-nav-pages {
    display: none;
  }
  .mobile-chapters {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    width: 100%;
    font-size: 12px;
    color: var(--ink-2);
  }
  .mobile-chapters select {
    min-width: 0;
    max-width: 100%;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-radius: 6px;
    font: inherit;
  }
}
#group-filter {
  width: 100%;
  max-width: 100%;
  margin: 7px 0;
  padding: 5px 7px;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--ink-2);
}
#pane-jump {
  display: none;
}
.response-context {
  padding-top: 15px;
  border-top: 1px solid var(--rule);
  margin-top: 18px;
}
.response-context strong {
  color: var(--heading);
}
.response-context p {
  margin: 4px 0 0;
}
.exchange > .work-kicker {
  margin-bottom: 8px;
}
@media (max-width: 820px) {
  .app[data-screen='explorer'] #pane-jump {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    padding: 5px;
    gap: 10px;
  }
  #pane-jump button {
    min-height: 30px;
    padding: 3px 13px;
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 5px;
    color: var(--ink-2);
    font-size: 12px;
    cursor: pointer;
  }
  #request,
  #exchange {
    scroll-margin-top: 42px;
  }
}

@media (max-width: 760px) {
  .connect-qualifier {
    display: none;
  }
}

.workspace-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 36px;
  color: var(--ink-2);
}
