/* Docs: left nav tree (the shell's menu), content column, "on this page" rail on wide screens. */
.doc-wrap { display: grid; grid-template-columns: minmax(0, 760px) 220px; justify-content: center; gap: 56px; padding: 44px 40px 64px; }
.doc { min-width: 0; }
.doc-crumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.doc-crumb a { text-underline-offset: 4px; }
.doc h1 { font: 800 clamp(36px, 4vw, 52px)/1.05 var(--display); letter-spacing: -.05em; }
.doc .lead { margin-top: 16px; font-size: 19px; line-height: 1.55; color: var(--ink); }
.doc h2 { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); font: 700 27px/1.2 var(--display); letter-spacing: -.035em; }
.doc h3 { margin-top: 28px; font: 600 19px/1.3 var(--display); letter-spacing: -.02em; }
.doc p, .doc li { font-size: 16.5px; line-height: 1.68; }
.doc p { margin-top: 14px; }
.doc ul, .doc ol { margin: 14px 0 0; padding-left: 22px; }
.doc ul { list-style: disc; }
.doc ol { list-style: decimal; }
.doc li + li { margin-top: 6px; }
.doc li::marker { color: var(--red); }
.doc a { text-underline-offset: 4px; }
.doc a:hover { color: var(--red); }
.doc strong { font-weight: 600; }
.doc code { font: 400 .88em/1.5 var(--mono); background: var(--wash); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.doc pre { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); overflow-x: auto; font: 400 13px/1.6 var(--mono); }
.doc pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.doc table { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: 15px; font-variant-numeric: var(--nums); }
.doc th, .doc td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.doc th { font-size: 13px; font-weight: 500; color: var(--muted); background: var(--wash); }
.doc .table-scroll { overflow-x: auto; }
.note { margin-top: 20px; padding: 16px 18px; border-left: 3px solid var(--red); border-radius: 0 6px 6px 0; background: var(--white); font-size: 15.5px; line-height: 1.6; }
.note p:first-child { margin-top: 0; }
.note b, .note strong { font-weight: 600; }
.steps-list { counter-reset: s; list-style: none !important; padding: 0 !important; }
.steps-list > li { position: relative; padding: 0 0 0 46px; margin-top: 18px !important; }
.steps-list > li::before { counter-increment: s; content: "0" counter(s); position: absolute; left: 0; top: 1px; color: var(--red); font-size: 14px; font-weight: 500; }
.steps-list b { font-weight: 600; }
.addr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.addr-row code { background: none; padding: 0; font-size: 13px; }
.addr-row a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.addr-row .k { width: 100%; font-size: 13px; color: var(--muted); }
.split-table td:first-child { white-space: nowrap; font-weight: 500; }
.faq dt { margin-top: 26px; font: 600 18px/1.35 var(--display); letter-spacing: -.015em; }
.faq dd { margin: 8px 0 0; }
.faq dd p:first-child { margin-top: 0; }

/* receipt checker (draw page) */
.verify { margin-top: 20px; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); }
.verify label { display: block; font-size: 14px; font-weight: 500; }
.verify-row { display: flex; gap: 8px; margin-top: 8px; }
.verify select, .verify input { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid #aeafa3; border-radius: 6px; background: var(--white); color: var(--ink); font: inherit; font-size: 15px; }
.verify .btn { min-height: 48px; padding: 0 18px; font-size: 15px; }
.verify-or { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.verify-out { margin-top: 16px; font-size: 15px; line-height: 1.6; }
.verify-out:empty { display: none; }
.verify-out .ok { color: #1f7a3d; font-weight: 600; }
.verify-out .bad { color: var(--red); font-weight: 600; }
.verify-out ol { margin-top: 8px; font-size: 14px; }
.verify-out code { font-size: 12.5px; }

/* prev / next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.pager a { display: flex; flex-direction: column; gap: 4px; min-height: 76px; justify-content: center; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); text-decoration: none; }
.pager a:hover { border-color: #aeafa3; }
.pager a span { font-size: 13px; color: var(--muted); }
.pager a b { font: 600 17px var(--display); letter-spacing: -.02em; color: var(--ink); }
.pager .next { grid-column: 2; text-align: right; }
.doc-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.doc-foot a { text-underline-offset: 4px; }

/* on this page */
.toc { position: sticky; top: calc(var(--banner-h) + 44px); align-self: start; max-height: calc(100svh - var(--banner-h) - 64px); overflow-y: auto; }
.toc-k { font-size: 12px; color: var(--muted); padding-bottom: 8px; }
.toc ol { border-left: 1px solid var(--border); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--red); }

/* the nav tree: plain text, the current page by weight, color and a thin rule */
.side .doc-group { margin: 20px 0 4px; font-size: 12px; color: var(--muted); }
.side .doc-link { position: relative; display: flex; align-items: center; min-height: 32px; font-size: 14.5px; color: var(--muted); text-decoration: none; }
.side .doc-link:hover { color: var(--ink); }
.side .doc-link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.side .doc-link[aria-current="page"]::before { content: ""; position: absolute; left: -20px; top: 8px; bottom: 8px; width: 2px; background: var(--red); }
.side .back { display: flex; align-items: center; gap: 8px; min-height: 34px; font-size: 14px; color: var(--muted); text-decoration: none; }
.side .back:hover { color: var(--ink); }
.side .back svg { width: 16px; height: 16px; }

@media (max-width: 1240px) {
  .doc-wrap { grid-template-columns: minmax(0, 760px); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .side .doc-link[aria-current="page"]::before { left: -24px; top: 12px; bottom: 12px; }
}
@media (max-width: 760px) {
  .doc-wrap { padding: 28px 16px 48px; }
  .doc .lead { font-size: 17px; }
  .doc h2 { margin-top: 36px; padding-top: 22px; font-size: 23px; }
  .doc p, .doc li { font-size: 16px; }
  .doc table { font-size: 14px; }
  .doc th, .doc td { padding: 9px 8px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .verify-row { flex-direction: column; }
}
