/* ==========================================================================
   Trellara docs — layout only. Tokens, type and components come from
   ../site.css, which this file is always loaded after.
   ========================================================================== */

.docs-shell {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 0; max-width: 1320px; margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 44px);
}
@media (min-width: 1000px) {
  .docs-shell { grid-template-columns: 250px minmax(0, 1fr) 200px; gap: clamp(30px, 4vw, 56px); }
}

/* ---- sidebar ---- */
.docs-side {
  padding: 34px 0 60px; align-self: start;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 1000px) {
  .docs-side {
    position: sticky; top: 74px; max-height: calc(100vh - 90px);
    overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--line);
    padding-right: 20px;
  }
}
.docs-side h2 {
  margin: 24px 0 8px; font-family: var(--mono); font-size: 0.76rem;
  font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--faint);
}
.docs-side h2:first-child { margin-top: 0; }
.docs-side ul { list-style: none; margin: 0; padding: 0; }
.docs-side li { margin: 0; }
.docs-side a, .docs-side span.todo {
  display: block; padding: 5px 0 5px 12px; font-size: 0.885rem;
  text-decoration: none; border-left: 2px solid transparent; line-height: 1.45;
}
.docs-side a { color: var(--dim); }
.docs-side a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.docs-side a[aria-current="page"] {
  color: var(--brand); border-left-color: var(--brand); font-weight: 600;
}
.docs-side span.todo { color: #43505c; cursor: default; }
.docs-side span.todo::after {
  content: "coming soon"; display: block; font-family: var(--mono);
  font-size: 0.76rem; color: #36414c; margin-top: 1px;
}
.side-note {
  margin: 30px 0 0; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface);
  font-size: 0.815rem; color: var(--faint); line-height: 1.6;
}

/* ---- article ---- */
.docs-main { padding: 34px 0 90px; min-width: 0; }
.docs-crumb {
  font-family: var(--mono); font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--brand);
  margin: 0 0 14px;
}
.docs-main h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.16;
  margin: 0 0 16px; max-width: 22ch;
}
.docs-audience {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline;
  margin: 0 0 28px; padding: 11px 15px;
  border: 1px solid var(--line); border-left: 2px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface);
  font-size: 0.865rem; color: var(--dim);
}
.docs-audience b {
  font-family: var(--mono); font-size: 0.79rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--brand);
}
.docs-main h2 {
  font-size: clamp(1.15rem, 1.9vw, 1.42rem); margin: 46px 0 14px;
  padding-top: 22px; border-top: 1px solid var(--line); line-height: 1.3;
}
.docs-main h3 { font-size: 1.02rem; margin: 30px 0 10px; font-weight: 640; }
.docs-main p { margin: 0 0 16px; color: var(--dim); font-size: 0.955rem; max-width: 72ch; }
.docs-main p.first { font-size: 1.05rem; color: var(--ink); max-width: 68ch; }
.docs-main ul, .docs-main ol { margin: 0 0 18px; padding-left: 20px; max-width: 72ch; }
.docs-main li { margin-bottom: 7px; color: var(--dim); font-size: 0.94rem; }
.docs-main strong { color: var(--ink); font-weight: 620; }
.docs-main a { color: var(--brand); text-decoration-color: rgba(109,141,255,0.4); text-underline-offset: 3px; }

.docs-main table {
  width: 100%; border-collapse: collapse; margin: 6px 0 22px; font-size: 0.885rem;
}
.docs-table-wrap { overflow-x: auto; margin-bottom: 22px; }
.docs-table-wrap table { margin-bottom: 0; min-width: 480px; }
.docs-main th {
  text-align: left; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 0.775rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint);
  vertical-align: bottom;
}
.docs-main td {
  padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line);
  color: var(--dim); vertical-align: top; line-height: 1.55;
}
.docs-main td:first-child { color: var(--ink); }
.docs-main td code, .docs-main th code { white-space: nowrap; }

pre.code {
  margin: 0 0 22px; padding: 15px 17px; overflow-x: auto;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-family: var(--mono);
  font-size: 0.815rem; line-height: 1.7; color: var(--ink);
}
pre.code .c { color: var(--faint); }
pre.code .k { color: var(--brand); }
pre.code .g { color: var(--pass); }

.callout {
  margin: 0 0 24px; padding: 15px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); border-left: 2px solid var(--warn);
  background: var(--surface); max-width: 72ch;
}
.callout p { margin: 0; font-size: 0.905rem; }
.callout p + p { margin-top: 10px; }
.callout b.label {
  display: block; font-family: var(--mono); font-size: 0.775rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--warn); margin-bottom: 6px;
}
.callout--gap { border-left-color: var(--alert); }
.callout--gap b.label { color: var(--alert); }
.callout--ok { border-left-color: var(--pass); }
.callout--ok b.label { color: var(--pass); }

/* ---- on-this-page ---- */
.docs-toc { display: none; }
@media (min-width: 1000px) {
  .docs-toc {
    display: block; position: sticky; top: 74px; align-self: start;
    padding: 34px 0 0; max-height: calc(100vh - 90px); overflow-y: auto;
  }
}
.docs-toc h2 {
  margin: 0 0 10px; font-family: var(--mono); font-size: 0.76rem;
  font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint);
}
.docs-toc ul { list-style: none; margin: 0; padding: 0; }
.docs-toc a {
  display: block; padding: 4px 0; font-size: 0.845rem;
  color: var(--faint); text-decoration: none; line-height: 1.45;
}
.docs-toc a:hover { color: var(--ink); }

/* ---- prev / next ---- */
.docs-nextprev {
  display: grid; gap: 14px; margin-top: 56px; padding-top: 26px;
  border-top: 1px solid var(--line); grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 660px) { .docs-nextprev { grid-template-columns: 1fr 1fr; } }
.docs-nextprev a {
  display: block; padding: 15px 18px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); transition: border-color 0.15s;
}
.docs-nextprev a:hover { border-color: var(--line-strong); }
.docs-nextprev .dir {
  display: block; font-family: var(--mono); font-size: 0.775rem;
  color: var(--faint); margin-bottom: 4px;
}
.docs-nextprev .ttl { display: block; font-size: 0.95rem; color: var(--ink); font-weight: 600; }
.docs-nextprev .next { text-align: right; }

/* ---- path cards on the docs index ---- */
.paths { display: grid; gap: 16px; margin: 6px 0 30px; }
@media (min-width: 780px) { .paths { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.path {
  display: block; padding: 22px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); transition: border-color 0.15s, background 0.15s;
}
.path:hover { border-color: var(--brand); background: var(--surface-3); }
.path .who {
  font-family: var(--mono); font-size: 0.775rem; font-weight: 700;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--brand);
}
.path h3 { margin: 8px 0 8px; font-size: 1.05rem; font-weight: 640; color: var(--ink); }
.path p { margin: 0 0 12px; font-size: 0.89rem; color: var(--dim); line-height: 1.6; }
.path .cmd {
  display: block; font-family: var(--mono); font-size: 0.79rem; color: var(--info);
  overflow-wrap: anywhere;
}
