.gap-xs.vertical > *:not(:last-child) { margin-bottom: 2px; }
.gap-s.vertical  > *:not(:last-child) { margin-bottom: 3px; }
.gap-m.vertical  > *:not(:last-child) { margin-bottom: 4px; }
.gap-l.vertical  > *:not(:last-child) { margin-bottom: 6px; }
.gap-xl.vertical > *:not(:last-child) { margin-bottom: 12px; }
.gap-xs.horizontal > *:not(:last-child) { margin-right: 2px; }
.gap-s.horizontal  > *:not(:last-child) { margin-right: 3px; }
.gap-m.horizontal  > *:not(:last-child) { margin-right: 4px; }
.gap-l.horizontal  > *:not(:last-child) { margin-right: 6px; }
.gap-xl.horizontal > *:not(:last-child) { margin-right: 12px; }

.m-xs { margin: 2px; }
.m-s  { margin: 3px; }
.m-m  { margin: 4px; }
.m-l  { margin: 6px; }
.m-xl { margin: 12px; }

.mt-xs { margin-top: 2px; }
.mt-s  { margin-top: 3px; }
.mt-m  { margin-top: 4px; }
.mt-l  { margin-top: 6px; }
.mt-xl { margin-top: 12px; }

.mb-xs { margin-bottom: 2px; }
.mb-s  { margin-bottom: 3px; }
.mb-m  { margin-bottom: 4px; }
.mb-l  { margin-bottom: 6px; }
.mb-xl { margin-bottom: 12px; }

.ms-xs { margin-left: 2px; }
.ms-s  { margin-left: 3px; }
.ms-m  { margin-left: 4px; }
.ms-l  { margin-left: 6px; }
.ms-xl { margin-left: 12px; }

.me-xs { margin-right: 2px; }
.me-s  { margin-right: 3px; }
.me-m  { margin-right: 4px; }
.me-l  { margin-right: 6px; }
.me-xl { margin-right: 12px; }

/* Built-in libadwaita / GTK overrides */

headerbar,
.titlebar {
    min-height: 32px;
    padding-top: 0;
    padding-bottom: 0;
}
windowhandle > box,
windowhandle > .titlebar {
    min-height: 32px;
}

button {
    min-height: 24px;
    padding-top: 2px;
    padding-bottom: 2px;
}
button.image-button,
button.circular {
    min-width: 24px;
    min-height: 24px;
    padding: 2px;
}

entry,
spinbutton,
spinbutton > text {
    min-height: 26px;
    padding-top: 2px;
    padding-bottom: 2px;
}

row {
    min-height: 0;
}

listview > row,
listview row.activatable {
    min-height: 0;
    padding-top: 1px;
    padding-bottom: 1px;
}

row > box.header {
    min-height: 0;
    padding-top: 2px;
    padding-bottom: 2px;
}

.navigation-sidebar > row,
.navigation-sidebar row {
    min-height: 0;
    padding-top: 1px;
    padding-bottom: 1px;
    margin-top: 0;
    margin-bottom: 0;
}

preferencesgroup > box > label,
preferencesgroup > box > box.header {
    margin-top: 4px;
    margin-bottom: 4px;
}

.toolbar {
    padding: 2px 4px;
    min-height: 0;
}

.card {
    padding: 4px 8px;
}

.commit-item { padding: 2px 6px; }
.diff-summary { padding: 2px 6px; }
.diff-header { padding: 3px 6px; }
.diff-hunk-header { padding: 1px 6px; }
.rebase-banner { padding: 4px 8px; }
