/* Unified grid layout for docs site */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "header header"
    "sidebar content";
  min-height: 100vh;
}
.docs-header {
  grid-area: header;
  padding: 1.5em 2em 1em 2em;
  background: #fff;
  border-bottom: 1px solid #eee;
  z-index: 2;
}
.sidebar {
  grid-area: sidebar;
  background: #fafbfc;
  border-right: 1px solid #eee;
  padding: 2em 1em 2em 2em;
  min-width: 200px;
  max-width: 260px;
  height: 100%;
}
#docs-root {
  grid-area: content;
  padding: 2em 2em 2em 2em;
  background: #fff;
  min-width: 0;
  min-height: 0;
}
#content-area {
  width: 100%;
  min-height: 400px;
  background: none;
  position: relative;
  z-index: 1;
  padding-right: 0;
}
body {
  font-family: system-ui, sans-serif;
  background: #f9f9f9;
  line-height: 1.6;
  margin: 0;
  height: 100vh;
  overflow: hidden;
}

h1,
h2,
h3 {
  color: #333;
}

code {
  /* background: #eee; */
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: monospace;
}

pre {
  background: #282c34;
  color: #f8f8f2;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
  margin-bottom: 2rem;
}

.card {
  background: white;
  padding: 1rem;
  margin-bottom: 2rem;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  background: #ddd;
  color: #333;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 5px;
}

.state {
  background: #cce5ff;
  color: #004085;
}
.logic {
  background: #d4edda;
  color: #155724;
}
.view {
  background: #f8d7da;
  color: #721c24;
}
.docs-header {
  background: #222;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 37px;
}
.docs-header h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: #ffd700;
  text-shadow: 0 2px 8px #000, 0 0 2px #ffd700;
}
.docs-nav {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.docs-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}
.docs-nav a:hover {
  text-decoration: underline;
}


.docs-layout {
  display: flex;
  gap: 2rem;
  padding: 1rem;
  margin-top: 70px;
  height: calc(100vh - 70px);
}
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: fixed;
  top: 70px;
  left: 0;
  bottom: 0;
  background: #f4f4f4;
  border-right: 1px solid #ccc;
  padding: 1rem;
  height: calc(100vh - 70px);
  overflow-y: auto;
  z-index: 99;
}
.sidebar h3 {
  margin-top: 0;
}
.sidebar ul {
  list-style: none;
  padding-left: 0;
}
.sidebar li {
  margin-bottom: 0.5rem;
}
.sidebar a {
  color: #0077cc;
  text-decoration: none;
}
.sidebar a:hover {
  text-decoration: underline;
}


main#docs-root {
  flex: 1;
  margin-left: 240px;
  height: 100%;
  overflow-y: auto;
  padding-right: 2rem;
}
