/**
 * Mönster — block editor styles.
 *
 * The editor gets the same measure, the same faces and the same block styles
 * as the page, so what an editor sees while writing is what a reader gets.
 * Loaded through add_editor_style() (which scopes it to the canvas) and again
 * through enqueue_block_assets for the block styles themselves.
 */

.editor-styles-wrapper {
	background: var(--mn-cream);
	color: var(--mn-body);
	font-family: var(--mn-serif);
	font-weight: 300;
	font-size: 20px;
	line-height: 1.75;
	font-optical-sizing: auto;
}

.editor-styles-wrapper .wp-block {
	max-width: 720px;
}

.editor-styles-wrapper .wp-block[data-align="wide"],
.editor-styles-wrapper .wp-block[data-align="full"] {
	max-width: none;
}

.editor-styles-wrapper .editor-post-title__input,
.editor-styles-wrapper .wp-block-post-title {
	font-family: var(--mn-display);
	font-weight: 800;
	font-size: 52px;
	line-height: 0.98;
	letter-spacing: -0.04em;
	color: var(--mn-ink);
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
	font-family: var(--mn-display);
	color: var(--mn-ink);
	text-wrap: pretty;
}

.editor-styles-wrapper h2 {
	font-weight: 700;
	font-size: 34px;
	line-height: 1.1;
	letter-spacing: -0.03em;
}

.editor-styles-wrapper h3 {
	font-weight: 700;
	font-size: 25px;
	line-height: 1.2;
	letter-spacing: -0.025em;
}

.editor-styles-wrapper h4 {
	font-weight: 700;
	font-size: 21px;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.editor-styles-wrapper p {
	font-family: var(--mn-serif);
	font-weight: 300;
	line-height: 1.75;
}

.editor-styles-wrapper a {
	color: var(--mn-ink);
	border-bottom: 1px solid var(--mn-tomato);
}

.editor-styles-wrapper strong {
	font-weight: 500;
	color: var(--mn-ink-soft);
}

.editor-styles-wrapper code,
.editor-styles-wrapper pre {
	font-family: var(--mn-mono);
}

.editor-styles-wrapper figcaption,
.editor-styles-wrapper .wp-element-caption {
	font-family: var(--mn-serif);
	font-style: italic;
	font-weight: 300;
	font-size: 14px;
	color: var(--mn-muted);
}

/* ── Block styles, shared with the front end ──────────────────────── */

.is-style-mn-lead {
	font-weight: 400 !important;
	font-size: 21px !important;
	line-height: 1.7 !important;
	color: var(--mn-ink-soft) !important;
}

/* Numbered stops: an ordinary ordered list, drawn as the design's stop rows.
   The first <strong> in an item becomes its title. Positioned, not gridded —
   see the note in theme.css. */
.is-style-mn-stops {
	list-style: none;
	padding-left: 0;
	counter-reset: mn-stop;
}

.is-style-mn-stops > li {
	position: relative;
	padding: 20px 0 20px 76px;
	border-top: 1px solid var(--mn-rule);
	counter-increment: mn-stop;
	font-size: 19px;
	line-height: 1.7;
}

.is-style-mn-stops > li::before {
	content: counter(mn-stop, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 20px;
	font-family: var(--mn-display);
	font-weight: 800;
	font-size: 30px;
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--mn-accent-display, var(--mn-tomato-display));
}

.is-style-mn-stops > li > strong:first-child {
	display: block;
	margin-bottom: 6px;
	font-family: var(--mn-display);
	font-weight: 700;
	font-size: 22px;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--mn-ink);
}

/* Accent panel: the pull quote as a solid block of colour. */
.wp-block-quote.is-style-mn-panel,
.wp-block-pullquote.is-style-mn-panel {
	padding: 32px 34px;
	border: 0;
	border-radius: var(--mn-r-xl, 20px);
	background: var(--mn-sky);
	color: var(--mn-on-sky);
	text-align: left;
}

.wp-block-quote.is-style-mn-panel p,
.wp-block-pullquote.is-style-mn-panel p {
	font-family: var(--mn-serif);
	font-weight: 400;
	font-size: 27px;
	line-height: 1.35;
	color: var(--mn-on-sky);
}

.wp-block-quote.is-style-mn-panel cite,
.wp-block-pullquote.is-style-mn-panel cite {
	display: block;
	margin-top: 14px;
	font-family: var(--mn-mono);
	font-style: normal;
	font-weight: 500;
	font-size: 10px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--mn-on-sky-soft);
}

/* Ticket tear. */
.wp-block-separator.is-style-mn-ticket {
	border: 0;
	border-top: 2px dashed var(--mn-ink);
	background: none;
	height: 0;
	opacity: 1;
}

/* Practical callout: a group with an amber header strip. Its first heading
   becomes the strip. */
.wp-block-group.is-style-mn-practical {
	border: 2px solid var(--mn-ink);
	border-radius: var(--mn-r-xl, 20px);
	overflow: hidden;
	padding: 0;
}

.wp-block-group.is-style-mn-practical > :first-child {
	margin: 0;
	padding: 14px 24px;
	background: var(--mn-amber);
	font-family: var(--mn-mono);
	font-weight: 600;
	font-size: 11px;
	line-height: 1;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--mn-on-amber);
}

.wp-block-group.is-style-mn-practical > :not(:first-child) {
	margin: 0;
	padding: 0 24px;
}

.wp-block-group.is-style-mn-practical > :last-child {
	padding-bottom: 26px;
}

.wp-block-group.is-style-mn-practical > :nth-child(2) {
	padding-top: 22px;
}

/* Key/value table — the practical rows, as a plain two-column table. */
.wp-block-table.is-style-mn-keyvalue table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table.is-style-mn-keyvalue td {
	padding: 0 0 11px;
	border: 0;
	border-bottom: 1px solid rgba(30, 26, 23, .14);
	vertical-align: baseline;
}

.wp-block-table.is-style-mn-keyvalue tr:last-child td {
	border-bottom: 0;
}

.wp-block-table.is-style-mn-keyvalue td:first-child {
	width: 130px;
	padding-right: 18px;
	font-family: var(--mn-mono);
	font-weight: 500;
	font-size: 10px;
	line-height: 1.4;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--mn-muted);
}

.wp-block-table.is-style-mn-keyvalue td:last-child {
	font-family: var(--mn-serif);
	font-weight: 300;
	font-size: 18px;
	line-height: 1.5;
	color: var(--mn-ink-soft);
}

/* ── Page-level pattern blocks ────────────────────────────────────── */

.mn-pattern-cards {
	display: grid;
	gap: 16px;
}

.mn-pattern-cards.is-three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mn-pattern-cards.is-four {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
	.mn-pattern-cards.is-three,
	.mn-pattern-cards.is-four {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.mn-pattern-cards.is-three,
	.mn-pattern-cards.is-four {
		grid-template-columns: minmax(0, 1fr);
	}
}
