/* Spacing: one rhythm on every page, plugin and theme (Murof 1.2).
   The scale is float.css's --s-1 to --s-8: 4 8 12 16 20 24 32 48 (phones shrink --s-5 to --s-8 to 16 20 24 36).
     header to the first block      --s-6         main's top padding
     block to block in the page     --s-4         main's direct children and the rows of .layout
     cards in one list              --gap-float   10, phones 8
     last block to the footer       64px          main's 40px + the footer's 24px, phones too
   Rules keyed on main#main win over theme and plugin margins on purpose: a store theme restyles cards, it doesn't move
   blocks apart. Checked by app\tests\overflow\run_spacing.py. */
main#main { padding-top: var(--s-6); padding-bottom: 40px; }
main.wrap > .crumbs:first-child { padding-top: 0; }  /* main's padding is the top gap (a theme's crumb bar keeps its own padding) */
main#main > :not(.under-cover) { margin-block: 0; }
main#main > * + :not(.under-cover, script, style, template, dialog) { margin-top: var(--s-4); }
main#main > .greet { padding-block: 0; }  /* page heads, plugin heads included: no extra air of their own */
main#main > .layout { padding-top: 0; }
main#main .layout { row-gap: var(--s-4); }
main#main :is(.toolbar-row, .greet-tools):not(:has(> *)) { display: none; }  /* an empty pager or tools row would add a gap of its own */
main#main :is(.box, .panel, .cat):not(:has(~ :not(script, style, template))) { margin-bottom: 0; }  /* the last card or category adds no gap of its own */
.footer { padding-top: 24px; }
