:root {
  --bg: #ffffff;
  --sidebar: #13e58a;
  --sidebar-text: #0b0c0c;
  --sidebar-muted: rgba(11, 12, 12, 0.62);
  --sidebar-border: #13e58a;
  --card: #2b333b;
  --text: #1a1f24;
  --link: #0b0c0c;
  --accent: #0a0000;
  --border: #e6e8eb;
  --toc-active: #3b82f6;
  --max: 1100px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.layout--home {
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 1rem 0.65rem 2rem;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--sidebar-border);
}

.sidebar--home {
  display: flex;
  flex-direction: column;
}

.sidebar a {
  color: var(--sidebar-text);
  text-decoration: none;
  display: block;
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
  font-size: 0.92rem;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.sidebar-logo {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0 !important;
  margin: 0.15rem 0.35rem 0.45rem;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
}

.sidebar-logo:hover {
  background: rgba(0, 0, 0, 0.08);
}

.sidebar-logo img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.sidebar-header .home-link {
  font-size: 0.9rem;
  padding: 0.25rem 0.6rem;
}

.product-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.35rem 0.6rem 0.55rem;
}

.product-icon {
  display: inline-flex;
  flex: 0 0 auto;
  line-height: 0;
}

.env-switch {
  position: relative;
  margin: 0.15rem 0 0.5rem;
  border-top: 1px solid rgba(11, 12, 12, 0.18);
  border-bottom: 1px solid rgba(11, 12, 12, 0.18);
}

.env-switch__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  border: 0;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.env-switch__btn:hover {
  background: rgba(0, 0, 0, 0.14);
}

.env-switch__icon {
  display: inline-flex;
  line-height: 0;
  opacity: 0.9;
}

.env-switch__label {
  flex: 1;
  font-size: 0.92rem;
}

.env-switch__chevron {
  font-size: 0.75rem;
  opacity: 0.75;
}

.env-switch__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 1px);
  z-index: 5;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #0fef95;
  border: 1px solid rgba(11, 12, 12, 0.18);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.env-switch__menu [role="option"] {
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.env-switch__menu [role="option"]:hover,
.env-switch__menu [role="option"][aria-selected="true"] {
  background: rgba(255, 255, 255, 0.4);
}

.section--nested {
  margin-top: 0.45rem;
  opacity: 0.9;
}

.op-link {
  display: flex !important;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 0.82rem !important;
  line-height: 1.3;
}

.method {
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.85;
  min-width: 2.4rem;
}

.method-get { color: #0b5e2b; }
.method-post { color: #0b3d8c; }
.method-put, .method-patch { color: #8a5a00; }
.method-delete { color: #8a1010; }

.content--api {
  max-width: none !important;
  width: 100%;
  padding: 0 !important;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.content--api .topbar {
  flex: 0 0 auto;
}

.content--api elements-api {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: auto;
}

.topbar {
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 420px;
  color: #6b7280;
}

.topbar-search__icon {
  display: inline-flex;
  line-height: 0;
  flex: 0 0 auto;
}

.topbar-search input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  padding: 0.35rem 0;
}

.topbar-search input::placeholder {
  color: #9ca3af;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-filter-empty {
  margin: 0.5rem 0.6rem;
  font-size: 0.85rem;
  color: var(--sidebar-muted);
}

.nav-group {
  margin: 0.15rem 0;
}

.nav-group__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  list-style: none;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sidebar-text);
}

.nav-group__summary::-webkit-details-marker {
  display: none;
}

.nav-group__summary:hover {
  background: rgba(0, 0, 0, 0.1);
}

.nav-group__title {
  flex: 1;
  min-width: 0;
}

.nav-group__chevron {
  font-size: 0.7rem;
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.nav-group[open] > .nav-group__summary .nav-group__chevron {
  transform: rotate(180deg);
}

.nav-group__items {
  display: flex;
  flex-direction: column;
  padding: 0.1rem 0 0.25rem 0.35rem;
}

.nav-group__items .op-link {
  padding-left: 0.5rem;
}

.sidebar .section {
  margin-top: 0.85rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  font-weight: 700;
}

.content {
  padding: 1.5rem 2rem 3rem;
  max-width: none;
  background: #fff;
}

.content--home {
  padding: 2.5rem 3rem 4rem;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 2rem;
  align-items: start;
  max-width: 1100px;
}

.doc-main {
  min-width: 0;
  max-width: 760px;
}

.doc-toc {
  position: sticky;
  top: 1.25rem;
  border-left: 1px solid #e5e7eb;
  padding-left: 0.85rem;
}

.doc-toc__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.doc-toc__link {
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.35;
  text-decoration: none;
}

.doc-toc__link--h3 {
  padding-left: 0.65rem;
}

.doc-toc__link:hover {
  color: #111827;
  text-decoration: none;
}

.doc-toc__link.is-active {
  color: var(--toc-active);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--toc-active);
  padding-left: 0.55rem;
  margin-left: -0.85rem;
}

.content article {
  line-height: 1.65;
}

.content article h1 { margin-top: 0; }
.content article pre,
.content article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
.content article pre {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
}
.content article table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  background: #fff;
}
.content article th,
.content article td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

.content--home h1 {
  margin: 0 0 1.5rem;
  font-size: 1.85rem;
}

@media (max-width: 960px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc { display: none; }
}

.home-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.home-copy {
  max-width: 500px;
  padding: 0.5rem 0.5rem 0 0;
}

.home-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.home-card {
  display: block;
  padding: 3rem 2rem;
  border: 2px solid var(--card);
  border-radius: 5px;
  background: var(--card);
  color: #fff !important;
  font-weight: 500;
  min-width: 250px;
  text-align: center;
  box-shadow: 0 0 13px -3px rgb(0 0 0 / 50%);
  text-decoration: none !important;
}

.home-card:hover {
  filter: brightness(1.08);
}

.api-shell {
  height: 100vh;
  margin: 0;
}

.api-shell elements-api {
  display: block;
  height: 100vh;
}

.note {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #e8f1ff;
  border-radius: 6px;
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
  }
}
