/**
 * Simple page template (includes/simple-page.php): a terracotta title band, then
 * block editor content in one column (880px) on white. Built on
 * design-system.css tokens; type and spacing follow the homepage (16px
 * Roboto body, Tipique headings, the 4px spacing scale).
 *
 * Everything is scoped to .ql-simple, so nothing here reaches other pages.
 *
 * The band reuses the homepage newsletter bar's fabric background.
 */

.ql-ds.ql-simple {
	--ql-font-size-body: 16px; /* As on the homepage (.ql-ds.ql-home). */
	--ql-simple-measure: 880px; /* The content well: about 95 characters per line at 16px. */
	--ql-simple-gutter: var(--ql-space-5); /* 24px side padding at every width, as on the homepage. */
	--ql-simple-rule: var(--ql-color-card-border); /* Table row lines and rules: the same sand as the table's border. */
	--ql-simple-muted: #6f6656; /* Captions; 5.66:1 on white. */
	background-color: var(--ql-color-surface);
}

/* Layout ------------------------------------------------------------------- */

.ql-simple .ql-simple__column {
	width: 100%;
	max-width: calc(var(--ql-simple-measure) + 2 * var(--ql-simple-gutter));
	margin-inline: auto;
	padding-inline: var(--ql-simple-gutter);
}

/* Terracotta fabric band, white title: the same background as the
   homepage's "Let's Connect" bar (.has-pattern-bg in homepage.css). White
   text is 5.2:1 on it. */
.ql-simple .ql-simple__band {
	padding-block: var(--ql-space-8) var(--ql-space-7);
	background:
		linear-gradient(rgb(173 83 55 / 70%), rgb(173 83 55 / 70%)),
		url("../img/fabric-terracotta.jpg") repeat;
	background-color: #ad5337; /* The tile's main color, shown while it loads. */
}

.ql-simple .ql-simple__title {
	color: #fff;
	font-size: clamp(2.125rem, 1.8rem + 1.3vw, 2.75rem); /* 34px on phones up to 44px. */
}

.ql-simple .ql-simple__body {
	padding-block: var(--ql-space-7) var(--ql-space-8);
}

/* Content ------------------------------------------------------------------ */

.ql-simple .ql-simple__content {
	color: var(--ql-color-text);
	font-family: var(--ql-font-body);
	font-size: var(--ql-font-size-body);
	line-height: var(--ql-line-height-body);
	overflow-wrap: break-word;
}

.ql-simple .ql-simple__content > :first-child {
	margin-top: 0;
}

.ql-simple .ql-simple__content > :last-child {
	margin-bottom: 0;
}

/* Headings: clear space above (more than below, so each heading sits with
   the text it introduces). */
.ql-simple .ql-simple__content :is(h2, h3, h4) {
	color: var(--ql-color-dark);
	line-height: var(--ql-line-height-heading);
}

/* Sizes: a little under the design system's h2 and h3 (the homepage's
   section and card titles), so long legal pages read calmer; h4 one step
   below h3. */
.ql-simple .ql-simple__content :is(h2, h3, h4) {
	font-family: var(--ql-font-heading);
	font-weight: 400; /* Tipique has no bold; avoid faux bold. */
}

.ql-simple .ql-simple__content h2 {
	margin: var(--ql-space-7) 0 var(--ql-space-4);
	font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.875rem); /* 24px up to 30px. */
}

.ql-simple .ql-simple__content h3 {
	margin: var(--ql-space-7) 0 var(--ql-space-4);
	font-size: clamp(1.25rem, 1.2rem + 0.2vw, 1.375rem); /* 20px up to 22px. */
}

.ql-simple .ql-simple__content h4 {
	margin: var(--ql-space-6) 0 var(--ql-space-3);
	font-size: 1.125rem; /* 18px. */
}

/* A heading straight after another needs less room. */
.ql-simple .ql-simple__content :is(h2, h3, h4) + :is(h3, h4) {
	margin-top: var(--ql-space-3);
}

.ql-simple .ql-simple__content p {
	margin: 0 0 var(--ql-space-5);
}

.ql-simple .ql-simple__content a,
.ql-simple .ql-simple__content a:visited {
	color: var(--ql-color-link);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.ql-simple .ql-simple__content a:hover {
	color: var(--ql-color-button-hover);
}

.ql-simple .ql-simple__content strong,
.ql-simple .ql-simple__content b {
	font-weight: 700;
}

/* Lists: one marker per item, indented, a little space between items, and
   nested lists one level in. */
.ql-simple .ql-simple__content :is(ul, ol) {
	margin: 0 0 var(--ql-space-5);
	padding-left: 1.5em;
}

.ql-simple .ql-simple__content ul {
	list-style: disc;
}

.ql-simple .ql-simple__content ol {
	list-style: decimal;
}

.ql-simple .ql-simple__content li {
	margin: 0;
	padding-left: 0.25em;
}

.ql-simple .ql-simple__content li + li {
	margin-top: var(--ql-space-2);
}

.ql-simple .ql-simple__content li > :is(ul, ol) {
	margin: var(--ql-space-2) 0 0;
}

.ql-simple .ql-simple__content li ul {
	list-style: circle;
}

/* Bullets in the site terracotta (the button color, #b0573a). */
.ql-simple .ql-simple__content ul > li::marker {
	color: var(--ql-color-button);
}

/* The theme or a builder can draw its own marker as well; keep only the
   list's own. */
.ql-simple .ql-simple__content li::before {
	content: none;
}

/* Quotes: a terracotta bar, no box. */
.ql-simple .ql-simple__content blockquote {
	margin: var(--ql-space-6) 0;
	padding: 0 0 0 var(--ql-space-5);
	border: 0;
	border-left: 4px solid var(--ql-color-primary);
	color: var(--ql-color-text);
	font-size: var(--ql-font-size-body);
	font-style: normal;
}

.ql-simple .ql-simple__content blockquote p:last-of-type {
	margin-bottom: 0;
}

.ql-simple .ql-simple__content blockquote cite {
	display: block;
	margin-top: var(--ql-space-2);
	color: var(--ql-simple-muted);
	font-size: var(--ql-font-size-small);
	font-style: normal;
}

/* Tables: a warm-bordered box with rounded corners, a cream header row,
   light lines between rows. Scrolls sideways on phones rather than squash.
   The table block wraps its table in a figure. */
.ql-simple .ql-simple__content .wp-block-table {
	margin: var(--ql-space-6) 0;
	overflow-x: auto;
}

.ql-simple .ql-simple__content table {
	width: 100%;
	margin: var(--ql-space-6) 0;
	border: 1px solid var(--ql-color-card-border);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--ql-radius);
	font-size: var(--ql-font-size-body);
	line-height: 1.5;
}

.ql-simple .ql-simple__content .wp-block-table table {
	margin: 0;
}

.ql-simple .ql-simple__content :is(th, td) {
	padding: var(--ql-space-3) var(--ql-space-4);
	border: 0;
	border-bottom: 1px solid var(--ql-simple-rule);
	background: none;
	color: var(--ql-color-text);
	text-align: left;
	vertical-align: top;
}

.ql-simple .ql-simple__content tr:last-child > :is(th, td) {
	border-bottom: 0;
}

/* The theme (Hello Elementor) draws a grey line above the first row's
   cells; the table's own border is the top edge. */
.ql-simple .ql-simple__content table :is(thead, tbody):first-child > tr:first-child > :is(th, td) {
	border-top: 0;
}

/* Header cells (a header row, or th in the first row or column): cream,
   bold navy. The block editor's "Header section" puts them in thead. */
.ql-simple .ql-simple__content th,
.ql-simple .ql-simple__content thead :is(th, td) {
	background-color: var(--ql-color-accent-bg);
	color: var(--ql-color-dark);
	font-weight: 700;
}

.ql-simple .ql-simple__content thead tr:last-child > :is(th, td) {
	border-bottom: 1px solid var(--ql-color-card-border);
}

.ql-simple .ql-simple__content tfoot :is(th, td) {
	border-top: 1px solid var(--ql-color-card-border);
	font-weight: 700;
}

/* Rounded corners on the cells that touch them, so the cream header
   doesn't poke out of the box. */
.ql-simple .ql-simple__content table > :first-child > tr:first-child > :first-child {
	border-top-left-radius: var(--ql-radius);
}

.ql-simple .ql-simple__content table > :first-child > tr:first-child > :last-child {
	border-top-right-radius: var(--ql-radius);
}

/* The table block's "Stripes" style: cream on every other row. */
.ql-simple .ql-simple__content .is-style-stripes {
	border-bottom: 0;
}

.ql-simple .ql-simple__content .is-style-stripes tbody tr:nth-child(odd) > :is(th, td) {
	background-color: var(--ql-color-accent-bg);
}

.ql-simple .ql-simple__content figcaption {
	margin-top: var(--ql-space-2);
	color: var(--ql-simple-muted);
	font-size: var(--ql-font-size-small);
}

.ql-simple .ql-simple__content hr {
	margin: var(--ql-space-7) 0;
	border: 0;
	border-top: 1px solid var(--ql-simple-rule);
}
