/* 1.2.1 polish for V4 refresh pages */
.hw4 .hm-split-body, .hw4 .hm-split-body .hm-section-title { text-align:left !important; }
.hw4 .hm-split-body .hm-actions { justify-content:flex-start !important; }
.hw4 .hm-mcard:not(:has(> .hm-program-body)):not(:has(> img)) { padding:28px 26px !important; gap:10px; }
.hw4 .hm-age { border-radius:12px !important; line-height:1.45 !important; }
.hw4 .hm-mcard .hm-program-body > div:last-child { margin-top:auto !important; display:flex !important; flex-direction:row !important; flex-wrap:wrap; gap:10px !important; padding-top:8px !important; }

/* Document link rows (theme button colors overridden) */
.hw4 .hw4-links > a { width:100% !important; justify-content:flex-start !important; text-align:left !important; background:#F2F6F6 !important; color:#1D3F44 !important; border:0 !important; border-radius:12px !important; box-shadow:none !important; text-transform:none !important; letter-spacing:0 !important; }
.hw4 .hw4-links > a:hover, .hw4 .hw4-links > a:focus-visible { background:#FFF3DA !important; color:#1D3F44 !important; }

/* Grids: balanced columns, centered leftover cards */
@media (min-width:1025px) {
  .hw4 .hm-grid { display:grid !important; grid-template-columns:repeat(6, minmax(0, 1fr)) !important; }
  .hw4 .hm-grid > * { grid-column:span 2; }
  .hw4 .hm-grid > :last-child:nth-child(3n+1) { grid-column:3 / 5; }
  .hw4 .hm-grid > :nth-last-child(2):nth-child(3n+1) { grid-column:2 / 4; }
  .hw4 .hm-grid > :last-child:nth-child(3n+2) { grid-column:4 / 6; }
}
@media (min-width:768px) and (max-width:1024px) {
  .hw4 .hm-grid { display:grid !important; grid-template-columns:repeat(2, minmax(0, 1fr)) !important; }
}
.hw4 [data-id="647ab001"] { grid-template-columns:repeat(2, minmax(0, 1fr)) !important; max-width:900px !important; }
.hw4 [data-id="647ab001"] > * { grid-column:auto !important; }

/* Tips cards */
.hw4 .hm-value-grid { display:grid !important; grid-template-columns:repeat(3, minmax(0, 1fr)) !important; gap:24px !important; width:100%; max-width:1000px; margin:0 auto !important; }
.hw4 .hm-value-card { padding:30px 26px !important; }

/* Message buttons fit on one row */
.hw4-mbtn { padding:9px 13px !important; font-size:12.5px !important; gap:6px !important; }

@media (max-width:767px) {
  .hw4 .hm-grid, .hw4 [data-id="647ab001"], .hw4 .hm-value-grid { grid-template-columns:minmax(0, 1fr) !important; max-width:520px !important; }
}
