/* Documentation-first styles for /guide, built directly on style.css design tokens. */
.guide-shell{
  max-width:1040px;
  margin:0 auto;
  padding:20px 20px 72px;
  display:grid;
  gap:28px;
  grid-template-columns:1fr;
}
@media (min-width:960px){
  .guide-shell{
    grid-template-columns:216px minmax(0,1fr);
    gap:56px;
    align-items:start;
    padding-top:28px;
  }
}

/* Sticky sidebar table of contents on desktop, compact link row on mobile */
.guide-toc{min-width:0}
.guide-toc-title{
  font:800 15px/1.3 Nunito,Inter,system-ui,-apple-system,sans-serif;
  color:var(--text);
  margin:0 0 10px;
}
.guide-toc ol{
  list-style:none;
  margin:0;
  padding:12px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  display:flex;
  flex-wrap:wrap;
  gap:6px 18px;
}
.guide-toc a{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  font:600 15px/1.35 Inter,system-ui,-apple-system,sans-serif;
  color:var(--muted);
  text-decoration:none;
  transition:color .16s cubic-bezier(.22,1,.36,1);
}
.guide-toc a:hover{color:var(--primary)}
@media (min-width:960px){
  .guide-toc{position:sticky;top:28px}
  .guide-toc ol{
    flex-direction:column;
    flex-wrap:nowrap;
    gap:2px;
    padding:4px 0 4px 14px;
    border-top:0;
    border-bottom:0;
    border-left:1px solid var(--line);
  }
  .guide-toc a{min-height:34px}
}

/* Article body: strict 3-size body scale + 65ch prose line length */
.guide-article{min-width:0}
.guide-head{padding-bottom:28px}
.guide-head h1{
  font-size:clamp(34px,4.8vw,46px);
  line-height:1.08;
  letter-spacing:-0.025em;
  max-width:20ch;
}
.guide-lead{
  margin:14px 0 0;
  max-width:58ch;
  font-size:17px;
  line-height:1.6;
  color:var(--muted);
}

.guide-sec{
  border-top:1px solid var(--line);
  padding:36px 0 0;
  margin:36px 0 0;
}
.guide-sec h2{
  font-size:clamp(24px,3.2vw,30px);
  line-height:1.15;
  letter-spacing:-0.02em;
  margin:0 0 12px;
}
.guide-sec h3{
  font:800 17px/1.35 Nunito,Inter,system-ui,-apple-system,sans-serif;
  color:var(--text);
  margin:24px 0 8px;
}
.guide-sec p{
  margin:0 0 14px;
  max-width:65ch;
  font-size:17px;
  line-height:1.62;
  color:var(--muted);
}
.guide-sec p strong{color:var(--text);font-weight:600}
.guide-sec ul,.guide-sec ol{
  margin:0 0 18px;
  padding-left:22px;
  max-width:65ch;
  font-size:17px;
  line-height:1.62;
  color:var(--muted);
}
.guide-sec li{margin:8px 0}
.guide-sec li strong{color:var(--text);font-weight:600}
.guide-sec code{
  font:600 .88em ui-monospace,SFMono-Regular,Menlo,monospace;
  background:var(--soft);
  color:var(--text);
  padding:1px 6px;
  border-radius:6px;
}

.guide-callout{
  margin:20px 0 22px;
  max-width:65ch;
  background:var(--soft);
  border-left:3px solid var(--primary);
  border-radius:14px;
  padding:16px 20px;
}
.guide-callout p{
  margin:0;
  font-size:17px;
  line-height:1.58;
  color:var(--text);
}
.guide-callout p + p{margin-top:8px;color:var(--muted)}

/* Architecture diagram (SVG styled strictly via CSS classes for CSP) */
.arch-diagram{
  margin:24px 0 26px;
  padding:18px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
}
.arch-svg{width:100%;height:auto;display:block}
.svg-node{fill:var(--soft);stroke:var(--line);stroke-width:1.5}
.svg-node-accent{fill:var(--surface);stroke:var(--primary);stroke-width:2}
.svg-title{
  fill:var(--text);
  font:800 15px/1.2 Nunito,Inter,system-ui,-apple-system,sans-serif;
}
.svg-sub{
  fill:var(--muted);
  font:400 13px/1.3 Inter,system-ui,-apple-system,sans-serif;
}
.svg-label{
  fill:var(--primary);
  font:600 13px/1.2 Inter,system-ui,-apple-system,sans-serif;
}
.svg-wire{stroke:var(--primary);stroke-width:2;fill:none}
.svg-wire-muted{stroke:var(--muted);stroke-width:1.5;stroke-dasharray:4 4;fill:none}
.svg-head{fill:var(--primary)}
.arch-caption{
  margin:12px 0 0;
  font-size:15px;
  line-height:1.5;
  color:var(--muted);
}

/* Comparison & benchmark tables */
.guide-table-wrap{
  margin:20px 0 24px;
  overflow-x:auto;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
}
.guide-table-wrap:focus-visible{outline:3px solid var(--amber);outline-offset:3px}
.guide-table{
  width:100%;
  border-collapse:collapse;
  font-size:17px;
  line-height:1.5;
  font-variant-numeric:tabular-nums;
}
.guide-table th,.guide-table td{
  padding:14px 16px;
  text-align:left;
  vertical-align:top;
  border-bottom:1px solid var(--line);
}
.guide-table thead th{
  font-size:15px;
  font-weight:600;
  color:var(--muted);
}
.guide-table tbody th{
  font-weight:600;
  color:var(--text);
  min-width:165px;
}
.guide-table tbody td{color:var(--muted);min-width:190px}
.guide-table tbody tr:last-child > *{border-bottom:0}
.guide-table .col-cuety{background:var(--soft);color:var(--text)}
.guide-table thead .col-cuety{color:var(--primary);font-weight:800}

/* Tool breakdown list */
.tool-list{
  margin:20px 0 24px;
  max-width:65ch;
  border-bottom:1px solid var(--line);
}
.tool-item{
  border-top:1px solid var(--line);
  padding:14px 0;
}
.tool-item dt{
  font:600 17px/1.4 Inter,system-ui,-apple-system,sans-serif;
  color:var(--text);
  margin:0 0 4px;
}
.tool-item dd{
  margin:0;
  font-size:17px;
  line-height:1.58;
  color:var(--muted);
}

/* Sequential installation steps */
.install-steps{
  counter-reset:step;
  list-style:none;
  margin:20px 0 24px;
  padding:0;
  max-width:65ch;
  display:grid;
  gap:14px;
}
.install-steps li{
  counter-increment:step;
  position:relative;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px 20px 18px 66px;
  margin:0;
  box-shadow:var(--shadow);
}
.install-steps li::before{
  content:counter(step);
  position:absolute;
  left:18px;
  top:18px;
  width:34px;
  height:34px;
  border-radius:50%;
  background:var(--primary);
  color:var(--on-primary);
  display:grid;
  place-items:center;
  font:800 17px Nunito,Inter,system-ui,-apple-system,sans-serif;
  font-variant-numeric:tabular-nums;
}
.install-steps h3{margin:0 0 6px}
.install-steps p{margin:0;font-size:17px;line-height:1.58;color:var(--muted)}
.install-steps p + p{margin-top:8px}

.guide-cta{
  margin:22px 0 0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}
.guide-note{margin:0;font-size:15px;color:var(--muted)}
.guide-note a{color:var(--primary);font-weight:600;text-decoration:none}
.guide-note a:hover{text-decoration:underline;text-underline-offset:3px}

/* Troubleshooting details accordions */
.trouble{
  max-width:65ch;
  margin:20px 0 24px;
  display:grid;
  gap:12px;
}
.trouble details{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
}
.trouble summary{
  list-style:none;
  cursor:pointer;
  min-height:48px;
  padding:13px 54px 13px 20px;
  position:relative;
  display:flex;
  align-items:center;
  font:800 17px/1.35 Nunito,Inter,system-ui,-apple-system,sans-serif;
  color:var(--text);
}
.trouble summary::-webkit-details-marker{display:none}
.trouble summary::after{
  content:"+";
  position:absolute;
  right:20px;
  top:50%;
  transform:translateY(-50%);
  font:600 22px/1 Inter,system-ui,-apple-system,sans-serif;
  color:var(--primary);
}
.trouble details[open] summary::after{content:"\2212"}
.trouble summary:focus-visible{outline:3px solid var(--amber);outline-offset:2px;border-radius:20px}
.trouble details p,.trouble details ul{
  margin:0;
  padding:0 20px 18px;
  font-size:17px;
  line-height:1.58;
  color:var(--muted);
}
.trouble details ul{padding-left:40px}

@media (prefers-reduced-motion:reduce){
  .guide-toc a{transition:none}
}
