/* Docs. Sticky contents rail, hairline sections, short blocks.
   Prose is capped at 68ch so nothing reads as a wall. */

.dgrid {
  display: grid; grid-template-columns: 178px minmax(0, 1fr);
  gap: 50px; padding: 34px 0 100px; align-items: start;
}

/* --------------------------------------------------------------- contents */

.toc { position: sticky; top: calc(var(--bar-h) + 26px); }
.toc-in { display: grid; gap: 1px; }
.toc a {
  padding: 6px 9px; border-radius: var(--r-xs);
  font-size: 12.5px; color: var(--txt-5);
  border-left: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.toc a:hover { color: var(--txt-2); background: var(--bg-2); }
.toc a.on { color: var(--accent); border-left-color: var(--accent); background: var(--bg-2); }

/* ------------------------------------------------------------------- body */

.doc { min-width: 0; max-width: 760px; }
.dhead { margin-bottom: 42px; }
.dhead p { margin-top: 9px; font-size: 14.5px; max-width: 64ch; line-height: 1.6; }

.doc section { margin-bottom: 54px; scroll-margin-top: calc(var(--bar-h) + 22px); }
.doc p { max-width: 68ch; margin-bottom: 12px; line-height: 1.62; color: var(--txt-2); }
.doc p b { color: var(--txt-hero); font-weight: 600; }
.doc .small { font-size: 12.3px; }
.doc .rule.tall { margin-top: 30px; }

.doc code {
  font: 400 12.4px 'Geist Mono', monospace; color: var(--txt-2);
  background: var(--bg-2); border: 1px solid var(--line-2);
  padding: 1px 6px; border-radius: var(--r-xs); white-space: nowrap;
}

/* ------------------------------------------------------------------ steps */

.steps { list-style: none; counter-reset: s; margin: 18px 0; padding: 0; display: grid; gap: 1px;
         background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.steps li {
  counter-increment: s; background: var(--bg-2); padding: 12px 15px 12px 40px;
  position: relative; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
}
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 15px; top: 14px;
  font: 500 9.5px 'Geist Mono', monospace; letter-spacing: .1em; color: #34343c;
}
.steps li span { font-size: 13px; color: var(--txt-3); flex: 1 1 260px; }
.steps.plain li { padding-left: 40px; }
.steps.plain li span { color: var(--txt-2); }

/* ------------------------------------------------------------------- note */

.note {
  display: grid; gap: 4px; padding: 13px 15px; margin: 18px 0;
  border-radius: var(--r); background: var(--bg-2);
  border: 1px solid var(--line-2); border-left: 2px solid var(--accent-line);
}
.note b { font-size: 13.2px; color: var(--txt-hero); font-weight: 600; }
.note span { font-size: 12.6px; color: var(--txt-3); line-height: 1.55; }
.note.warn { border-left-color: var(--warn); }

/* -------------------------------------------------------------------- kv */

.kv { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
      border-radius: var(--r); overflow: hidden; margin: 18px 0; }
.kv > div { background: var(--bg-2); padding: 10px 15px; display: flex; align-items: baseline;
            gap: 12px; flex-wrap: wrap; }
.kv .ml { flex: 0 0 104px; }
.kv em { font-style: normal; font-size: 12.2px; color: var(--txt-5); flex: 1 1 200px; }
.kv.wide .ml { flex: 0 0 84px; }

/* ------------------------------------------------------------------ jobs */

.jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(226px, 1fr)); gap: 8px; margin: 18px 0; }
.job {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 14px 15px; display: grid; gap: 6px; align-content: start;
  transition: border-color var(--t-fast), transform .2s var(--ease);
}
.job:hover { border-color: var(--line-3); transform: translateY(-1px); }
.job h3 { font-size: 13.5px; }
.job p { font-size: 12.4px; color: var(--txt-4); margin: 0; line-height: 1.5; }
.job .tag { justify-self: start; margin-top: 2px; }

/* ----------------------------------------------------------------- table */

.tbl { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 18px 0 8px; }
.tr { display: grid; grid-template-columns: 1fr 58px 78px 74px; gap: 10px;
      padding: 9px 15px; background: var(--bg-2); font-size: 12.8px; align-items: baseline; }
.tr + .tr { border-top: 1px solid var(--line); }
.tr span:not(:first-child) { text-align: right; color: var(--txt-4); }
.tr.th { background: var(--bg-3); }
.tr.th span { font: 500 9.5px 'Geist Mono', monospace; letter-spacing: .13em;
              text-transform: uppercase; color: var(--txt-5); }
.tr .hi { color: var(--accent); font-weight: 500; }

/* ---------------------------------------------------------------- limits */

.lims { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
        border-radius: var(--r); overflow: hidden; margin: 18px 0; }
.lim { background: var(--bg-2); padding: 12px 15px; display: grid; gap: 3px; }
.lim b { font-size: 13.2px; color: var(--txt); font-weight: 600; }
.lim span { font-size: 12.5px; color: var(--txt-4); line-height: 1.55; }

/* ------------------------------------------------------------------- faq */

.faq { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
       border-radius: var(--r); overflow: hidden; margin: 18px 0; }
.faq details { background: var(--bg-2); }
.faq summary {
  padding: 12px 15px; cursor: pointer; list-style: none;
  font-size: 13.2px; font-weight: 500; color: var(--txt-2);
  display: flex; align-items: center; gap: 10px;
  transition: color var(--t-fast), background var(--t-fast);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: '+'; font: 400 14px 'Geist Mono', monospace; color: var(--txt-5);
  transition: transform .26s var(--ease), color var(--t-fast);
}
.faq summary:hover { color: var(--txt-hero); }
.faq summary:hover::before { color: var(--accent); }
.faq details[open] summary::before { transform: rotate(45deg); color: var(--accent); }
.faq details p { padding: 0 15px 13px 38px; margin: 0; font-size: 12.8px; color: var(--txt-4);
                 line-height: 1.6; animation: panein .32s var(--ease); }

/* ----------------------------------------------------------------- foot */

.dfoot { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 22px;
         border-top: 1px solid var(--line-2); font-size: 11.8px; color: var(--txt-4); }

/* ----------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .dgrid { grid-template-columns: 1fr; gap: 22px; }
  .toc { position: static; }
  .toc-in { display: flex; gap: 4px; flex-wrap: wrap; }
  .toc a { border-left: 0; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 12px; }
  .toc a.on { border-color: var(--accent-line); }
  .toc .rule { display: none; }
}

@media (max-width: 640px) {
  .dgrid { padding: 22px 0 70px; }
  h1 { font-size: 23px; }
  .nav { display: none; }
  .tr { grid-template-columns: 1fr 40px 54px 50px; gap: 6px; padding: 9px 11px; font-size: 12px; }
  .doc section { margin-bottom: 40px; }
}
