/* User guide page */
.guide-hero { padding: 52px 0 30px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fffdf9 0%, var(--bg) 100%); }
.guide-hero h1 { max-width: 22ch; }
.guide-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.guide-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.print-only { display: none; }

.guide-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding: 40px 0 70px; align-items: start; }
.toc { position: sticky; top: 88px; font-size: .9rem; }
.toc-title { font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; color: var(--muted); margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 7px; color: var(--muted); }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--navy-2); text-decoration: underline; }

.guide { max-width: 760px; font-size: 1.02rem; }
.guide section { padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.guide section:last-child { border-bottom: 0; }
.guide h2 { display: flex; align-items: center; gap: 12px; font-size: 1.6rem; margin: 0 0 16px; }
.guide h2 .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: var(--mint); font-size: 1rem; flex-shrink: 0; }
.guide h3 { font-size: 1.15rem; margin: 28px 0 10px; }
.guide p, .guide li { color: var(--ink); }
.guide ul, .guide ol { padding-left: 22px; }
.guide li { margin-bottom: 7px; }
.guide code { background: #efe9dd; padding: 1px 6px; border-radius: 5px; font-size: .9em; }

.steps { counter-reset: st; list-style: none; padding-left: 0 !important; }
.steps li { counter-increment: st; position: relative; padding-left: 40px; margin-bottom: 12px; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; background: var(--mint-soft); color: var(--navy); font-weight: 750; font-size: .85rem; display: grid; place-items: center; }

figure { margin: 18px 0 22px; }
figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.narrow-fig img { max-width: 360px; }
figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; }

.callout { background: var(--amber-soft); border: 1px solid #f1dfb2; border-left: 5px solid var(--amber); border-radius: 10px; padding: 14px 18px; margin: 18px 0; font-size: .96rem; }

table.simple { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: .94rem; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.simple th, table.simple td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.simple thead th { background: #f6f2ea; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--navy-2); }
table.simple tr:last-child td { border-bottom: 0; }

dl.qa { margin: 12px 0 18px; }
dl.qa dt { font-weight: 700; margin-top: 16px; }
dl.qa dd { margin: 6px 0 0; padding-left: 16px; border-left: 3px solid var(--mint); color: var(--ink-2); }
dl.qa dd ul { margin: 6px 0 0; }

@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
}

/* ---------- PDF / print ---------- */
@page { size: A4; margin: 16mm 15mm 18mm; }
@media print {
  body.guide-page { background: #fff; font-size: 10.5pt; }
  .guide-page .site-header, .guide-page .guide-actions .btn, .guide-page .toc a::after { display: none !important; }
  .guide-page .print-only { display: block; }
  .guide-hero { background: none; padding: 0 0 14px; border-bottom: 2px solid var(--navy); }
  .guide-hero h1 { font-size: 26pt; max-width: none; }
  .guide-layout { display: block; padding: 18px 0 0; }
  .toc { position: static; border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; margin-bottom: 22px; columns: 2; }
  .toc-title { column-span: all; }
  .guide { max-width: none; font-size: 10.5pt; }
  .guide section { break-before: auto; border: 0; margin-bottom: 18px; padding-bottom: 0; }
  .guide h2 { font-size: 16pt; break-after: avoid; }
  .guide h3 { break-after: avoid; }
  figure, table.simple, .callout, dl.qa dt { break-inside: avoid; }
  dl.qa dt { break-after: avoid; }
  figure { margin: 10px 0 14px; }
  figure img { box-shadow: none; max-height: 78mm; width: auto; max-width: 100%; }
  .narrow-fig img { max-height: 120mm; }
  figure.tall img { max-height: 175mm; }
  a { color: var(--navy-2); text-decoration: none; }
}
