/* 1. Editor canvas and colour palette
   ========================================================================== */

.editor-styles-wrapper {
	background: var(--color-bg);
	color: var(--color-text);
	font: 400 var(--text-base) / 1.6 var(--font-sans);
}

/* The palette offered in the editor (inc/setup.php) follows light/dark mode. */
body,
.editor-styles-wrapper {
	--wp--preset--color--accent: var(--color-accent);
	--wp--preset--color--primary: var(--color-heading);
	--wp--preset--color--muted: var(--color-text-muted);
	--wp--preset--color--surface: var(--color-surface);
}

/* 2. Text
   ========================================================================== */

:is(.entry-content, .editor-styles-wrapper)> :first-child {
	margin-top: 0;
}

:is(.entry-content, .editor-styles-wrapper)> :last-child {
	margin-bottom: 0;
}

:is(.entry-content, .editor-styles-wrapper) :is(h2, h3, h4) {
	margin: 1.8em 0 0.6em;
	color: var(--color-heading);
	font-family: var(--font-serif);
	font-weight: 600;
	line-height: 1.3;
}

:is(.entry-content, .editor-styles-wrapper) h2 {
	font-size: var(--text-xl);
}

:is(.entry-content, .editor-styles-wrapper) h3 {
	font-size: var(--text-lg);
}

:is(.entry-content, .editor-styles-wrapper) h4 {
	font: 700 var(--text-base) / 1.4 var(--font-sans);
}

:is(.entry-content, .editor-styles-wrapper) :is(h2, h3, h4)+ :is(h3, h4) {
	margin-top: 0.8em;
}

:is(.entry-content, .editor-styles-wrapper) p {
	margin: 0 0 1em;
}

:is(.entry-content, .editor-styles-wrapper) a:not([class]) {
	color: var(--color-accent);
	text-underline-offset: 0.15em;
}

:is(.entry-content, .editor-styles-wrapper) :is(ul, ol):not(.is-style-committee) {
	margin: 0 0 1.25em;
	padding-left: 1.4em;
}

:is(.entry-content, .editor-styles-wrapper) li {
	margin-bottom: 0.4em;
}

:is(.entry-content, .editor-styles-wrapper) li::marker {
	color: var(--color-accent);
}

:is(.entry-content, .editor-styles-wrapper) blockquote {
	margin: 1.5em 0;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--color-accent);
	font-family: var(--font-serif);
	font-style: italic;
}

:is(.entry-content, .editor-styles-wrapper) :is(figure, .wp-block-image) {
	margin: 1.5em 0;
}

:is(.entry-content, .editor-styles-wrapper) img {
	border-radius: var(--radius);
}

:is(.entry-content, .editor-styles-wrapper) figcaption {
	margin-top: 8px;
	color: var(--color-text-muted);
	font-size: var(--text-sm);
}

:is(.entry-content, .editor-styles-wrapper) hr {
	margin: 2.5em 0;
	border: 0;
	border-top: 1px solid var(--color-border-subtle);
}

:is(.entry-content, .editor-styles-wrapper) code {
	padding: 0.1em 0.35em;
	border-radius: 4px;
	background: var(--color-accent-soft);
	font-size: 0.9em;
}

/* 3. Tables
   ========================================================================== */

:is(.entry-content, .editor-styles-wrapper) .wp-block-table {
	margin: 1.5em 0;
	overflow-x: auto;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	background: var(--color-surface);
	font-size: 0.975rem;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-table :is(th, td) {
	padding: 10px 14px;
	border: 1px solid var(--color-border-subtle);
	text-align: left;
	vertical-align: top;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-table thead {
	border-bottom: 0;
}

/* Navy in both modes, so the header text stays white. */
:is(.entry-content, .editor-styles-wrapper) .wp-block-table thead th {
	border-color: var(--color-primary);
	background: var(--color-primary);
	color: var(--color-on-dark);
	font-weight: 600;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-table tbody tr:nth-child(even) {
	background: var(--color-bg);
}

/* 4. Buttons
   ========================================================================== */

:is(.entry-content, .editor-styles-wrapper) .wp-block-buttons {
	gap: 12px;
	margin: 1.5em 0;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-button__link {
	padding: 12px 22px;
	border: 1.5px solid var(--color-accent);
	border-radius: var(--radius);
	background: var(--color-accent);
	color: var(--color-on-accent);
	font: 600 0.975rem / 1.2 var(--font-sans);
	text-decoration: none;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-button__link:hover {
	border-color: var(--color-accent-hover);
	background: var(--color-accent-hover);
	color: var(--color-on-accent);
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background) {
	padding: 12px 22px;
	border: 1.5px solid var(--color-accent);
	background: transparent;
	color: var(--color-accent);
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background):hover {
	background: var(--color-accent-soft);
}

/* 5. Block styles: committee members, program
   ========================================================================== */
:is(.entry-content, .editor-styles-wrapper) ul.is-style-committee {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 14px;
	margin: 1em 0 2em;
	padding: 0;
	list-style: none;
}

:is(.entry-content, .editor-styles-wrapper) .is-style-committee>li {
	margin: 0;
	padding: 16px 18px;
	border: 1px solid var(--color-border-subtle);
	border-left: 3px solid var(--color-accent);
	border-radius: var(--radius);
	background: var(--color-surface);
	color: var(--color-text-muted);
	font-size: 0.9375rem;
	line-height: 1.5;
}

:is(.entry-content, .editor-styles-wrapper) .is-style-committee strong {
	color: var(--color-heading);
	font: 600 1.0625rem / 1.4 var(--font-serif);
}

:is(.entry-content, .editor-styles-wrapper) .is-style-committee em {
	display: inline-block;
	margin-bottom: 6px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--color-accent-soft);
	color: var(--color-accent);
	font-size: var(--text-xs);
	font-style: normal;
	font-weight: 700;
}

:is(.entry-content, .editor-styles-wrapper) .is-style-program :is(th, td):first-child {
	width: 8rem;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	white-space: nowrap;
}

:is(.entry-content, .editor-styles-wrapper) .is-style-program td:last-child {
	width: 11rem;
	color: var(--color-text-muted);
}


.wp-block-quantum-conf-important-dates {
	margin: 1.5em 0;
}

.date-list {
	--marker-y: 27px;
	/* centre of the marker: middle of the first text line */
	margin: 0;
	padding: 0;
	list-style: none;
}

.date-list__item {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
	gap: 2px 24px;
	margin: 0;
	padding: 14px 0 14px 34px;
	border-bottom: 1px solid var(--color-border-subtle);
}

.date-list__item::before {
	content: "";
	position: absolute;
	top: calc(var(--marker-y) - 7px);
	left: 0;
	z-index: 1;
	width: 14px;
	height: 14px;
	border: 2px solid var(--color-accent);
	border-radius: 50%;
	background: var(--color-surface);
}

.date-list__item:not(:last-child)::after {
	content: "";
	position: absolute;
	top: var(--marker-y);
	bottom: calc(-1 * var(--marker-y));
	left: 6px;
	width: 2px;
	background: var(--color-accent);
}

.date-list__date {
	color: var(--color-heading);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.date-list__item.is-highlight::before {
	background: var(--color-accent);
	box-shadow: 0 0 0 4px var(--color-accent-soft);
}

.date-list__item.is-highlight .date-list__label {
	color: var(--color-heading);
	font-weight: 600;
}

.date-list__item.is-past::before {
	border-color: var(--color-border);
	background: var(--color-border-subtle);
}

.date-list__item.is-past::after {
	background: var(--color-border-subtle);
}

.date-list__item.is-past .date-list__date {
	color: var(--color-text-muted);
	font-weight: 600;
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

.date-list--compact {
	--marker-y: 12px;
}

.date-list--compact .date-list__item {
	grid-template-columns: minmax(0, 1fr);
	padding: 0 0 16px 28px;
	border-bottom: 0;
}

.date-list--compact .date-list__item:last-child {
	padding-bottom: 0;
}

.date-list--compact .date-list__label {
	color: var(--color-text-muted);
	font-size: var(--text-sm);
}

@media (max-width: 600px) {
	.date-list__item {
		grid-template-columns: minmax(0, 1fr);
	}
}