/* The user guide (guide.html): a sticky table of contents beside a readable column of task-oriented sections. */
.site-header--static { position: relative; border-bottom: 1px solid var(--c-line); }
.site-nav a[aria-current="page"] { color: var(--c-text); }

.guide-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--c-line);
  background: radial-gradient(50% 80% at 85% 0%, color-mix(in srgb, var(--c-orange) 12%, transparent), transparent 70%); }
.guide-hero h1 { font-size: clamp(44px, 7vw, 96px); line-height: .95; letter-spacing: -0.04em; margin-bottom: 20px; }
.guide-hero p { max-width: 62ch; font-size: clamp(17px, 1.4vw, 20px); color: var(--c-muted); margin: 0; }
.guide-hero .eyebrow { color: var(--c-orange); }

.guide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; padding-bottom: clamp(64px, 8vw, 120px); }
@media (min-width: 1000px) { .guide { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-top: 48px; } }

/* Table of contents: a collapsible block on small screens, a sticky column from 1000 px. */
.toc { font-size: 15px; }
.toc details { border: 1px solid var(--c-line); border-radius: 14px; background: var(--c-surface); }
.toc summary { cursor: pointer; padding: 14px 18px; font: 500 15px/1.3 var(--f-body); list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: '+'; font: 400 20px/1 var(--f-mono); color: var(--c-orange); }
.toc details[open] summary::after { content: '−'; }
.toc ol { list-style: none; margin: 0; padding: 4px 10px 14px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--c-muted); text-decoration: none; line-height: 1.35; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 400 12px/1.6 var(--f-mono); color: var(--c-dash); }
.toc a:hover, .toc a.is-current { color: var(--c-text); background: color-mix(in srgb, var(--c-text) 6%, transparent); }
.toc a.is-current::before { color: var(--c-orange); }
@media (min-width: 1000px) {
  .toc { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; }
  .toc details { border: 0; background: none; }
  .toc summary { padding: 0 8px 12px; font: 400 13px/1.4 var(--f-mono); color: var(--c-muted); min-height: 0; pointer-events: none; }
  .toc summary::after, .toc details[open] summary::after { content: none; }
  .toc ol { padding: 0; }
}

/* Sections */
.guide-body { max-width: 860px; min-width: 0; }
.guide-section { padding: 40px 0 8px; border-top: 1px solid var(--c-line); scroll-margin-top: 16px; }
.guide-section:first-child { border-top: 0; padding-top: 0; }
.guide-section > h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 16px; }
.guide-section h3 { font-size: clamp(20px, 2vw, 24px); margin: 36px 0 12px; scroll-margin-top: 16px; }
.guide-section p, .guide-section li { color: color-mix(in srgb, var(--c-text) 88%, var(--c-muted)); }
.guide-section a { color: var(--c-orange); text-underline-offset: 3px; }
.guide-section ul, .guide-section ol { padding-left: 1.3em; margin: 0 0 1em; }
.guide-section li { margin-bottom: .4em; }
.guide-section li::marker { color: var(--c-orange); }
.guide-section code { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 6px; padding: 1px 6px; font-size: .85em; overflow-wrap: anywhere; }
.guide-section .code code { background: none; border: 0; padding: 0; }
.lede { font-size: clamp(17px, 1.3vw, 19px); color: var(--c-muted) !important; max-width: 62ch; }
kbd { font: 400 .85em var(--f-mono); padding: 1px 6px; border: 1px solid var(--c-line); border-bottom-width: 2px; border-radius: 6px; background: var(--c-surface); color: var(--c-text); }

/* Steps: numbered, with the number as a ring. */
.steps { list-style: none; padding: 0 !important; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 14px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--c-orange) 60%, transparent); color: var(--c-orange); font: 500 13px/26px var(--f-mono); text-align: center; }

/* Screenshots */
.shot { margin: 24px 0 28px; }
.shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--c-line); background: #F4F4F4; }
.shot__open { display: block; cursor: zoom-in; border-radius: 12px; }
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--c-muted); }
.shot-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; margin: 24px 0 28px; align-items: start; }
.shot-row .shot { margin: 0; }
.shot--panel img { max-width: 368px; }
.shot--dark img { background: #111; }

/* Callouts */
.callout { margin: 20px 0 24px; padding: 16px 18px 16px 20px; border-radius: 14px; border: 1px solid var(--c-line); border-left: 3px solid var(--accent, var(--c-formats)); background: var(--c-surface); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout__label { display: block; margin-bottom: 4px; font: 500 12px/1.4 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent, var(--c-formats)); }
.callout--tip { --accent: var(--c-formats); }
.callout--limit { --accent: var(--c-agent); }
.callout--safe { --accent: var(--c-lang); }
.no-shot { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; border: 1px dashed var(--c-dash); font: 400 12px/1.6 var(--f-mono); color: var(--c-muted); vertical-align: middle; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; border: 1px solid var(--c-line); border-radius: 12px; }
.guide-section table { width: 100%; border-collapse: collapse; font-size: 15px; }
.guide-section th, .guide-section td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.guide-section th { font: 500 13px/1.4 var(--f-mono); color: var(--c-muted); background: var(--c-surface); }
.guide-section tr:last-child td { border-bottom: 0; }

.back-top { display: inline-block; margin-top: 24px; font-size: 14px; color: var(--c-muted) !important; }
