/* Shared masthead, theme, typography and footer come unchanged from site.css. */
.docs-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: var(--column-gap);
  align-items: start;
}
.sidebar { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; }
.nav-group { margin-bottom: 28px; }
.nav-group > p {
  margin: 0 0 12px;
  color: var(--muted);
  font: 600 .75rem/1.5 var(--font-display);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-group a { display: block; padding: 9px 12px; border-left: 1px solid transparent; font-size: .9rem; line-height: 1.5; text-decoration: none; }
.nav-group a:hover { background: var(--surface); text-decoration: underline; }
.nav-group a[aria-current] { border-color: var(--ink); background: var(--surface); font-weight: 700; }
.mobile-menu { display: none; }
#article { min-width: 0; }
.lead { margin: 32px 0 0; color: var(--muted); font-size: 1.2rem; line-height: var(--body-leading); }
.article-body { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); font-size: var(--body-size); line-height: var(--body-leading); }
.article-body p { margin: 0 0 1.4em; }
.article-body h2 { font: 500 1.65rem/1.3 var(--font-display); margin: var(--article-space) 0 24px; }
.article-body > h2:first-child { margin-top: 0; }
.note { border-left: 1px solid var(--ink); padding-left: 20px; margin: 28px 0; font-size: 1rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 24px 48px; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 2px; font: 500 .8rem/1.8 monospace; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 32px; }
.guide-card { border-top: 1px solid var(--line); padding: 24px 0; display: flex; justify-content: space-between; gap: 16px; align-items: center; text-decoration: none; line-height: 1.5; }
.guide-card:hover { text-decoration: underline; }
figure { margin: 28px 0; }
.screen-button { display: block; background: transparent; border: 0; padding: 0; cursor: zoom-in; width: fit-content; max-width: 100%; margin: 0 auto; }
.screen-button img { display: block; width: auto; max-width: 100%; height: auto; max-height: 540px; object-fit: contain; }
figcaption { color: var(--muted); font-size: .8rem; margin-top: 12px; line-height: 1.6; }
.code-wrap { background: var(--surface); border: 1px solid var(--line); margin: 24px 0; padding: 44px 20px 20px; position: relative; }
.code-wrap pre { margin: 0; overflow: auto; white-space: pre; font-size: .875rem; line-height: 1.8; }
.copy-code { position: absolute; top: 10px; right: 12px; border: 0; background: none; color: var(--muted); font-size: .75rem; cursor: pointer; }
.copy-code:hover { color: var(--ink); }
.screenshot-note { font-size: .8rem; color: var(--muted); line-height: 1.7; margin-top: 36px; }
.skip { position: fixed; top: -100px; padding: 14px; background: var(--paper); z-index: 10; }
.skip:focus { top: 0; }
.image-dialog { max-width: min(1200px, 94vw); max-height: 94vh; background: var(--paper); color: var(--ink); border: 1px solid var(--line); padding: 20px; }
.image-dialog::backdrop { background: #000a; }
.image-dialog img { display: block; max-width: 100%; max-height: 76vh; object-fit: contain; margin: auto; }
.image-dialog p { font-size: .8rem; }
.dialog-close { display: block; margin: 0 0 15px auto; background: none; color: inherit; border: 1px solid var(--line); padding: 10px; cursor: pointer; }
@media (max-width: 850px) {
  .docs-layout { grid-template-columns: 1fr; gap: 32px; }
  .sidebar { position: static; max-height: none; }
  .mobile-menu { display: flex; justify-content: space-between; width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 16px; font: inherit; cursor: pointer; }
  body.js #docs-nav { display: none; }
  body.js .sidebar.open #docs-nav { display: grid; grid-template-columns: 1fr 1fr; padding-top: 24px; gap: 12px; }
  .lead { font-size: 1.08rem; }
}
@media (max-width: 430px) {
  .guide-grid { grid-template-columns: 1fr; }
  .note { padding-left: 16px; }
}
@media print {
  .sidebar, .masthead-controls, .primary-nav, .copy-code, .site-footer { display: none; }
  .docs-layout { display: block; }
  .screen-button img { max-height: 350px; }
  .note, figure { break-inside: avoid; }
}
