/* WordPress / Gutenberg wrappers for the Tiffany Irvine design.
   Loaded after styles.css. */

.wp-site-blocks,
.wp-block-post-content,
main.wp-block-group {
	margin: 0;
	padding: 0;
}

/* Template-part wrappers would trap the sticky header inside their own height. */
.wp-site-blocks > .wp-block-template-part,
.wp-block-post-content > .wp-block-block,
.wp-block-block {
	display: contents;
}

/* Buttons and text links are paragraphs in the editor; on the page the
   paragraph steps aside so the button sits in its row exactly as designed. */
p.btn-wrap,
p.span-wrap {
	display: contents;
}

/* Whole-card links: the heading carries the link and stretches over the card.
   Turned off in the editor (editor.css) so the text stays clickable there. */
.is-card-link {
	position: relative;
}

.is-card-link a.card-link {
	color: inherit;
	text-decoration: none;
}

.is-card-link a.card-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.is-card-link a.card-link:focus-visible {
	outline: none;
}

.is-card-link:has(a.card-link:focus-visible) {
	outline: 2px solid var(--c-rose);
	outline-offset: 3px;
}

/* The design's polaroids use the browser's default <figure> margin, which
   WordPress's block styles reset. Put it back. */
figure.wp-block-group.polaroid {
	margin: 1em 40px;
}

/* Polaroid caption: a <figcaption> in the design, a paragraph here, so the
   section's paragraph rules (.intro p) must not restyle it. */
.polaroid p.polaroid__caption {
	max-width: none;
	margin: 0;
	color: var(--c-ink);
	font-size: 2.6rem;
	line-height: 1;
}

.intro .polaroid p.polaroid__caption {
	font-size: 3.4rem;
}

@media (max-width: 959px) {
	.intro .polaroid p.polaroid__caption {
		font-size: 2.5rem;
		white-space: nowrap;
	}
}

/* Contact list rows: label + value sit straight in the row's box, as designed. */
.contact-list li > div > p {
	display: contents;
}

/* FAQ: core Details blocks keep the design's .faq styling. */
.faq .wp-block-details {
	margin: 0;
}

.faq .wp-block-details > summary {
	list-style: none;
}

/* Comparison table: a core Table block. The block's figure carries the
   design's class, so the table inside gets the table-level rules. */
.wp-block-table.compare-table {
	overflow: hidden;
	margin: 0;
}

.wp-block-table.compare-table table {
	width: 100%;
	border-collapse: collapse;
}

.wp-block-table.compare-table thead {
	border-bottom: 0;
}

.wp-block-table.compare-table th,
.wp-block-table.compare-table td {
	border-width: 0 0 1px;
	border-style: solid;
	border-color: var(--c-line);
}

.wp-block-table.compare-table tr:last-child > * {
	border-bottom: 0;
}

.wp-block-table.compare-table thead th:last-child {
	color: var(--c-rose-dark);
}

.wp-block-table.compare-table .wp-element-caption {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 640px) {
	.wp-block-table.compare-table {
		overflow: visible;
	}
	.wp-block-table.compare-table table,
	.wp-block-table.compare-table tbody,
	.wp-block-table.compare-table tr,
	.wp-block-table.compare-table th,
	.wp-block-table.compare-table td {
		display: block;
		width: 100%;
	}
	.wp-block-table.compare-table thead {
		display: none;
	}
}

/* Lists made of cards keep the design's bare list. */
ul.wp-block-group,
ol.wp-block-group {
	list-style: none;
}

/* Contact form. */
.form__status.is-error {
	background: #fdecea;
	color: #8a1c1c;
}

.hp {
	position: absolute !important;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

/* Utilities that replace the static pages' inline styles. */
.u-justify-center { justify-content: center !important; }
.u-pt-0 { padding-top: 0 !important; }
.u-mb-2 { margin-bottom: 2rem !important; }
.u-mt-8 { margin-top: var(--space-8) !important; }
.u-mt-075 { margin-top: .75rem !important; }
.u-maxw-52 { max-width: 52ch; }
.u-link-plain { text-decoration: none !important; color: inherit !important; }
.u-underline { text-decoration: underline !important; }
.u-fs-095 { font-size: .95rem !important; }
.u-fs-22 { font-size: 2.2rem !important; }
.u-fs-26 { font-size: 2.6rem !important; }
