/* =============================================================================
   UI density.

   The Settings page has offered a Comfortable / Cozy / Compact control for a
   while, writing body[data-density]. Nothing keyed off that attribute, so the
   control did nothing. These are the rules that make it real.

   Density works by re-pointing tokens rather than restyling components, so
   anything already built on the tokens follows. Custom properties inherit, so
   setting them on <body> reaches every descendant.

   Comfortable is the default and deliberately declares nothing: it is the
   values already in tokens.css and css/app-table.css.
   ============================================================================= */

body[data-density="cozy"] {
    --space-3: 10px;
    --space-4: 13px;
    --space-5: 16px;
    --space-6: 19px;

    --table-cell-padding-y: 10px;
    --table-cell-padding-x: 12px;

    /* css/app-table.css cell padding */
    --at-head-pad-y: 9px;
    --at-cell-pad-y: 10px;
    --at-cell-pad-x: 12px;

    --app-card-pad: 18px;
}

body[data-density="compact"] {
    --space-3: 8px;
    --space-4: 10px;
    --space-5: 12px;
    --space-6: 14px;

    --table-cell-padding-y: 6px;
    --table-cell-padding-x: 10px;

    --at-head-pad-y: 7px;
    --at-cell-pad-y: 7px;
    --at-cell-pad-x: 10px;

    --app-card-pad: 14px;

    --line-height-base: 1.45;
}

/* Compact also tightens the controls, but never below the touch minimum -
   tokens.css steps control height up on coarse pointers for a reason. */
@media (pointer: fine) {
    body[data-density="compact"] {
        --control-height: 34px;
        --control-height-sm: 30px;
    }
}
