/* Marshall & Stewart site-wide overrides (added Oct 2026). Loaded on every page. */

/* Visible text links: underline always, soft highlight on hover. Buttons, menus,
   cards, the table of contents and the CTA panel are untouched (they carry classes
   or sit outside paragraphs/lists). */
main p a:not([class]),
.brxe-post-content li a:not([class]),
.brxe-post-content td a:not([class]),
.brxe-post-content figcaption a:not([class]),
.brxe-text li a:not([class]) {
  color: #414042;
  font-weight: 400;
  text-decoration: underline;
  text-decoration-color: #414042;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-radius: 2px;
  transition: background-color .15s ease, text-decoration-thickness .15s ease;
}
main p a:not([class]):hover,
.brxe-post-content li a:not([class]):hover,
.brxe-post-content td a:not([class]):hover,
.brxe-post-content figcaption a:not([class]):hover,
.brxe-text li a:not([class]):hover {
  background-color: #e8e4d8;
  text-decoration-thickness: 2px;
}
main p a:not([class]):focus-visible { outline: 2px solid #414042; outline-offset: 2px; }

/* Links inside white-on-dark text (.text-light) take the surrounding text colour and get no light
   hover background, so they stay readable on the dark section behind them. */
.text-light a:not([class]) { color: inherit; text-decoration-color: currentColor; }
.text-light a:not([class]):hover { background-color: transparent; }
.text-light a:not([class]):focus-visible { outline-color: currentColor; }

/* Article tables: full width, roomy cells, clear header row. */
.brxe-post-content .wp-block-table { margin: 32px 0; overflow-x: auto; }
.brxe-post-content .wp-block-table table { width: 100%; border-collapse: collapse; }
.brxe-post-content .wp-block-table th,
.brxe-post-content .wp-block-table td { padding: 12px 16px; vertical-align: top; text-align: left; border-bottom: 1px solid #ddd9d9; }
.brxe-post-content .wp-block-table th { font-weight: 600; border-bottom: 2px solid #414042; }
.brxe-post-content .wp-block-table .nowrap { white-space: nowrap; }

/* Phones: nothing may be wider than the screen. The footer's three columns now wrap instead of
   forcing every page to 493px, and the legal pages no longer hold a fixed 788px column. */
@media (max-width: 767px) {
  footer#brx-footer #brxe-hvxdlb { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
  /* Home page cards stack in one column; the theme's flex-wrap let the last paragraph wrap into a second column off screen at 320 and 375px. */
  .card-featured.brxe-block { flex-wrap: nowrap; }
}
:is(body.page-id-2451, body.page-id-2452, body.page-id-2453, body.page-id-2454, body.page-id-2455, body.page-id-2456, body.page-id-2457, body.page-id-2458) article.type-page#brx-content { max-width: min(788px, 100%); }
/* Very narrow phones (320px): let one-column grids shrink below their content width, and fit the legal-page title. */
@media (max-width: 768px) {
  .column--on-m { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 359px) {
  :is(body.page-id-2451, body.page-id-2452, body.page-id-2453, body.page-id-2454, body.page-id-2455, body.page-id-2456, body.page-id-2457, body.page-id-2458) article.type-page h1 { font-size: 32px; }
}
