/* GuiPro documentation layout */

.docs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 56rem;
}

@media (min-width: 960px) {
  .docs-layout--with-sidebar {
    grid-template-columns: 14rem minmax(0, 1fr);
    max-width: 72rem;
  }
}

.docs-sidebar {
  display: none;
}

@media (min-width: 960px) {
  .docs-sidebar {
    display: block;
    position: sticky;
    top: 5rem;
    align-self: start;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    font-size: 0.88rem;
  }
}

.docs-sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-sidebar nav li {
  margin-bottom: 0.35rem;
}

.docs-sidebar nav a {
  color: var(--muted);
  text-decoration: none;
}

.docs-sidebar nav a:hover,
.docs-sidebar nav a[aria-current="page"] {
  color: var(--accent);
}

.docs-sidebar nav a[aria-current="page"] {
  font-weight: 600;
}

.docs-main h1 {
  margin-bottom: 0.5rem;
}

.docs-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem;
}

.docs-toc h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  border: none;
  padding: 0;
}

.docs-toc ul {
  margin: 0;
  columns: 1;
}

@media (min-width: 640px) {
  .docs-toc ul {
    columns: 2;
    column-gap: 2rem;
  }
}

.docs-toc li {
  break-inside: avoid;
  margin-bottom: 0.35rem;
}

.docs-main pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.docs-main pre code {
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  color: var(--text);
}

.docs-main code:not(pre code) {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.9em;
  background: var(--surface-elevated);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.docs-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
}

.docs-main th,
.docs-main td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.docs-main th {
  background: var(--surface);
  font-weight: 600;
}

.docs-main tr:nth-child(even) td {
  background: var(--surface-elevated);
}

[data-theme="light"] .docs-main tr:nth-child(even) td {
  background: var(--surface-elevated);
}

.docs-main hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.docs-main .decision-tree {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.85rem;
  white-space: pre;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}
