/* Joined block (DS §7.6), 26 Nov · Mikky: "don't separate them."
   Stacked surfaces of one section read as ONE block: one outer line, one radius (top on the first part, bottom on the last),
   1px hairlines between parts, no gaps, no double borders. The chain is the page's direct children:
     tile strip (.v2-strip.dt--do-a) → day-7 card (.p2-pcard) → carry line (.pd-carry) → snapshot line (.p2-snap) → toolbar → table
   Any run of two or more of these joins. What follows the table (totals line, pager) stays outside with normal spacing.
   !important because the tabs' own files set margins on these parts (v1's 24 Nov rules did the same). */
.pad > :is(.v2-strip.dt--do-a, .p2-pcard, .pd-carry, .p2-snap, .toolbar, table.tbl, table.vl):has(+ :is(.p2-pcard, .pd-carry, .p2-snap, .toolbar, table.tbl, table.vl)) {
  margin-bottom: 0 !important; border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; box-shadow: none !important; }
.pad > :is(.v2-strip.dt--do-a, .p2-pcard, .pd-carry, .p2-snap, .toolbar, table.tbl, table.vl) + :is(.p2-pcard, .pd-carry, .p2-snap, .toolbar, table.tbl, table.vl) {
  margin-top: 0 !important; border: 1px solid var(--se-line) !important; border-top: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: var(--color-bg-canvas); }
/* the last part closes the box: bottom radius + the soft-edge shadow */
.pad > :is(.v2-strip.dt--do-a, .p2-pcard, .pd-carry, .p2-snap, .toolbar, table.tbl, table.vl) + :is(.p2-pcard, .pd-carry, .p2-snap, .toolbar, table.tbl, table.vl):not(:has(+ :is(.p2-pcard, .pd-carry, .p2-snap, .toolbar, table.tbl, table.vl))) {
  border-bottom-left-radius: var(--radius-sm) !important; border-bottom-right-radius: var(--radius-sm) !important; box-shadow: var(--se-shadow) !important; }
/* a table in the chain: separate borders so the radius takes; clip (not hidden) keeps the sticky header working */
.pad > :is(.v2-strip, .p2-pcard, .pd-carry, .p2-snap, .toolbar) + :is(table.tbl, table.vl) { border-collapse: separate; border-spacing: 0; overflow: clip; }
.pad > :is(.v2-strip, .p2-pcard, .pd-carry, .p2-snap, .toolbar) + :is(table.tbl, table.vl):not(:has(tfoot)) > tbody > tr:last-child > td { border-bottom: 0; }
/* inner rhythm of the joined parts. Parts match by class only (the carry line by .pd-carry, not its id), so no rule here
   outranks a part's own by an id; the filter line (.p2-fl) keeps its own 40px waiting-row rhythm from p2.css. */
.pad > :is(.v2-strip.dt--do-a, .p2-pcard, .pd-carry, .p2-snap) + .toolbar:not(.p2-fl) { padding: 12px 16px !important; }
.pad > :is(.v2-strip.dt--do-a, .p2-pcard, .toolbar) + .pd-carry { padding: 10px 16px !important; }
.pad > :is(.v2-strip.dt--do-a, .p2-pcard, .pd-carry, .toolbar) + .p2-snap { padding: 10px 16px !important; }
.pad > :is(.v2-strip.dt--do-a, .p2-pcard, .pd-carry, .p2-snap, .toolbar) + :is(table.tbl, table.vl) + :is(.pg, .p2-sum) { margin-top: var(--space-3); }

/* Overview: the tiles + waiting row block and the card grid (day-7 card, state, posts, pay) are one block */
.pad > .p2-wjoin:has(+ .ovg) { margin-bottom: 1px !important; border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.pad > .p2-wjoin + .ovg { margin-top: 0 !important; border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
