/* Help & docs pages. Loaded after style.css and reuses its colour variables. Mobile first. */

.docs { padding: 32px 0 72px; }
.docs :focus-visible { outline: 3px solid rgba(242, 96, 26, .5); outline-offset: 2px; border-radius: 4px; }

/* page head */
.docs__head { max-width: 70ch; margin-bottom: 28px; }
.docs__head h1 { margin-bottom: .3em; }
.docs__head .lead { margin: 0 0 1em; }
.docs__quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.docs__quick li { margin: 0; }
.docs__quick a { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .92rem; color: var(--navy); text-decoration: none; }
.docs__quick a:hover { border-color: var(--orange); color: var(--orange-dark); }

/* layout: top list on phones, sticky left column from 980px */
.docs__grid { display: block; }
.toc { margin-bottom: 32px; }
.toc__box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.toc__box summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 14px 0; list-style: none; position: relative; padding-right: 30px; }
.toc__box summary::-webkit-details-marker { display: none; }
.toc__box summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 1.4rem; color: var(--orange-dark); transition: transform .2s; }
.toc__box[open] summary::after { transform: rotate(45deg); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc__box > ol { padding-bottom: 12px; }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 10px; margin-left: -10px; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.35; }
.toc a:hover { color: var(--orange-dark); background: #fff6ef; }
.toc a[aria-current="true"] { border-left-color: var(--orange); color: var(--navy); font-weight: 700; background: #fff6ef; }
.toc ol ol { display: none; }

/* readable text column */
.docs__body { min-width: 0; }
.docs__body > section { margin-bottom: 56px; }
.docs__body h2 { text-align: left; font-size: clamp(1.55rem, 3vw, 1.95rem); margin: 0 0 .6em; padding-top: 4px; scroll-margin-top: 84px; }
.docs__body h3 { font-size: 1.2rem; margin: 2em 0 .5em; scroll-margin-top: 84px; }
.docs__body h4 { font-size: 1.02rem; color: var(--navy); margin: 1.4em 0 .3em; }
.docs__body p, .docs__body ul, .docs__body ol, .docs__body dl { max-width: 70ch; }
.docs__body ul { padding-left: 1.3em; }
.docs__body li { margin-bottom: .45em; }
.docs__body li > ul, .docs__body li > ol { margin-top: .45em; }
.docs__body strong { color: var(--navy); }
.docs__body .muted { color: var(--muted); }
.docs__body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.docs__body a { text-underline-offset: 2px; }
.docs__body code, .docs__body kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .05em .4em; overflow-wrap: anywhere; }
.docs__body kbd { border-bottom-width: 2px; }

/* callouts */
.note, .tip, .warn { max-width: 70ch; background: #fff; border: 1px solid var(--line); border-left-width: 5px; border-radius: 12px; padding: 12px 18px; margin: 1.3em 0; }
.note > :last-child, .tip > :last-child, .warn > :last-child { margin-bottom: 0; }
.note::before, .tip::before, .warn::before { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.note { border-left-color: var(--navy); }
.note::before { content: "Good to know"; color: var(--navy); }
.tip { border-left-color: var(--ok); }
.tip::before { content: "Tip"; color: #17713f; }
.warn { border-left-color: var(--warn); background: #fff9ec; }
.warn::before { content: "Careful"; color: #8a5a00; }

/* numbered how-to steps (not the home page .steps grid) */
.howto { list-style: none; counter-reset: step; padding: 0; margin: 1em 0 1.5em; }
.howto > li { counter-increment: step; position: relative; padding: 3px 0 0 48px; margin: 0 0 1em; min-height: 34px; }
.howto > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem; }
.howto > li p { margin-bottom: .5em; }

/* screenshots */
.shot { margin: 1.6em 0; max-width: 100%; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: #f3ece4; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(8, 20, 39, .1); object-fit: cover; color: var(--muted); font-size: .85rem; }
.shot figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); text-align: center; max-width: 70ch; margin-left: auto; margin-right: auto; }

/* tables */
.table-wrap { max-width: 100%; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 1.2em 0 1.6em; }
.table-wrap table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .94rem; }
.table-wrap caption { text-align: left; padding: 12px 16px 4px; font-weight: 700; color: var(--navy); }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid #f1ebe4; }
.table-wrap thead th { background: #fff6ef; color: var(--navy); border-top: 0; font-size: .85rem; letter-spacing: .02em; }
.table-wrap tbody th { color: var(--navy); font-weight: 700; }
.table-wrap td p, .table-wrap td ul { margin: 0; }
.table-wrap td code { white-space: nowrap; }
.vars td:first-child, .vars th:first-child { white-space: nowrap; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.tag--on { background: #e3f4ea; color: #14602f; }
.tag--off { background: #eceef2; color: #444c5a; }
.tag--always { background: #fde9dc; color: #8a3408; }

/* FAQ (reuses the accordion look from style.css) */
.docs .faq { padding: 0; max-width: 76ch; }
.docs .faq details p, .docs .faq details ul, .docs .faq details ol { color: var(--ink); margin: 0 0 .9em; }
.docs .faq details > :last-child { margin-bottom: 0; padding-bottom: 18px; }
.docs .faq details summary { padding-top: 16px; padding-bottom: 16px; }
.docs .faq details ul, .docs .faq details ol { padding-left: 1.2em; }
.docs .faq details[id]:target { border-color: var(--orange); }

/* closing call to action */
.docs-cta { max-width: 70ch; background: var(--navy); color: #fff; border-radius: 20px; padding: 32px 28px; text-align: center; }
.docs-cta h2 { color: #fff; text-align: center; margin-bottom: .3em; font-size: 1.6rem; }
.docs-cta p { color: #c9d1de; margin: 0 auto 1.2em; }
.docs-cta .btn:focus-visible { outline-color: #fff; }

@media (min-width: 980px) {
	.docs { padding-top: 48px; }
	.docs__grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
	.toc { position: sticky; top: 88px; max-height: calc(100vh - 108px); overflow-y: auto; margin-bottom: 0; padding-right: 8px; }
	.toc__box { background: transparent; border: 0; border-radius: 0; padding: 0; }
	.toc__box summary { cursor: default; padding: 0 0 8px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
	.toc__box summary::after { display: none; }
	.toc ol ol { display: block; margin: 0 0 6px 8px; }
	.toc ol ol a { font-size: .88rem; color: var(--muted); padding-top: 3px; padding-bottom: 3px; }
	.toc ol ol a[aria-current="true"] { color: var(--navy); }
	.docs__body > section { margin-bottom: 72px; }
}

@media print {
	.top, .toc, .docs-cta, .foot { display: none; }
	.docs__grid { display: block; }
	.shot img { box-shadow: none; }
}
