/* Sitewide readability and interaction corrections.

   These rules are deliberately not behind a feature switch and not scoped to
   one view: a contrast floor, a reachable tap target, and code a reader can
   actually finish reading are baseline requirements on every page. */

/* Article code blocks: restore horizontal scrolling on narrow screens.

   The syntax highlighter sets `overflow: hidden` as an inline style on its own
   scroll box. On a desktop the code table fits inside the block and nothing is
   lost, so the fault never shows there. On a phone the table needs roughly
   twice the available width, and with the overflow hidden and no ancestor able
   to scroll, the right-hand part of every long line is unreachable: comments
   stop mid-sentence and declarations lose their arguments. An inline style can
   only be overridden with `!important`. */
.urvanov-syntax-highlighter-syntax .urvanov-syntax-highlighter-main,
.urvanov-syntax-highlighter-syntax .urvanov-syntax-highlighter-plain {
	overflow-x: auto !important;
	-webkit-overflow-scrolling: touch;
}

/* Link and accent colour.

   The theme palette's accent measured 4.31:1 against white and 4.16:1 against
   the article background, below the 4.5:1 the WCAG AA body-text threshold asks
   for. Every text link on the site uses it, and so do the accent buttons that
   carry white labels. Darkening the same hue clears the threshold on both
   grounds (5.85:1 and 5.64:1) without inventing a new brand colour. The
   override lives here rather than in the theme customizer so a Blocksy update
   cannot quietly revert it. */
:root {
	--theme-palette-color-1: #1a5fd0;
}

/* The contact form's submit button ships its own blue (3.87:1 under white
   text) instead of taking the theme accent. */
.fluentform .ff-btn-submit,
.fluentform button.ff-btn-submit {
	background-color: #1a5fd0 !important;
}

/* The About and consulting call-to-action buttons use WordPress core's
   "vivid cyan blue" preset, which measures 3.34:1 under their white labels.
   Core emits the preset as a variable, so redefining the variable corrects
   every block using it without touching page content. */
:root {
	--wp--preset--color--vivid-cyan-blue: #0876b8;
}

/* The consent banner's accept button measured 3.13:1 under its white label.
   It is the first control a new reader sees, so it should not be the least
   readable one. */
#cookie-law-info-bar #wt-cli-accept-all-btn,
#cookie-law-info-bar .cli_action_button,
#cookie-law-info-bar a.wt-cli-accept-all-btn {
	background-color: #46781d !important;
}

/* Mobile header controls.

   The menu toggle measured 18x18, search 25x25 and the account link 15x15,
   all without padding, so the icon itself was the entire hit area. WCAG 2.5.8
   asks for 24x24 as a minimum and 44x44 is the size a thumb actually finds.
   Padding the control leaves the icon its original size and only grows the
   area around it, which the header row already has space for. */
@media (max-width: 999px) {
	.ct-header-trigger,
	.ct-header-search,
	.ct-header-account .ct-account-item {
		min-width: 44px;
		min-height: 44px;
		align-items: center;
		justify-content: center;
	}
}

/* Forum text colours.

   wpForo generates its own colour stylesheet. Its link blue measures 2.71:1
   against white, its forum and topic titles 4.49:1 against the light grey rows,
   and the last-poster line uses a red at 3.64:1. All sit below the AA threshold
   at the sizes the forum uses them.

   The overrides name specific text elements rather than every link, so buttons
   with coloured backgrounds and wpForo's icon accents keep their own colours.
   They carry the important flag because wpForo's generated rules use a two-id
   prefix that outranks anything reasonable written here, and because the
   last-poster colour is an inline style. */
#wpforo #wpforo-wrap .wpforo-forum-title a,
#wpforo #wpforo-wrap .wpforo-last-topic-title a,
#wpforo #wpforo-wrap .wpforo-feed a span,
#wpforo #wpforo-wrap .wpf-unread-posts a span,
#wpforo #wpforo-wrap .wpf-newest-member a,
#wpforo #wpforo-wrap #wpforo-stat-body a,
#wpforo #wpforo-wrap #wpforo-stat-body a span,
#wpforo #wpforo-wrap .wpf-footer-buttons a span {
	color: #376781 !important;
}

#wpforo #wpforo-wrap a.wpf-button span,
#wpforo #wpforo-wrap .wpf-by a,
#wpforo #wpforo-wrap #wpforo-poweredby a {
	color: #2a7aa8 !important;
}

#wpforo #wpforo-wrap .wpforo-last-topic-user a,
#wpforo #wpforo-wrap .wpforo-last-post-user a {
	color: #c62828 !important;
}
