/* freePanel docs. Built on the promo site's style.css (loaded first): same fonts, colours, header and light/dark tokens.
   No inline styles anywhere, so the pages keep style-src 'self'. */

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html { scroll-padding-top: 1.25rem; }
body { overflow-wrap: break-word; }

/* header: the promo header, with the docs label and the search box */
.docs-head { position: relative; }
.docs-home { color: var(--amber); font: 400 1.5rem/1 var(--serif); text-decoration: none; padding: .35rem .25rem; margin-left: -1rem; }
.docs-home:hover { text-decoration: underline; }
.docs-head nav { flex: 1; }
.search { position: relative; flex: 0 1 18rem; min-width: 0; }
.search-field { display: flex; align-items: center; gap: .5rem; background: var(--graphite-2); border: 1px solid var(--graphite-line); border-radius: 10px; padding: 0 .75rem; color: var(--on-graphite-muted); }
.search-field:focus-within { border-color: var(--amber); }
.search-field .icon { width: 1.1rem; height: 1.1rem; }
.search input { flex: 1; min-width: 0; min-height: 2.6rem; background: transparent; border: 0; color: var(--on-graphite); font: 400 1rem/1.2 var(--sans); padding: 0; }
.search input::placeholder { color: var(--on-graphite-muted); opacity: 1; }
.search input:focus-visible { outline: none; }
.search-field:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.search-results { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 30; width: min(28rem, calc(100vw - 2.5rem)); max-height: 70vh; overflow-y: auto; background: var(--card); color: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); --focus: var(--accent-text); }
.search-results:empty { display: none; }
.search-results ul, .search-page { list-style: none; margin: 0; padding: 0; }
.search-results a, .search-page a { display: block; padding: .65rem 1rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.search-results li:last-child a { border-bottom: 0; }
.search-results a:hover, .search-results a:focus-visible, .search-page a:hover { background: var(--sunken); }
.search-results a:focus-visible { outline-offset: -3px; }
.search-results b, .search-page b { display: block; font-weight: 600; }
.search-results small, .search-page small { display: block; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.search-results p { margin: 0; padding: .75rem 1rem; color: var(--muted); }
.search-page { margin-top: 1rem; border-top: 1px solid var(--line); }
@media (max-width: 52rem) {
  .docs-head nav { flex: 1 1 100%; order: 3; }
  .docs-head .nav { flex-wrap: wrap; }
  .search { order: 4; flex: 1 1 100%; margin: .35rem 0 .15rem; }
  .search-results { left: 0; right: auto; width: 100%; }
  .docs-home { order: 1; }
}

/* the two columns: the page menu and the page */
.docs { display: grid; gap: 0 3rem; padding-top: 1.5rem; padding-bottom: 4rem; }
.nav-side { display: none; }
@media (min-width: 64rem) {
  .docs { grid-template-columns: 15.5rem minmax(0, 1fr); padding-top: 2.5rem; }
  .nav-small { display: none; }
  .nav-side { display: block; position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow-y: auto; padding: 0 .5rem 1rem 0; grid-row: 1; grid-column: 1; }
  .docs > main { grid-column: 2; grid-row: 1; }
}
.nav-part { font: 600 .82rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.4rem 0 .4rem; }
.nav-part:first-child { margin-top: 0; }
.nav-part.is-here { color: var(--accent-text); }
.nav-side ul, .nav-list ul { list-style: none; margin: 0; padding: 0; }
.nav-side a, .nav-list a { display: block; padding: .32rem .7rem; margin-left: -.7rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .97rem; line-height: 1.35; }
.nav-side a:hover, .nav-list a:hover { background: var(--card); }
.nav-side a[aria-current="page"], .nav-list a[aria-current="page"] { background: var(--card); color: var(--accent-text); font-weight: 600; box-shadow: inset 3px 0 0 var(--amber); }
.nav-small { border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); margin-bottom: 1.5rem; }
.nav-small summary { display: flex; align-items: center; gap: .6rem; min-height: 2.9rem; padding: .5rem 1rem; cursor: pointer; font-weight: 600; list-style: none; }
.nav-small summary::-webkit-details-marker { display: none; }
.nav-small summary .icon { width: 1.25rem; height: 1.25rem; color: var(--accent-text); }
.nav-small[open] summary { border-bottom: 1px solid var(--line); }
.nav-list { padding: .25rem 1rem 1rem 1.7rem; }

/* the page */
.doc { min-width: 0; max-width: 48rem; }
.doc:focus { outline: none; }
.doc-head { margin-bottom: 1.75rem; }
.crumb { margin: 0 0 .5rem; font: 600 .85rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); }
.doc h1.display { font-size: clamp(2.3rem, 6vw, 3.4rem); line-height: 1.05; }
.checked { margin: .9rem 0 0; color: var(--muted); font-size: .92rem; }
.doc h2 { font: 400 clamp(1.7rem, 3.5vw, 2.15rem)/1.15 var(--serif); margin: 3rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line-2); }
.doc h3 { font: 600 1.15rem/1.35 var(--sans); margin: 2rem 0 .75rem; }
.doc h4 { font: 600 1rem/1.4 var(--sans); margin: 1.5rem 0 .5rem; }
.doc p, .doc li { max-width: 44rem; }
.doc ul.bullets, .doc ol.doc-steps { margin: 0 0 1rem; padding-left: 1.4rem; }
.doc li { margin: .3rem 0; }
.doc li > ul, .doc li > ol { margin: .3rem 0; }
.doc ol.doc-steps { list-style: none; padding-left: 0; }
.doc ol.doc-steps > li { position: relative; padding-left: 2.6rem; margin: .7rem 0; }
.doc ol.doc-steps > li > .n { position: absolute; left: 0; top: .05rem; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--graphite); color: var(--amber); font: 600 .92rem/1.75rem var(--sans); text-align: center; }
@media (prefers-color-scheme: dark) { .doc ol.doc-steps > li > .n { background: var(--graphite-2); box-shadow: inset 0 0 0 1px var(--line-2); } }
.doc strong { font-weight: 600; }
.doc blockquote { margin: 1.25rem 0; padding: .25rem 0 .25rem 1.1rem; border-left: 3px solid var(--line-2); color: var(--muted); }
.doc pre.code { margin: 1rem 0 1.25rem; white-space: pre; max-width: 100%; }

/* screenshots */
.doc figure.shot { margin: 1.25rem 0 1.75rem; width: fit-content; max-width: 100%; border-radius: 10px; box-shadow: 0 1px 2px rgb(27 28 32 / 8%), 0 8px 24px rgb(27 28 32 / 10%); }
.doc figure.shot img { width: auto; max-width: 100%; }
@media (prefers-color-scheme: dark) { .doc figure.shot { box-shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 45%); } }

/* tables scroll inside their own frame */
.table-frame { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); max-width: 100%; }
.table-frame:focus-visible { outline-offset: 0; }
.table-frame table { min-width: 30rem; font-size: .96rem; }
.table-frame td:first-child { white-space: normal; }
.table-frame th.c, .table-frame td.c { text-align: center; }
.table-frame th.r, .table-frame td.r { text-align: right; }

/* note, warning and advanced boxes */
.box { margin: 1.5rem 0; padding: 1rem 1.25rem; border-radius: 0 12px 12px 0; border-left: 4px solid var(--line-2); background: var(--card); }
.box > :last-child { margin-bottom: 0; }
.box-title { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin: 0 0 .5rem; }
.box-title .icon { width: 1.25rem; height: 1.25rem; }
.box-note { border-left-color: var(--amber); }
.box-note .box-title .icon { color: var(--accent-text); }
.box-warning { border-left-color: #C2410C; background: color-mix(in srgb, #C2410C 7%, var(--card)); }
.box-warning .box-title { color: #9A3412; }
.box-advanced { border-left-color: var(--muted); background: var(--sunken); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 2.5rem; }
@media (prefers-color-scheme: dark) {
  .box-warning { border-left-color: #FB923C; background: color-mix(in srgb, #FB923C 9%, var(--card)); }
  .box-warning .box-title { color: #FDBA74; }
}

/* previous and next */
.prevnext { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line-2); }
.prevnext a { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.1rem; border: 1px solid var(--line-2); border-radius: 12px; color: var(--ink); text-decoration: none; background: var(--card); min-height: 3.5rem; }
.prevnext a:hover { border-color: var(--accent-text); }
.prevnext a.next { justify-content: flex-end; text-align: right; grid-column: -2; }
.prevnext small { display: block; color: var(--muted); font-size: .82rem; }
.prevnext .icon { width: 1.2rem; height: 1.2rem; color: var(--accent-text); }

.docs-foot { padding: 2rem 0; }
.docs-foot p { margin: 0; }

@media (max-width: 30rem) {
  .docs { padding-top: 1rem; }
  .doc h2 { margin-top: 2.25rem; }
  .box { padding: .9rem 1rem; }
}
@media print {
  .site-header, .nav-side, .nav-small, .prevnext, .skip, .site-footer { display: none; }
  .docs { display: block; }
}
