/* Docs shell for CatalystCal — 3-column: nav / article / on-this-page */
.docshell {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr) 195px;
  gap: 2.6rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.2rem 1.5rem 3.5rem;
}

/* ---------------- left: sidebar */
.docside { position: sticky; top: 1.2rem; align-self: start; max-height: calc(100vh - 2.4rem); overflow: auto; }
.docsearch {
  width: 100%;
  background: #14110d;
  border: 1px solid #2b261e;
  color: var(--ink, #f4ede2);
  border-radius: 9px;
  padding: .5rem .75rem;
  font: inherit;
  font-size: .85rem;
  margin-bottom: 1.1rem;
}
.docsearch:focus { outline: none; border-color: #C2410C; }
.docgroup { margin-bottom: 1.15rem; }
.docgroup-label {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a7f6e;
  margin-bottom: .35rem;
}
.docnavlink {
  display: block;
  padding: .34rem .6rem;
  border-radius: 8px;
  color: #cfc4b3;
  text-decoration: none;
  font-size: .88rem;
  line-height: 1.35;
}
.docnavlink:hover { background: #1a160f; color: #fff; }
.docnavlink.on { background: rgba(194, 65, 12, .16); color: #ff9a62; font-weight: 600; }
.docnavlink.hidden { display: none; }

/* ---------------- center: article */
.docart { min-width: 0; }
.docart h1 { font-size: 2.15rem; margin: 0 0 .4rem; }
.docart h2 {
  font-size: 1.28rem;
  margin: 2.4rem 0 .8rem;
  padding-top: 1.4rem;
  border-top: 1px solid #241f18;
  scroll-margin-top: 1.2rem;
}
.docart h3 { font-size: 1.02rem; margin: 1.6rem 0 .6rem; scroll-margin-top: 1.2rem; }
.docart p, .docart li { color: #cfc4b3; line-height: 1.75; }
.docart a { color: #ff9a62; }
.docart code {
  font-family: "IBM Plex Mono", monospace;
  font-size: .82em;
  background: #191510;
  border: 1px solid #2b261e;
  border-radius: 6px;
  padding: .08rem .35rem;
}
.docart ul, .docart ol { padding-left: 1.25rem; }
.docart li { margin: .3rem 0; }

.doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: .9rem; margin: 1.2rem 0; }
.doc-card {
  border: 1px solid #2b261e;
  background: #12100c;
  border-radius: 12px;
  padding: 1rem 1.05rem;
  text-decoration: none;
  display: block;
  transition: border-color .15s ease;
}
.doc-card:hover { border-color: #C2410C; }
.doc-card b { display: block; color: #f4ede2; margin-bottom: .3rem; }
.doc-card span { color: #9a8f7d; font-size: .85rem; line-height: 1.5; display: block; }

.doc-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .92rem; }
.doc-table th, .doc-table td { border: 1px solid #2b261e; padding: .5rem .7rem; text-align: left; color: #cfc4b3; }
.doc-table th { background: #191510; color: #f4ede2; font-weight: 600; }
.doc-table td:first-child { white-space: nowrap; }

.doc-note {
  border: 1px solid rgba(194, 65, 12, .45);
  background: rgba(194, 65, 12, .07);
  border-radius: 12px;
  padding: .9rem 1.05rem;
  margin: 1.2rem 0;
}
.doc-note p { margin: 0; }

/* ---------------- right: on this page */
.doctoc { position: sticky; top: 1.2rem; align-self: start; font-size: .8rem; }
.doctoc-title {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a7f6e;
  margin-bottom: .5rem;
}
.toclink { display: block; color: #9a8f7d; text-decoration: none; padding: .22rem 0 .22rem .7rem; border-left: 1px solid #2b261e; line-height: 1.4; }
.toclink:hover { color: #ff9a62; }
.toclink.h3 { padding-left: 1.3rem; }

@media (max-width: 1080px) {
  .docshell { grid-template-columns: 215px minmax(0, 1fr); }
  .doctoc { display: none; }
}
@media (max-width: 800px) {
  .docshell { grid-template-columns: 1fr; gap: 1.4rem; }
  .docside { position: static; max-height: none; }
}
