/**
 * The SIG page's Resources & downloads band, Layout/Resources 372:21749.
 *
 * Colours are theme roles wherever the frame binds a variable, with the
 * frame's resolved value as the fallback, the same contract as every other
 * block. The card carries `ota-theme--ash` in its markup, so its role tokens
 * resolve to the sand card the frame draws on the white band; on a site with
 * no colour themes the fallbacks paint the same thing.
 *
 * The document mark's squircle is the one colour bound to a role that reads
 * oddly: the frame binds `bar/ochre-button-text`, which resolves to near-black
 * on every published theme. Kept as bound rather than corrected to a hex, so a
 * designer's re-binding follows through.
 */

.ota-sig-resources {
	padding-block: 96px;
	color: var(--ota-text, #003038);
}

.ota-sig-resources__inner {
	box-sizing: border-box;
	max-width: calc(1060px + 2 * 2rem);
	margin-inline: auto;
	padding-inline: 2rem;
	display: flex;
	flex-direction: column;
	gap: 48px;
}

/* The eyebrow and heading, Component/Header's left column. */
.ota-sig-resources__head {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ota-sig-resources__eyebrow {
	margin: 0;
	color: var(--ota-accent, #f04c3a);
	font-size: var(--e-global-typography-eyebrow-font-size, 1.0625rem);
	font-weight: var(--e-global-typography-eyebrow-font-weight, 700);
	line-height: var(--e-global-typography-eyebrow-line-height, 1.46em);
	letter-spacing: var(--e-global-typography-eyebrow-letter-spacing, 1px);
}

.ota-sig-resources__title {
	margin: 0;
	color: var(--ota-text, #003038);
	font-size: 44px;
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -0.44px;
}

/*
 * 39px is the frame's own gap, not a rounding of the 24 the other card rows
 * use. Kept as drawn.
 */
.ota-sig-resources__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 39px;
}

.ota-sig-resources__card {
	display: flex;
	flex-direction: column;
	min-height: 336px;
	border-radius: 14px;
	background: var(--ota-background, #f0e7d8);
	color: var(--ota-text, #003038);
}

.ota-sig-resources__card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	padding: 24px 24px 0;
}

/* The same pill the scope badge and the news tag draw. */
.ota-sig-resources__pill {
	padding: 6px 16px;
	border-radius: 999px;
	background: var(--ota-cta-bg, #003038);
	color: var(--ota-cta-text, #ffffff);
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.65;
	letter-spacing: 0.69px;
	text-transform: capitalize;
}

.ota-sig-resources__mark {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-inline-start: auto;
	border-radius: 14px;
	background: var(--ota-ochre-button-text, #000000);
	color: #ffffff;
}

.ota-sig-resources__mark svg {
	width: 20px;
	height: 20px;
}

.ota-sig-resources__card-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex-grow: 1;
	padding: 24px 24px 16px;
}

/* Regular, not bold: the frame draws this title at 400 unlike the news cards. */
.ota-sig-resources__card-title {
	margin: 0;
	color: var(--ota-white-text, #003038);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.4;
}

.ota-sig-resources__card-desc {
	margin: 0;
	color: var(--ota-text-muted, #005361);
	font-size: 14px;
	font-weight: 300;
	line-height: 1.2;
}

.ota-sig-resources__card-footer {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: auto 24px 8px;
	padding-block: 8px;
	border-top: 1px solid var(--ota-divider, rgba(0, 48, 56, 0.2));
}

.ota-sig-resources__meta {
	flex: 1;
	min-width: 0;
	color: var(--ota-text-muted, #005361);
	font-size: 15px;
	font-weight: 300;
	line-height: 1.65;
}

.ota-sig-resources__view {
	display: flex;
	flex: none;
	align-items: center;
	gap: 8px;
	color: var(--ota-text, #003038);
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}

.ota-sig-resources__view:hover,
.ota-sig-resources__view:focus-visible {
	color: var(--ota-text, #003038);
	text-decoration: underline;
}

/*
 * The dot is card-coloured at rest so only the arrow shows, and fills with the
 * CTA colours on the link's hover, the same behaviour as the news and events
 * cards' Read More affordance.
 */
.ota-sig-resources__dot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 999px;
	background: transparent;
	color: currentColor;
	transition: background-color 150ms ease, color 150ms ease;
}

.ota-sig-resources__dot svg {
	width: 13px;
	height: 13px;
}

.ota-sig-resources__view:hover .ota-sig-resources__dot,
.ota-sig-resources__view:focus-visible .ota-sig-resources__dot {
	background: var(--ota-cta-bg, #003038);
	color: var(--ota-cta-text, #ffffff);
}

@media (max-width: 1024px) {
	.ota-sig-resources {
		padding-block: 64px;
	}

	.ota-sig-resources__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
}

@media (max-width: 767px) {
	.ota-sig-resources__grid {
		grid-template-columns: 1fr;
	}

	.ota-sig-resources__card {
		min-height: 0;
	}

	.ota-sig-resources__title {
		font-size: 34px;
	}
}

/* --- Download buttons layout ------------------------------------------------ */

/*
 * News Detail's sec-resources band, node 2345:58006. The same rows as the
 * cards, drawn as a sand box that sits inside the article column rather than
 * a full-width band, so the outer padding and inner measure the card layout
 * sets above are undone here. Doubled class for 0,2,0, so these win over the
 * base rules and their breakpoints regardless of order.
 *
 * Bound colours are roles as usual: the box is bar/background and the heading
 * bar/text. The box carries its own theme class (Ash unless the editor picks
 * another on the widget), so those roles resolve to the frame's sand box and
 * dark text whatever colour theme the page has, the same pinning the cards do.
 *
 * The pill's teal is an UNBOUND #005361 in the frame. It was a literal at
 * first, but the block now has a Colour Theme control, and a literal teal pill
 * vanishes the moment an editor picks Teal or Navy for the box. So the pill is
 * bound to the roles that resolve to the frame's values on Ash and White
 * (text-muted #005361 for the fill, cta-text #ffffff for the label) and flip to
 * a legible pair on every other theme: sand on navy, sand on teal, black on
 * gold and ochre. The fallbacks are the frame's own values.
 */
/*
 * The widget root is an inline-size container, so the narrow-box rules at the
 * end of this block key off the column the widget sits in, not the viewport:
 * it can be dropped in a sidebar column on a desktop page. The root and not
 * the box, because a container query styles a container's descendants and
 * never the container itself, and the box's own padding is one of the rules.
 */
.elementor-widget-ota_sig_resources {
	container-type: inline-size;
}

/*
 * The Colour Theme control writes its class on Elementor's widget wrapper and
 * Colour_Themes paints a themed element's background at zero specificity. Here
 * the rounded box is the surface, so the wrapper goes clear (one class beats
 * :where()) and only the box carries the colour. The rule keys off the box's
 * own layout class rather than a wrapper class set from PHP: Elementor's
 * editor preview renders the widget through render_content() alone and never
 * runs before_render(), so a wrapper attribute would only land on the
 * frontend and the editor would still show a square behind the box. The cards
 * layout keeps the painted wrapper as its band.
 */
.elementor-widget-ota_sig_resources:has(.ota-sig-resources--downloads) {
	background-color: transparent;
}

.ota-sig-resources.ota-sig-resources--downloads {
	box-sizing: border-box;
	padding: 36px 34px;
	border-radius: 14px;
	background: var(--ota-background, #f0e7d8);
}

.ota-sig-resources--downloads .ota-sig-resources__inner {
	max-width: none;
	padding-inline: 0;
	gap: 24px;
}

.ota-sig-resources--downloads .ota-sig-resources__head {
	max-width: 660px;
	gap: 16px;
}

/* Heading/H3 in the frame: 32/34.6, tracking -0.32, regular weight. */
.ota-sig-resources--downloads .ota-sig-resources__title {
	font-size: 32px;
	line-height: 1.08;
	letter-spacing: -0.32px;
}

/*
 * The frame sets this line at 15/15, a single-line artefact. 1.4 is used so a
 * sentence that wraps on a phone stays readable; the size and weight are as
 * drawn. The frame's black is unbound, but the box follows the page theme's
 * background role, so the copy follows the text role with the frame's value
 * as the fallback: black on sand by default, light on a dark page theme,
 * never black on navy (PR #42 review).
 */
.ota-sig-resources__intro {
	margin: 0;
	color: var(--ota-text, #000000);
	font-size: 15px;
	font-weight: 300;
	line-height: 1.4;
}

.ota-sig-resources__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * Each item is a flex box, so the pill is its flex child and the item is
 * exactly the pill's height. As a list item the inline-flex pill sat on the
 * item's 24px text baseline and the item ran 8px taller than the pill.
 */
.ota-sig-resources--downloads .ota-sig-resources__buttons-item {
	display: flex;
	margin: 0;
	padding: 0;
}

/*
 * The theme's _content.scss spaces list items with
 *
 *   main#agendtheme-content .agendtheme-content-inner:not(…) ul:not(…, …)
 *   li + li { margin-top: 0.5rem }
 *
 * one id, three classes and four elements, so the class reset above loses and
 * every pill after the first sat 8px low. Restated at one id and five classes,
 * the same counter ota-secondary-nav.css documents. Measure it on the SECOND
 * pill: the theme rule skips the first.
 */
#agendtheme-content .ota-sig-resources--downloads .ota-sig-resources__inner .ota-sig-resources__buttons > .ota-sig-resources__buttons-item + .ota-sig-resources__buttons-item {
	margin-top: 0;
}

/*
 * The pill: 54.75px tall in the frame, glyph 26px in, 12px to a 15px bold
 * label, 26px trailing. Solid at rest and hollow on hover, the same paint swap
 * the OTA primary button makes, so the two read as one family without this
 * borrowing the button stylesheet's tokens or its badge machinery.
 */
.ota-sig-resources__download {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	min-height: 55px;
	padding: 0 26px;
	border: 2px solid var(--ota-text-muted, #005361);
	border-radius: 999px;
	background: var(--ota-text-muted, #005361);
	color: var(--ota-cta-text, #ffffff);
	max-width: 100%;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: left;
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease;
}

.ota-sig-resources__download:hover,
.ota-sig-resources__download:focus-visible {
	background: transparent;
	color: var(--ota-text-muted, #005361);
	text-decoration: none;
}

/* The same 3px ring the OTA buttons draw, so focus looks alike across a page. */
.ota-sig-resources__download:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(73, 199, 218, 0.55);
}

/*
 * The frame's own glyph, masked so it is painted in the pill's text colour and
 * follows it through the hover swap. Sized explicitly on both axes: an unsized
 * mask box collapses inside a flex row.
 */
.ota-sig-resources__download-icon {
	display: inline-block;
	flex: none;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: url(../img/ota-download.svg) center / 18px 18px no-repeat;
	mask: url(../img/ota-download.svg) center / 18px 18px no-repeat;
}

/*
 * Labels wrap only when a pill would otherwise be wider than the box. A pill
 * that fits keeps its one line, because a wrapping flex row never shrinks an
 * item that fits; one that does not fit takes a line of its own, shrinks to
 * the box and wraps. Without this the third pill in a 368px column ran out of
 * the box.
 */
.ota-sig-resources__download-label {
	white-space: normal;
}

/*
 * A narrow box, whether a phone or a sidebar column on a desktop page: less
 * padding and a smaller heading, so "Downloadable resources" stays on one
 * line down to about 300px of box.
 */
@container (max-width: 560px) {
	.ota-sig-resources.ota-sig-resources--downloads {
		padding: 28px 24px;
	}

	.ota-sig-resources--downloads .ota-sig-resources__title {
		font-size: 26px;
	}
}

/* One pill per row on a phone. Padding and heading size come from the
   container rule above, since a phone is also a narrow box. */
@media (max-width: 767px) {
	.ota-sig-resources__buttons-item {
		flex: 1 1 100%;
	}

	.ota-sig-resources__download {
		width: 100%;
		min-height: 50px;
		padding-block: 14px;
	}
}
