/* Lists Simulator — JS-style layout */

.lists-app {
  display: grid;
  grid-template-areas:
    "header header"
    "side center"
    "side code";
  grid-template-columns: 280px 1fr 320px;
  gap: 20px;
  min-height: calc(100vh - 120px);
}

.lists-main {
  display: contents;
}

.lists-side {
  grid-area: side;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.lists-center {
  grid-area: center;
}

.lists-code {
  grid-area: code;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.lists-viz {
  min-height: 200px;
}

.list-demo {
  background: var(--surface-solid);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
}

.list-demo ul,
.list-demo ol {
  padding-right: 25px;
  margin: 10px 0;
}

.list-demo li {
  padding: 6px 0;
  color: var(--text);
}

.list-demo dl {
  margin: 10px 0;
}

.list-demo dt {
  font-weight: bold;
  color: var(--accent);
  margin-top: 10px;
}

.list-demo dd {
  color: var(--text-muted);
  margin-right: 20px;
}

.code-box {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  direction: ltr;
  text-align: left;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

@media (max-width: 1024px) {
  .lists-app {
    grid-template-areas:
      "header"
      "side"
      "center"
      "code";
    grid-template-columns: 1fr;
  }
  
  .lists-side,
  .lists-center,
  .lists-code {
    position: static;
  }
}