/* The public guide shares Cut E's lightbox, water and type. Reading comes before decoration. */
.docs-page { min-width: 0; }
.docs-page.wide main { max-width: 82rem; padding-top: 2.5rem; }
.docs-page .bar { max-width: 88rem; width: 100%; margin-inline: auto; padding-block: .75rem; }
.docs-page .logo span { display: inline; }
.docs-page .bar nav { flex-wrap: wrap; gap: .25rem 1.5rem; }
.docs-guide { position: relative; }
.docs-intro { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.docs-label { display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; color: var(--muted); font-size: .95rem; font-weight: 600; }
.docs-label span { color: var(--jelly-deep); background: color-mix(in oklch, var(--jelly) 12%, transparent); border: 1px solid color-mix(in oklch, var(--jelly-deep) 35%, transparent); border-radius: 999px; font-size: .78rem; padding: .12rem .55rem; }
.docs-page h1 { font-size: clamp(2.5rem, 4.2vw, 3.7rem); line-height: 1.02; margin: 0 0 1rem; max-width: 19ch; }
.docs-lede { max-width: 48ch; color: var(--muted); margin: 0; font-size: 1.17rem; line-height: 1.5; }
.docs-tools { display: flex; flex-direction: column; align-items: start; gap: .8rem; flex-shrink: 0; font-size: .85rem; padding-bottom: .2rem; }
.docs-tools button { background: transparent; color: var(--ink); border: 1px solid var(--line); padding: .4rem .7rem; border-radius: 7px; font: inherit; cursor: pointer; }
.docs-tools button:hover { background: var(--surface); border-color: var(--muted); }
.docs-tools a { color: var(--muted); }
.docs-layout { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); align-items: start; gap: clamp(2rem, 5vw, 5rem); }
.docs-sidebar { position: sticky; top: 1.5rem; max-height: calc(100svh - 3rem); overflow-y: auto; padding: .2rem .3rem .5rem; font-size: .94rem; }
.docs-search { margin-bottom: 1.7rem; }
.docs-search label { display: block; margin-bottom: .45rem; font-size: .87rem; font-weight: 600; }
.docs-search-field { position: relative; }
.docs-search input { width: 100%; min-width: 0; padding: .65rem 1.9rem .65rem .7rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font: inherit; font-size: .9rem; line-height: 1.3; }
.docs-search input::placeholder { color: var(--muted); opacity: 1; }
.docs-search-field kbd { position: absolute; right: .65rem; top: .58rem; border: 1px solid var(--line); border-radius: 3px; padding: 0 .22rem; font: .75rem/1.4 var(--font-body); color: var(--muted); pointer-events: none; }
.docs-search-field:focus-within kbd { display: none; }
#docs-results { padding-top: .65rem; }
#docs-result-status { font-size: .82rem; color: var(--muted); margin: 0 0 .65rem; }
#docs-results ul { list-style: none; margin: 0; padding: 0; }
#docs-results li { padding: .65rem 0; border-bottom: 1px solid var(--line); }
#docs-results a { font-weight: 600; }
#docs-results small { display: block; margin-top: .25rem; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.docs-menu summary { display: none; }
.docs-nav-group + .docs-nav-group { margin-top: 1.5rem; }
.docs-nav-group > p { color: var(--muted); font-size: .8rem; font-weight: 600; margin: 0 0 .5rem; }
.docs-nav-group ul { list-style: none; margin: 0; padding: 0; }
.docs-nav-group li + li { margin-top: .1rem; }
.docs-nav-group a { display: block; border-radius: 6px; padding: .32rem .55rem; margin-inline: -.55rem; line-height: 1.45; text-decoration: none; }
.docs-nav-group a:hover { background: color-mix(in oklch, var(--ink) 5%, transparent); }
.docs-nav-group a[aria-current] { background: color-mix(in oklch, var(--jelly) 14%, transparent); color: var(--jelly-deep); font-weight: 600; }
.docs-updated { color: var(--muted); font-size: .78rem; border-top: 1px solid var(--line); padding-top: 1rem; margin: 1.7rem 0 0; }
.docs-updated time { color: inherit; font-size: inherit; }
.docs-reading { min-width: 0; max-width: 48rem; }
.docs-section { padding: 0 0 2.8rem; margin-bottom: 2.8rem; border-bottom: 1px solid var(--line); }
.docs-section:last-of-type { margin-bottom: 1.3rem; }
.docs-section h2 { font-size: 1.85rem; font-weight: 710; margin: 0 0 .6rem; scroll-margin-top: 1.5rem; }
.docs-section h2 a { text-decoration: none; }
.docs-section h2 a:hover::after { content: " #"; color: var(--muted); font-size: .8em; }
.docs-section h3 { font-size: 1.23rem; line-height: 1.3; margin: 1.8rem 0 .65rem; font-weight: 680; }
.docs-summary { color: var(--muted); font-size: 1.06rem; margin-bottom: 1.6rem; }
.docs-reading p, .docs-reading li { max-width: 71ch; }
.docs-reading p { margin-bottom: 1.1rem; }
.docs-reading code { font: .83em/1.6 "Martian Mono", ui-monospace, "SFMono-Regular", Consolas, monospace; background: color-mix(in oklch, var(--ink) 6%, transparent); border-radius: 4px; padding: .1em .3em; overflow-wrap: anywhere; }
.docs-steps { padding-left: 1.3rem; margin: 1.4rem 0 1.6rem; }
.docs-steps li { padding-left: .3rem; }
.docs-steps li + li { margin-top: 1rem; }
.docs-steps li::marker { color: var(--jelly-deep); font-weight: 600; }
.docs-note { background: color-mix(in oklch, var(--jelly) 8%, var(--surface)); border: 1px solid color-mix(in oklch, var(--jelly-deep) 24%, transparent); border-radius: 10px; padding: 1rem 1.2rem; margin: 1.5rem 0; font-size: .98rem; }
.docs-note p { margin: .4rem 0 0; }
.docs-next { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin-top: 1.6rem; font-size: .95rem; font-weight: 600; }
.docs-contract { padding: .85rem 0; margin-block: 1.2rem; border-block: 1px solid var(--line); }
.docs-contract summary { color: var(--jelly-deep); cursor: pointer; font-weight: 600; }
.docs-contract[open] summary { margin-bottom: 1rem; }
.docs-loop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; margin: 1.5rem 0 1.7rem; gap: 1rem .6rem; }
.docs-loop li { position: relative; border-top: 2px solid color-mix(in oklch, var(--jelly-deep) 45%, transparent); padding: .6rem .2rem 0; margin: 0; }
.docs-loop li:first-child { border-top-color: var(--glow); }
.docs-loop li:last-child { border-top-color: var(--glow); }
.docs-loop strong { display: block; font-size: .93rem; }
.docs-loop span { display: block; font-size: .76rem; line-height: 1.4; margin-top: .2rem; color: var(--muted); }
.docs-code { margin: 1.25rem 0 1.5rem; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.docs-code-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem .85rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .82rem; min-height: 2.5rem; }
.docs-copy { flex-shrink: 0; padding: .2rem .4rem; border: 0; border-radius: 4px; color: var(--ink); background: transparent; cursor: pointer; font: 600 .8rem/1.5 var(--font-body); }
.docs-copy:hover { background: color-mix(in oklch, var(--ink) 7%, transparent); }
.docs-copy:active { transform: translateY(1px); }
.docs-code pre { margin: 0; padding: 1rem; max-width: 100%; overflow-x: auto; tab-size: 2; }
.docs-code pre code { background: none; border-radius: 0; padding: 0; overflow-wrap: normal; white-space: pre; font-size: .8125rem; line-height: 1.8; }
.docs-table { max-width: 100%; overflow-x: auto; margin: 1.4rem 0; }
.docs-table table { display: table; width: 100%; font-size: .94rem; margin: 0; line-height: 1.5; }
.docs-table caption { text-align: left; color: var(--muted); font-size: .82rem; padding-bottom: .6rem; }
.docs-table thead th { font-size: .85rem; }
.docs-table th, .docs-table td { padding: .7rem .8rem .7rem 0; overflow-wrap: anywhere; }
.docs-table th:first-child { width: 34%; min-width: 8rem; }
.docs-table tbody th { font-weight: 600; }
.docs-table td:last-child { padding-right: 0; }
.docs-back-top { font-size: .9rem; color: var(--muted); }
.docs-skip { position: fixed; top: .7rem; left: 1rem; z-index: 30; padding: .6rem 1rem; background: var(--ink); color: var(--bg); border-radius: 6px; transform: translateY(-200%); }
.docs-skip:focus { transform: none; }
.docs-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 54rem) { .docs-menu:not([open]) > nav { display: block; } }
@media (max-width: 54rem) {
  .docs-page main { padding-top: 1.8rem; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .docs-sidebar { position: static; max-height: none; overflow: visible; padding: 0; }
  .docs-menu { border-block: 1px solid var(--line); }
  .docs-menu summary { display: flex; justify-content: space-between; align-items: center; padding: .8rem .15rem; cursor: pointer; font-weight: 600; list-style: none; }
  .docs-menu summary::-webkit-details-marker { display: none; }
  .docs-menu[open] summary span { transform: rotate(180deg); }
  .docs-menu nav { padding: .5rem .6rem 1.2rem; columns: 2; column-gap: 2rem; }
  .docs-nav-group { break-inside: avoid; }
  .docs-search { margin-bottom: 1rem; }
  .docs-search input { padding-block: .75rem; }
  .docs-search-field kbd { display: none; }
  .docs-updated { display: none; }
  .docs-reading { max-width: none; }
  .docs-intro { margin-bottom: 1.5rem; padding-bottom: 1.7rem; }
  .docs-tools { align-items: end; }
}
@media (max-width: 38rem) {
  .docs-page .bar nav { gap: .15rem .875rem; }
  .docs-page .bar nav a[href="/security"] { display: none; }
  .docs-intro { display: block; }
  .docs-page h1 { font-size: 2.55rem; max-width: 15ch; }
  .docs-lede { font-size: 1.05rem; }
  .docs-tools { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 1.3rem; }
  .docs-section { margin-bottom: 2rem; padding-bottom: 2rem; }
  .docs-section h2 { font-size: 1.65rem; }
  .docs-section h3 { font-size: 1.18rem; }
  .docs-summary { font-size: 1rem; }
  .docs-reading { font-size: 1rem; }
  .docs-code pre { padding: .85rem; }
  .docs-code pre code { font-size: .8125rem; }
  .docs-table table { font-size: .87rem; }
  .docs-loop { gap: .8rem .5rem; }
  .docs-loop strong { font-size: .84rem; }
  .docs-loop span { font-size: .72rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .docs-copy { transition: transform 120ms ease-out; }
}
@media print {
  .docs-page .bar, .docs-sidebar, .docs-tools, .docs-copy, .docs-page .foot, .docs-back-top { display: none !important; }
  .docs-page main { padding: 0; max-width: none; }
  .docs-layout { display: block; }
  .docs-reading { max-width: none; }
  .docs-code pre { white-space: pre-wrap; }
  .docs-code pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
}
