/* Nightdrive: small fixes for how WordPress wraps the design (the design itself lives in css/). */

/* Template-part wrappers must not create their own box: the header stays sticky to the page,
   and footer/contact sit directly in the page flow as in the draft. */
.nd-part-header,
.nd-part-footer,
.nd-part-contact,
.wp-block-post-content,
.nd-main > .entry-content { display: contents; }

.wp-site-blocks { padding: 0; margin: 0; }
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }

/* When logged in, WordPress's admin bar sits on top of the page: keep the pinned header below it. */
.admin-bar .hd { top: 32px; }
@media (max-width: 782px) { .admin-bar .hd { top: 46px; } }

/* The same admin-bar offset for the other pinned bars: post contents list and blog topic buttons. */
.admin-bar .ps-toc { top: 128px; }
.admin-bar .tbar { top: 100px; }
@media (max-width: 960px) { .admin-bar .ps-toc { top: 92px; } }
@media (max-width: 782px) { .admin-bar .ps-toc { top: 106px; } .admin-bar .tbar { top: 114px; } }
.admin-bar .tm-toc { top: 100px; }
.admin-bar .tm-side { top: 172px; }
.admin-bar .gl-bar { top: 96px; }
@media (max-width: 782px) { .admin-bar .tm-toc { top: 114px; } .admin-bar .gl-bar { top: 110px; } }

/* Editor only: the block editor caps each block at 760px; Nightdrive blocks are full-width page sections */
.editor-styles-wrapper .wp-block[class*="wp-block-nightdrive-"] { max-width: none; margin-left: 0; margin-right: 0; }

/* A long unbroken string in running text (a DOI or URL) may break so it never pushes a phone page sideways (22 Nov 2026). */
main :is(p, li, dd, td, figcaption) { overflow-wrap: break-word; }
/* Code samples in posts (the llms.txt example) scroll inside their own box instead of widening the page. */
main pre { max-width: 100%; overflow-x: auto; }
/* The contact form's consent checkbox lost its focus outline to `.cform input:focus{outline:none}` (keyboard pass, 22 Nov 2026). */
.cform input[type=checkbox]:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
