/* Comodex — supplementary styles for things theme.json cannot express. */

/* ---------- Block style: Card ---------- */
.wp-block-group.is-style-comodex-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	padding: var(--wp--preset--spacing--40);
	box-shadow: var(--wp--preset--shadow--card);
	height: 100%;
	transition: box-shadow .18s ease, transform .18s ease;
}
.wp-block-group.is-style-comodex-card:hover {
	box-shadow: var(--wp--preset--shadow--lift);
	transform: translateY(-2px);
}

/* ---------- Block style: accent rule on top ---------- */
.wp-block-group.is-style-comodex-rule-top {
	border-top: 4px solid var(--wp--preset--color--cyan);
	padding-top: var(--wp--preset--spacing--30);
}

/* ---------- Block style: eyebrow heading ---------- */
.is-style-comodex-eyebrow {
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--cyan) !important;
	margin-bottom: var(--wp--preset--spacing--10);
}

/* ---------- Block style: tick list ---------- */
.wp-block-list.is-style-comodex-ticks {
	list-style: none;
	padding-left: 0;
}
.wp-block-list.is-style-comodex-ticks li {
	position: relative;
	padding-left: 1.9rem;
	margin-bottom: .6rem;
}
.wp-block-list.is-style-comodex-ticks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .45em;
	width: 1rem;
	height: .55rem;
	border-left: 2.5px solid var(--wp--preset--color--cyan);
	border-bottom: 2.5px solid var(--wp--preset--color--cyan);
	transform: rotate(-45deg);
}

/* ---------- Block style: FAQ details ---------- */
.wp-block-details.is-style-comodex-faq {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: var(--wp--preset--spacing--30) 0;
}
.wp-block-details.is-style-comodex-faq summary {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--navy);
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}
.wp-block-details.is-style-comodex-faq summary::-webkit-details-marker { display: none; }
.wp-block-details.is-style-comodex-faq summary::after {
	content: "+";
	font-weight: 400;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--wp--preset--color--cyan);
	flex: 0 0 auto;
}
.wp-block-details.is-style-comodex-faq[open] summary::after { content: "\2013"; }
.wp-block-details.is-style-comodex-faq > *:not(summary) { margin-top: var(--wp--preset--spacing--20); }

/* ---------- Header ---------- */
.comodex-header { position: sticky; top: 0; z-index: 100; }
.comodex-header .wp-block-site-logo img { max-height: 92px; width: auto; }
.comodex-header .wp-block-navigation a { text-decoration: none; }
.comodex-header .wp-block-navigation a:hover,
.comodex-header .wp-block-navigation .current-menu-item > a {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--wp--preset--color--cyan);
}
@media (max-width: 781px) {
	.comodex-header .wp-block-site-logo img { max-height: 64px; }
}

/* ---------- Skip link ---------- */
.skip-link:focus {
	background: var(--wp--preset--color--navy);
	color: #fff;
	padding: .75rem 1.25rem;
	z-index: 1000;
}

/* ---------- Course tables ---------- */
.comodex-course-table table { border-collapse: collapse; width: 100%; }
.comodex-course-table th {
	background: var(--wp--preset--color--navy);
	color: #fff;
	text-align: left;
	font-family: var(--wp--preset--font-family--heading);
	font-size: .78rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: .8rem .9rem;
	border: none;
}
.comodex-course-table td {
	padding: .75rem .9rem;
	border: none;
	border-top: 1px solid var(--wp--preset--color--line);
	vertical-align: top;
}
.comodex-course-table tbody tr:nth-child(even) td { background: var(--wp--preset--color--bone); }
.comodex-course-table td:nth-child(2),
.comodex-course-table td:nth-child(3) { white-space: nowrap; color: var(--wp--preset--color--muted); }
@media (max-width: 700px) {
	.comodex-course-table thead { display: none; }
	.comodex-course-table tr { display: block; border-top: 1px solid var(--wp--preset--color--line); padding: .75rem 0; }
	.comodex-course-table td { display: block; border: none; padding: .15rem 0; }
	.comodex-course-table tbody tr:nth-child(even) td { background: none; }
	.comodex-course-table td:first-child { font-weight: 600; color: var(--wp--preset--color--navy); }
}

/* ---------- Utility ---------- */
.comodex-stat .wp-block-heading { margin-bottom: 0; }
.has-navy-background-color :where(h1,h2,h3,h4,h5,h6),
.has-navy-deep-background-color :where(h1,h2,h3,h4,h5,h6),
.has-navy-cyan-gradient-background :where(h1,h2,h3,h4,h5,h6) { color: #fff; }
.has-navy-background-color a:not(.wp-element-button),
.has-navy-deep-background-color a:not(.wp-element-button) { color: #CFC98E; }

/* Never let a section overflow the viewport horizontally. */
html, body { overflow-x: clip; }


/* ---------- Cards must never inherit light text from a dark parent ---------- */
/* A card can sit inside a cover or navy band, which sets colour: #fff on its
   children. The card has a white background, so it has to reassert its own. */
.wp-block-group.is-style-comodex-card,
.has-navy-background-color .wp-block-group.is-style-comodex-card,
.has-navy-deep-background-color .wp-block-group.is-style-comodex-card,
.has-navy-cyan-gradient-background .wp-block-group.is-style-comodex-card,
.wp-block-cover .wp-block-group.is-style-comodex-card {
	color: var(--wp--preset--color--body);
}
.wp-block-group.is-style-comodex-card :where(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--navy);
}
.wp-block-group.is-style-comodex-card a:not(.wp-element-button),
.wp-block-cover .wp-block-group.is-style-comodex-card a:not(.wp-element-button) {
	color: var(--wp--preset--color--cyan-deep);
}
.wp-block-group.is-style-comodex-card .is-style-comodex-eyebrow {
	color: var(--wp--preset--color--cyan) !important;
}

/* ---------- Eyebrow needs a lighter tone on dark backgrounds ---------- */
/* Olive fails contrast on the dark bands; lift it there. On FLAT dark colour brass
   reads at 7.2:1 and is the brand accent, so it stays. */
.has-navy-background-color .is-style-comodex-eyebrow,
.has-navy-deep-background-color .is-style-comodex-eyebrow,
.has-navy-cyan-gradient-background .is-style-comodex-eyebrow {
	color: #C9B45E !important;
}
/* Over a PHOTOGRAPH the background is not flat, and brass fails badly on the lighter
   parts of the image — measured 1.56:1 at worst across 59% of the eyebrow's area on
   the homepage hero. White clears 4.5:1 over the whole area once the cover overlay
   sits at 65%. Do not put brass back here without re-measuring against the image. */
.wp-block-cover .is-style-comodex-eyebrow {
	color: #FFFFFF !important;
}

/* ---------- Cover text legibility ---------- */
.wp-block-cover .wp-block-cover__inner-container > * { position: relative; }


/* ---------- Header calls to action ---------- */
.comodex-header .wp-block-buttons { gap: 10px; }
.comodex-header .wp-block-button__link { padding: .7rem 1.15rem; font-size: .95rem; }
.comodex-header .is-style-outline .wp-block-button__link {
	border: 2px solid rgba(255, 255, 255, .45);
	background: transparent;
}
.comodex-header .is-style-outline .wp-block-button__link:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, .1);
}
@media (max-width: 1100px) {
	.comodex-header .is-style-outline { display: none; } /* keep one CTA on narrow screens */
}


/* ---------- Layout width ---------- */
/* theme.json keeps contentSize at 760px so paragraphs stay readable. Columns,
   tables and card grids are layout, not prose, and need the full wide measure.
   Specificity (0,2,0) beats the :where() rule WordPress generates for
   constrained layouts, so no !important is needed. */
.wp-block-group > .wp-block-columns,
.wp-block-group > .wp-block-table,
.wp-block-cover__inner-container > .wp-block-columns,
main > .wp-block-group > .wp-block-columns {
	max-width: var(--wp--style--global--wide-size);
}

/* Cover heroes read better with the text held to a comfortable measure. */
.wp-block-cover__inner-container > :where(p, h1, h2) {
	max-width: 720px;
}


/* ---------- Accent colour on dark bands ---------- */
/* Olive (#4F5E1D) reads at ~2.2:1 on the forest band — far below WCAG. Any
   olive-accented text inside a dark section flips to brass (#C9B45E, 7.6:1). */
.has-navy-background-color .has-cyan-color,
.has-navy-deep-background-color .has-cyan-color,
.has-navy-cyan-gradient-background .has-cyan-color,
.wp-block-cover .has-cyan-color {
	/* !important required: WP core emits .has-cyan-color with !important */
	color: #C9B45E !important;
}


/* ---------- Print ---------- */
/* The SHEQ catalogue doubles as a handout; make it print like one. */
@media print {
	header.comodex-header, footer, .wp-block-buttons, .wp-block-cover .wp-block-cover__background { display: none !important; }
	.wp-block-cover, .wp-block-cover__image-background { min-height: 0 !important; position: static !important; }
	body { background: #fff; color: #000; font-size: 11pt; }
	.comodex-course-table th { background: none !important; color: #000 !important; border-bottom: 2pt solid #000; }
	.comodex-course-table td { border-top: .5pt solid #999; }
	.comodex-course-table tbody tr:nth-child(even) td { background: none; }
	a { color: #000; text-decoration: none; }
	h1, h2, h3 { color: #000 !important; break-after: avoid; }
	.wp-block-columns { display: block; }
	figure.wp-block-image { break-inside: avoid; }
}

/* --- brand fonts + header fit (added 8 Aug 2026) --- */
/* The woff2 files are installed through the WordPress Font Library and live in
   wp-content/uploads/fonts/. They survive a theme reinstall. theme.json declares
   the families but carries no fontFace, so without these rules the site silently
   falls back to Segoe UI - which is exactly what it was doing until today. */
@font-face{font-family:'Poppins';font-style:normal;font-weight:400;font-display:swap;src:url('/wp-content/uploads/fonts/poppins-400.woff2') format('woff2');}
@font-face{font-family:'Poppins';font-style:normal;font-weight:500;font-display:swap;src:url('/wp-content/uploads/fonts/poppins-500.woff2') format('woff2');}
@font-face{font-family:'Poppins';font-style:normal;font-weight:600;font-display:swap;src:url('/wp-content/uploads/fonts/poppins-600.woff2') format('woff2');}
@font-face{font-family:'Poppins';font-style:normal;font-weight:700;font-display:swap;src:url('/wp-content/uploads/fonts/poppins-700.woff2') format('woff2');}
@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url('/wp-content/uploads/fonts/roboto-400.woff2') format('woff2');}
@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:url('/wp-content/uploads/fonts/roboto-500.woff2') format('woff2');}
@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-display:swap;src:url('/wp-content/uploads/fonts/roboto-700.woff2') format('woff2');}

/* Poppins is wider than the fallback: without this the nav wraps below the logo. */
@media (min-width:1200px){
  .comodex-header > .wp-block-group.is-layout-flex{max-width:1360px}
  .comodex-header nav.wp-block-navigation{gap:20px}
  .comodex-header nav.wp-block-navigation a{font-size:16px;letter-spacing:0}
}
