/**
 * Modal Kit Site: the design pages' shared CSS.
 * Loaded on the front end and in the editor. Colours and fonts are theme.json
 * presets; the class names below match the design so the two can be compared.
 */

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
}

/* As in the design: *{box-sizing:border-box}. */
.wp-site-blocks *,
.wp-site-blocks *::before,
.wp-site-blocks *::after {
	box-sizing: border-box;
}

/* Core gives every flex layout flex-wrap:wrap. A wrapping column sizes its
   children from their max-content, which inflates grids inside it; the
   design's columns never wrap. */
.is-layout-flex.is-vertical {
	flex-wrap: nowrap;
}

/* The design sets every gap itself: no default margins on blocks. */
:where(.wp-site-blocks) :where(h1, h2, h3, h4, h5, h6, p, figure, ul, ol, pre, blockquote, details, table) {
	margin-block: 0;
}

:where(.wp-site-blocks) :where(h1, h2, h3) {
	text-wrap: balance;
}

:where(.wp-site-blocks) :where(p) {
	text-wrap: pretty;
}

/* The serif accent word in titles: "Modals made of <em>blocks</em>." */
:where(h1, h2, h3) em {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.01em;
	color: var(--mkwp-em, var(--wp--preset--color--accent));
}

/* Inline code, as on the information pages. */
:where(p, li, td, th, summary, span, h1, h2, h3, h4, figcaption) code {
	font: 500 0.92em var(--wp--preset--font-family--mono);
	background: var(--wp--preset--color--chip);
	border-radius: 4px;
	padding: 1px 5px;
	overflow-wrap: anywhere;
}

/* Plain mono, no chip (e.g. "#autumn-sale" on the dark band). */
:where(p, li, span, h1, h2, h3, h4) code.mk-plain,
.has-mono-font-family code {
	font: inherit;
	font-family: var(--wp--preset--font-family--mono);
	background: none;
	padding: 0;
}

.wp-block-code {
	font-family: var(--wp--preset--font-family--mono);
}

.wp-block-code code {
	font: inherit;
	background: none;
	padding: 0;
	border-radius: 0;

	/* As the design's <pre>: long lines stay whole (the block scrolls). */
	white-space: pre;
	overflow-wrap: normal;
}

/* Inline code on the dark bands. */
.has-ink-background-color :where(p, li, span) code:not(.mk-plain) {
	background: rgba(244, 242, 236, 0.12);
	color: var(--wp--preset--color--cream);
}

button {
	font: inherit;
}

/* Paragraph styles */
.is-style-kicker {
	font: 500 12px var(--wp--preset--font-family--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.is-style-kicker:not(.has-text-color) {
	color: var(--wp--preset--color--subtle);
}

.is-style-mono {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
}

.is-style-chip {
	display: inline-block;
	padding: 6px 11px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
}

.is-style-chip:not(.has-background) {
	background: var(--wp--preset--color--chip);
}

.is-style-pill {
	display: inline-block;
	padding: 9px 14px;
	border: 1px solid var(--wp--preset--color--stroke);
	border-radius: 99px;
	font-size: 14px;
}

.is-style-badge,
.mkwp-badge {
	display: inline-block;
	font: 500 10px/normal var(--wp--preset--font-family--mono);
	padding: 1px 5px;
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: 4px;
	color: var(--wp--preset--color--body);
	vertical-align: middle;
}

/* Buttons: the default is the dark button (theme.json). */
.wp-block-button .wp-block-button__link {
	display: inline-block;
	text-align: center;
}

.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--stroke);
	padding: 15px 24px;
}

.wp-block-button.is-style-light > .wp-block-button__link,
.wp-block-button.is-style-light > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

.wp-block-button.is-style-ghost > .wp-block-button__link,
.wp-block-button.is-style-ghost > .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--white);
	border: 1px solid rgba(255, 255, 255, 0.5);
}

.wp-block-button.is-style-small > .wp-block-button__link {
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 14px;
}

.wp-block-button.is-style-small.is-style-outline > .wp-block-button__link {
	padding: 10px 16px;
}

/* Cards */
.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line-2);
	border-radius: 14px;
}

/* Questions (core/details) */
.wp-block-details.is-style-faq {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line-2);
	border-radius: 12px;
}

/* A little room between question cards (not the homepage's plain rows). */
.wp-block-details.is-style-faq:not(.mk-acc) + .wp-block-details.is-style-faq:not(.mk-acc) {
	margin-top: 8px;
}

.wp-block-details.is-style-faq > summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: baseline;
	padding: 18px 20px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	min-height: 44px;
}

.wp-block-details.is-style-faq > summary::-webkit-details-marker {
	display: none;
}

.wp-block-details.is-style-faq > summary::after {
	content: "+";
	flex: none;
	font: 500 18px var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--accent);
}

.wp-block-details.is-style-faq[open] > summary::after {
	content: "–";
}

.wp-block-details.is-style-faq > summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: -2px;
	border-radius: 12px;
}

.wp-block-details.is-style-faq > :not(summary) {
	padding: 0 20px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--wp--preset--color--text-2);
}

.wp-block-details.is-style-faq > :not(summary) + :not(summary) {
	margin-top: 10px;
}

.wp-block-details.is-style-faq > :last-child:not(summary) {
	padding-bottom: 20px;
}

/* Homepage accordion (Website #faq): a plain row, + / − on the right. */
.wp-block-details.is-style-faq.mk-acc > summary {
	align-items: center;
	padding: 22px 0;
	font-size: 18px;
	line-height: normal;
	min-height: 44px;
}

.wp-block-details.is-style-faq.mk-acc > summary::after {
	font: 400 22px var(--wp--preset--font-family--sans);
	color: var(--wp--preset--color--subtle);
}

.wp-block-details.is-style-faq.mk-acc[open] > summary::after {
	content: "−";
}

/* Small helpers the pages use where block supports stop. */
.mk-600 {
	font-weight: 600;
}

/* A card whose title link covers it, like the design's <a> cards. */
.mk-card-link {
	position: relative;
}

.mk-card-link a::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Real Modal Kit modals on this site (the hero's #modal-hello): the theme's
   zero block gap is for the design pages; a modal's blocks get the design's
   dialog spacing (gap 12px, buttons 18px below the text). */
.modal-kit__panel.is-layout-flow > * + * {
	margin-block-start: 12px;
}

.modal-kit__panel.is-layout-flow > .wp-block-buttons {
	margin-block-start: 18px;
}

/* Logo: mark + "Modal Kit" (header 24px mark, 18px text; footer 20px). */
.mkwp-logo,
.mkwp-logo a {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--wp--preset--color--ink);
}

.mkwp-logo img {
	display: block;
	height: auto;
}

/* The footer's trademark notice: full width under a
   rule, 12px grey text. */
.mkwp-legal {
	flex-basis: 100%;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 16px;
	border-top: 1px solid var(--wp--preset--color--line);
	font-size: 12px;
	line-height: 1.5;
	color: var(--wp--preset--color--subtle);
}

.mkwp-legal > p {
	margin: 0;
}

/* Footer columns: the current page's link is ink and bold. */
.mkwp-footer-nav .wp-block-navigation-item__content {
	padding: 0;
}

.mkwp-footer-nav .wp-block-navigation a.wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

/* "On this page" (pages/lib.js b.toc): the section
   links the header used to carry, as a rail fixed at the far left of the
   screen, centred vertically. One dash per section; the label shows on
   hover or focus; the section in view is marked by toc.js (aria-current).
   Wide screens only: below 1260px the content comes within 54px of the
   edge, where the rail would touch it. */
nav.mkwp-toc.mkwp-toc {
	position: fixed;
	top: 50%;
	left: 20px;
	z-index: 40;
	margin: 0;
	transform: translateY(-50%);
}

.mkwp-toc .wp-block-navigation__container {
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
}

.mkwp-toc .wp-block-navigation-item__content {
	position: relative;
	display: flex;
	align-items: center;
	width: 24px;
	height: 28px;
	padding: 0;
}

.mkwp-toc .wp-block-navigation-item__content::before {
	content: "";
	width: 12px;
	height: 2px;
	border-radius: 1px;
	background: var(--wp--preset--color--subtle);
	transition: width 0.2s ease, background-color 0.2s ease;
}

.mkwp-toc .wp-block-navigation-item__content:hover::before,
.mkwp-toc .wp-block-navigation-item__content:focus-visible::before,
.mkwp-toc .wp-block-navigation-item__content[aria-current]::before {
	width: 20px;
	background: var(--wp--preset--color--accent);
}

/* The label: read by screen readers always, shown on hover or focus. */
.mkwp-toc .wp-block-navigation-item__label {
	position: absolute;
	top: 50%;
	left: 30px;
	padding: 5px 10px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	background: var(--wp--preset--color--white);
	box-shadow: 0 6px 16px rgba(10, 9, 14, 0.08);
	color: var(--wp--preset--color--ink);
	font-size: 13px;
	line-height: 1.3;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transform: translate(-4px, -50%);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.mkwp-toc .wp-block-navigation-item__content:hover .wp-block-navigation-item__label,
.mkwp-toc .wp-block-navigation-item__content:focus-visible .wp-block-navigation-item__label {
	opacity: 1;
	transform: translate(0, -50%);
}

@media (prefers-reduced-motion: reduce) {

	.mkwp-toc .wp-block-navigation-item__content::before,
	.mkwp-toc .wp-block-navigation-item__label {
		transition: none;
	}
}

@media (max-width: 1259px) {

	nav.mkwp-toc.mkwp-toc {
		display: none;
	}
}

/* Anchored sections land flush with the top. */
:where(section[id]) {
	scroll-margin-top: 0;
}

/* ------------------------------------------------------------------
 * Page rules, copied from each design page's <style> (class names kept).
 * ------------------------------------------------------------------ */

/* Accessibility */
.mk-st {
	display: grid;
	grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.6fr) minmax(110px, 0.7fr);
	grid-template-areas: "n o d";
}

.mk-st > .n {
	grid-area: n;
}

.mk-st > .o {
	grid-area: o;
}

.mk-st > .d {
	grid-area: d;
}

@media (max-width: 720px) {

	.mk-st {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "n d" "o o";
	}

	.mk-st > .o {
		padding-top: 0 !important;
	}

	.mk-st.head {
		display: none !important;
	}
}

/* Integrations: the services table */
.mk-it {
	display: grid;
	grid-template-columns: minmax(120px, 0.8fr) 150px 170px minmax(0, 2.2fr);
	grid-template-areas: "n k s t";
}

.mk-it > .n {
	grid-area: n;
}

.mk-it > .k {
	grid-area: k;
}

.mk-it > .s {
	grid-area: s;
}

.mk-it > .t {
	grid-area: t;
}

@media (max-width: 720px) {

	.mk-it {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "n s" "k k" "t t";
	}

	.mk-it > .k {
		padding-top: 0 !important;
		padding-left: 18px !important;
	}

	.mk-it > .t {
		padding-top: 6px !important;
	}

	.mk-it.head {
		display: none !important;
	}
}

.mk-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 14px;
}

.mk-field > span {
	font-weight: 600;
}

.mk-field input,
.mk-field select,
.mk-field textarea {
	font: inherit;
	font-size: 15px;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: 10px;
	padding: 11px 12px;
	min-height: 44px;
	width: 100%;
}

/* The arrow drawn in the text colour, with room on its right. */
.mk-field select {
	appearance: none;
	padding-right: 44px;
	background-image:
		linear-gradient(45deg, transparent 50%, currentcolor 50%),
		linear-gradient(135deg, currentcolor 50%, transparent 50%);
	background-position:
		calc(100% - 22px) 50%,
		calc(100% - 16px) 50%;
	background-size: 6px 6px;
	background-repeat: no-repeat;
}

.mk-field textarea {
	min-height: 140px;
	resize: vertical;
}

.mk-field input::placeholder,
.mk-field textarea::placeholder {
	color: var(--wp--preset--color--body);
	opacity: 1;
}

.mk-field input:focus-visible,
.mk-field select:focus-visible,
.mk-field textarea:focus-visible,
.mk-tab:focus-visible,
.mk-send:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.mk-field small {
	font-size: 13px;
	line-height: 1.5;
	color: var(--wp--preset--color--body);
}

fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

legend {
	padding: 0;
	font: 500 12px var(--wp--preset--font-family--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--subtle);
	margin-bottom: 14px;
}

.mk-list {
	margin: 0;
	padding-left: 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Developers */
.mk-hk {
	display: grid;
	grid-template-columns: minmax(230px, 0.9fr) minmax(0, 2fr);
	grid-template-areas: "n d";
}

.mk-hk > .n {
	grid-area: n;
	min-width: 0;
}

.mk-hk > .d {
	grid-area: d;
	min-width: 0;
}

.mk-ev {
	display: grid;
	grid-template-columns: minmax(200px, 0.8fr) 120px minmax(0, 2fr);
	grid-template-areas: "n o d";
}

.mk-ev > .n {
	grid-area: n;
	min-width: 0;
}

.mk-ev > .o {
	grid-area: o;
}

.mk-ev > .d {
	grid-area: d;
	min-width: 0;
}

@media (max-width: 720px) {

	.mk-hk {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "n" "d";
	}

	.mk-hk > .d {
		padding-top: 0 !important;
	}

	.mk-ev {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "n o" "d d";
	}

	.mk-ev > .d {
		padding-top: 0 !important;
	}

	.mk-hk.head,
	.mk-ev.head {
		display: none !important;
	}
}

/* Docs */
.mk-docs {
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr);
	gap: 56px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px 24px 96px;
}

.mk-toc {
	position: sticky;
	top: 20px;
	align-self: start;
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding-bottom: 16px;
}

.mk-toc-m {
	display: none;
}

.mk-toc a,
.mk-toc-m a {
	color: var(--wp--preset--color--nav);
}

.mk-toc a:hover,
.mk-toc-m a:hover {
	color: var(--wp--preset--color--accent-hover);
}

/* The article being read (a Docs article page). */
.mk-toc a[aria-current],
.mk-toc-m a[aria-current] {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

.mk-toc-m summary {
	cursor: pointer;
	list-style: none;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
}

.mk-toc-m summary::-webkit-details-marker {
	display: none;
}

.mk-toc-m[open] summary .mk-chev {
	transform: rotate(180deg);
}

/* The hook reference (/docs/hooks/): a wider sidebar, so the longest hook
   name (35 characters of 13px mono) fits on one line. */
@media (min-width: 861px) {

	.mk-docs.mk-docs--wide {
		grid-template-columns: 280px minmax(0, 1fr);
	}
}

@media (max-width: 860px) {

	.mk-docs {
		grid-template-columns: minmax(0, 1fr);
		gap: 8px;
	}

	.mk-toc {
		display: none;
	}

	.mk-toc-m {
		display: block;
	}
}

/* Links inside running text (legal pages, the footer's legal links):
   underlined, not told apart by colour alone. */
.mk-prose a:not(.wp-block-button__link) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* Blog: the list (home.html, archive.html) and a post (single.html). */
.mk-blog-head {
	padding: 72px 24px 40px;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.mk-blog-head > *,
.mk-blog-intro > *,
.mk-blog-titles > * {
	margin: 0;
}

.mk-blog-head > * + * {
	margin-top: 18px !important;
}

.mk-blog-head > .mkwp-post-filter {
	margin-top: 32px !important;
}

.mk-blog-intro.mk-blog-intro {
	gap: 24px 40px;
}

.mk-blog-titles {
	flex: 1 1 520px;
	min-width: 0;
}

.mk-blog-title.mk-blog-title {
	font-size: var(--wp--preset--font-size--display);
	line-height: 0.98;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.mk-blog-lead.mk-blog-lead {
	margin-top: 18px;
	max-width: 640px;
	line-height: 1.5;
}

.mk-blog-lead p {
	margin: 0;
}

.mk-back-link a,
.mk-back-link a:hover {
	color: inherit;
	text-decoration: none;
}

.mk-back-link a:hover {
	color: var(--mk-accent-text, var(--wp--preset--color--accent));
}

/* RSS: an outline button with the feed icon. */
.mk-rss > .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	border-radius: 99px;
}

.mk-rss > .wp-block-button__link::before {
	content: "";
	width: 13px;
	height: 13px;
	background: currentcolor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='3' cy='13' r='2'/%3E%3Cpath d='M1 7.5a7.5 7.5 0 0 1 7.5 7.5h-2A5.5 5.5 0 0 0 1 9.5zM1 2.5A12.5 12.5 0 0 1 13.5 15h-2A10.5 10.5 0 0 0 1 4.5z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='3' cy='13' r='2'/%3E%3Cpath d='M1 7.5a7.5 7.5 0 0 1 7.5 7.5h-2A5.5 5.5 0 0 0 1 9.5zM1 2.5A12.5 12.5 0 0 1 13.5 15h-2A10.5 10.5 0 0 0 1 4.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mk-blog-list {
	padding: 56px 24px 96px;
}

.mk-blog-grid.mk-blog-grid {
	gap: 28px 24px;
}

.mk-blog-grid > li {
	display: flex;
	margin: 0;
}

/* A post's card. */
.mk-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line-2);
	border-radius: 16px;
	overflow: hidden;
}

.mk-card > *,
.mk-card-body > * {
	margin: 0 !important;
}

.mk-card .mk-cover {
	border-bottom: 1px solid var(--wp--preset--color--line-2);
}

.mk-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mk-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	padding: 24px 26px 28px;
}

.mk-card-title {
	font-size: 22px;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.mk-card-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.mk-card-title a:hover {
	color: var(--mk-accent-text, var(--wp--preset--color--accent));
}

.mk-card-excerpt p {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.55;
}

.mk-card-more.mk-card-more {
	margin-top: auto !important;
	padding-top: 4px;
	font-size: 15px;
	font-weight: 600;
	color: var(--mk-accent-text, var(--wp--preset--color--accent));
	text-decoration: none;
}

.mk-card-more:hover {
	text-decoration: underline;
}

/* Category, date and reading time, in mono capitals. */
.mk-meta.mk-meta {
	align-items: center;
	gap: 6px 16px;
	font: 500 12px var(--wp--preset--font-family--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--body);
}

.mk-meta > * {
	margin: 0;
	font: inherit;
}

.mk-meta-cat a {
	color: var(--mk-accent-text, var(--wp--preset--color--accent));
	text-decoration: none;
}

.mk-meta-cat a:hover {
	text-decoration: underline;
}

/* On the first page, the newest post spans the grid: picture beside text. */
body:not(.paged) .mk-blog-grid > li:first-child {
	grid-column: 1 / -1;
}

@media (min-width: 782px) {

	body:not(.paged) .mk-blog-grid > li:first-child .mk-card {
		flex-direction: row;
	}

	body:not(.paged) .mk-blog-grid > li:first-child .mk-cover {
		flex: 0 0 52%;
		aspect-ratio: auto;
		min-height: 340px;
		border-right: 1px solid var(--wp--preset--color--line-2);
		border-bottom: 0;
	}

	body:not(.paged) .mk-blog-grid > li:first-child .mk-card-body {
		justify-content: center;
		gap: 16px;
		padding: 48px;
	}

	body:not(.paged) .mk-blog-grid > li:first-child .mk-card-title {
		font-size: var(--wp--preset--font-size--title-lg);
		line-height: 1.05;
		letter-spacing: -0.03em;
	}

	body:not(.paged) .mk-blog-grid > li:first-child .mk-card-excerpt p {
		font-size: 17px;
	}

	body:not(.paged) .mk-blog-grid > li:first-child .mk-card-more {
		margin-top: 8px !important;
	}
}

.mk-pagination.mk-pagination {
	margin-top: 48px;
	font-weight: 600;
}

/* A post. */
.mk-article-head {
	padding: 56px 24px 40px;
}

.mk-article-head > * {
	margin: 0;
}

.mk-article-head > .mk-meta {
	margin-top: 28px;
}

.mk-article-title.mk-article-title {
	margin-top: 18px;
	font-size: var(--wp--preset--font-size--section-xl);
	line-height: 1.02;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.mk-article-lead.mk-article-lead {
	margin-top: 20px;
}

.mk-article-lead p {
	margin: 0;
	line-height: 1.5;
}

.mk-byline.mk-byline {
	align-items: center;
	gap: 16px 24px;
	margin-top: 32px;
}

.mk-author {
	align-items: center;
	gap: 12px;
	margin: 0;
}

.mk-author .wp-block-post-author__avatar {
	margin: 0;
}

.mk-author .wp-block-post-author__content {
	display: flex;
	flex-direction: column-reverse;
}

.mk-author .wp-block-post-author__name {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.mk-author .wp-block-post-author__byline {
	margin: 2px 0 0;
	font: 500 11px var(--wp--preset--font-family--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--body);
}

/* Avatars are initials (the site plugin's includes/blog.php). */
.mk-initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* Tags as pills that link to their posts. */
.mk-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mk-tags .wp-block-post-terms__separator {
	display: none;
}

.mk-tags a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 6px 12px;
	border-radius: 99px;
	background: var(--wp--preset--color--accent);
	color: var(--mk-on-dark, var(--wp--preset--color--white));
	font: 500 11px var(--wp--preset--font-family--mono);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
}

.mk-tags a:hover {
	background: var(--wp--preset--color--accent-strong);
}

.mk-article-cover {
	padding: 0 24px;
}

.mk-article-cover .mk-cover {
	border: 1px solid var(--wp--preset--color--line-2);
	border-radius: 16px;
}

.mk-article-body {
	padding: 48px 24px 96px;
}

.mk-post {
	margin-top: 0 !important;
	line-height: 1.65;
}

.mk-post > h2 {
	margin: 40px 0 0;
	font-size: 26px;
	line-height: 1.15;
	letter-spacing: -0.025em;
	color: var(--wp--preset--color--ink);
}

.mk-post > * + * {
	margin-top: 16px;
}

.mk-post li + li {
	margin-top: 8px;
}

/* Older and newer posts. */
.mk-post-nav.mk-post-nav {
	align-items: flex-start;
	gap: 20px 32px;
	margin-top: 56px;
	padding-top: 28px;
	border-top: 1px solid var(--wp--preset--color--line);
}

.mk-post-nav .wp-block-post-navigation-link {
	flex: 1 1 260px;
	display: flex;
	gap: 8px;
	margin: 0;
}

.mk-post-nav .post-navigation-link-next {
	justify-content: flex-end;
	text-align: right;
}

.mk-post-nav a {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-decoration: none;
}

.mk-post-nav a:hover {
	color: var(--mk-accent-text, var(--wp--preset--color--accent));
}

.mk-post-nav .post-navigation-link__label {
	display: block;
	margin-bottom: 4px;
	font: 500 11px var(--wp--preset--font-family--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--body);
}

/* The Docs search's text: each article's words, searched but never shown. */
.mk-search-words {
	display: none;
}

/* Code on a phone wraps instead of scrolling sideways (a scrolling block
   can't be reached with the keyboard). The <code> inside sets its own
   white-space, so it needs the rule too. */
@media (max-width: 640px) {

	.wp-block-code,
	.wp-block-code code {
		white-space: pre-wrap;
		overflow-wrap: anywhere;
	}

	/* The Developers page's samples keep whole lines in a max-content grid
	   column; on a phone the column takes the width, so they wrap too. */
	.mkwp-sample .wp-block-code.mkwp-code {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Code that always wraps: the hook reference's samples (/docs/hooks/). */
.wp-block-code.mk-wrap code {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* Code samples: the plugin's code.js colours the code
   (.mkwp-code) and adds a Copy button to the label bar. A sample stays dark
   in both modes, so these are light colours on dark, the same in each: the
   palette's purple, green and amber at their dark-mode lightness, with
   coral and sky for variables and functions. */
.mkwp-sample {
	--mk-code-kw: oklch(0.78 0.12 285);
	--mk-code-str: oklch(0.82 0.11 150);
	--mk-code-num: oklch(0.83 0.11 75);
	--mk-code-var: oklch(0.8 0.1 25);
	--mk-code-fn: oklch(0.84 0.08 230);
	--mk-code-com: rgba(244, 242, 236, 0.6);
}

.mkwp-code .mk-t-kw {
	color: var(--mk-code-kw);
}

.mkwp-code .mk-t-str {
	color: var(--mk-code-str);
}

.mkwp-code :is(.mk-t-num, .mk-t-type) {
	color: var(--mk-code-num);
}

.mkwp-code .mk-t-var {
	color: var(--mk-code-var);
}

.mkwp-code .mk-t-fn {
	color: var(--mk-code-fn);
}

.mkwp-code .mk-t-com {
	color: var(--mk-code-com);
}

/* The label bar: its words, then the Copy button at the right, as tall as
   the bar above its 1px rule (44px at least, the bar's height with or
   without the button, so nothing moves when it appears). */
.mkwp-sample__bar {
	display: flex;
	align-items: center;
	gap: 16px;
	box-sizing: border-box;
	min-height: 45px;
	padding: 10px 0 10px 18px;
}

.mk-copy {
	align-self: stretch;
	min-width: 44px;
	margin: -10px 0 -10px auto;
	padding: 0 18px;
	border: 0;
	border-left: 1px solid rgba(244, 242, 236, 0.14);
	background: none;
	color: rgba(244, 242, 236, 0.8);
	cursor: pointer;
	white-space: nowrap;
}

.mk-copy:hover {
	background: rgba(244, 242, 236, 0.08);
	color: #fff;
}

.mk-copy:focus-visible {
	outline: 2px solid var(--mk-code-kw);
	outline-offset: -4px;
}

.mk-copy.is-done {
	color: var(--mk-code-str);
}

/* Read out by screen readers, never shown (code.js's "Copied"). */
.mk-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* A Docs article's screenshot: never wider than the column. */
.mk-shot {
	max-width: 100%;
}

.mk-shot img {
	max-width: 100%;
	height: auto;
	border: 1px solid var(--wp--preset--color--line-2);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgb(28 26 36 / 6%), 0 8px 24px rgb(28 26 36 / 6%);
}

.mk-shot figcaption {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--wp--preset--color--body);
}

/* FAQ */
.mk-faq {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.mk-faq-nav {
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mk-faq-nav a {
	padding: 8px 12px;
	border-radius: 8px;
	color: var(--wp--preset--color--nav);
	font-size: 14px;
	line-height: 1.3;
}

.mk-faq-nav a:hover {
	background: var(--wp--preset--color--chip);
	color: var(--wp--preset--color--ink);
}

.mk-q summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: baseline;
	padding: 18px 20px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	min-height: 44px;
}

.mk-q summary::-webkit-details-marker {
	display: none;
}

.mk-q summary::after {
	content: "+";
	flex: none;
	font: 500 18px var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--accent);
}

.mk-q[open] summary::after {
	content: "–";
}

.mk-q summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: -2px;
	border-radius: 12px;
}

@media (max-width: 820px) {

	.mk-faq {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.mk-faq-nav {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 6px;
	}

	.mk-faq-nav a {
		border: 1px solid var(--wp--preset--color--line-2);
		background: var(--wp--preset--color--white);
		padding: 8px 12px;
	}
}

/* Free vs Pro */
.mk-fm {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 120px 120px;
}

@media (max-width: 640px) {

	.mk-fm {
		grid-template-columns: minmax(0, 1fr) 58px 58px;
	}

	.mk-fm > .c {
		padding-left: 4px !important;
		padding-right: 8px !important;
	}
}

/* Games */
.mk-pz {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) 90px minmax(0, 1fr);
}

@media (max-width: 560px) {

	.mk-pz {
		grid-template-columns: minmax(0, 1fr) 64px;
	}

	.mk-pz > .r {
		grid-column: 1 / -1;
		padding-top: 0 !important;
	}
}

/* Performance */
.mk-ft {
	display: grid;
	grid-template-columns: minmax(160px, 1.3fr) minmax(0, 1.6fr) repeat(3, minmax(58px, 0.45fr));
	grid-template-areas: "n w r g b";
}

.mk-ct {
	display: grid;
	grid-template-columns: minmax(150px, 1fr) 92px 150px minmax(0, 2fr);
	grid-template-areas: "n v s t";
}

.mk-ft > .n,
.mk-ct > .n {
	grid-area: n;
}

.mk-ft > .w {
	grid-area: w;
}

.mk-ft > .r {
	grid-area: r;
}

.mk-ft > .g {
	grid-area: g;
}

.mk-ft > .b {
	grid-area: b;
}

.mk-ct > .v {
	grid-area: v;
}

.mk-ct > .s {
	grid-area: s;
}

.mk-ct > .t {
	grid-area: t;
}

@media (max-width: 640px) {

	.mk-ft {
		grid-template-columns: minmax(0, 1fr) repeat(3, 54px);
		grid-template-areas: "n r g b" "w w w w";
	}

	.mk-ft > .w {
		padding-top: 0 !important;
	}

	.mk-ft > .r,
	.mk-ft > .g,
	.mk-ft > .b {
		padding-left: 4px !important;
		padding-right: 12px !important;
	}

	.mk-ft.head > .w,
	.mk-ct.head {
		display: none !important;
	}

	.mk-ct {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "n s" "v v" "t t";
	}

	.mk-ct > .v {
		padding-top: 0 !important;
		padding-left: 18px !important;
	}

	.mk-ct > .t {
		padding-top: 6px !important;
	}
}

/* Privacy */
.mk-kt {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr) 80px;
	grid-template-areas: "k w p";
}

.mk-kt > .k {
	grid-area: k;
}

.mk-kt > .w {
	grid-area: w;
}

.mk-kt > .p {
	grid-area: p;
}

.mk-rt {
	display: grid;
	grid-template-columns: minmax(140px, 0.9fr) minmax(0, 1.6fr) minmax(0, 1.4fr);
	grid-template-areas: "n w s";
}

.mk-rt > .n {
	grid-area: n;
}

.mk-rt > .w {
	grid-area: w;
}

.mk-rt > .s {
	grid-area: s;
}

@media (max-width: 720px) {

	.mk-kt {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "k p" "w w";
	}

	.mk-kt > .w {
		padding-top: 0 !important;
	}

	.mk-rt {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "n" "w" "s";
	}

	.mk-rt > .w,
	.mk-rt > .s {
		padding-top: 0 !important;
	}

	.mk-kt.head,
	.mk-rt.head {
		display: none !important;
	}
}

/* Static Sites */
.mk-sx {
	display: grid;
	grid-template-columns: minmax(150px, 1fr) 160px minmax(0, 2.2fr);
	grid-template-areas: "n s t";
}

.mk-sx > .n {
	grid-area: n;
	min-width: 0;
}

.mk-sx > .s {
	grid-area: s;
}

.mk-sx > .t {
	grid-area: t;
	min-width: 0;
}

@media (max-width: 720px) {

	.mk-sx {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "n s" "t t";
	}

	.mk-sx > .t {
		padding-top: 0 !important;
	}

	.mk-sx.head {
		display: none !important;
	}
}

/* vs Convert Pro */
@media (max-width: 640px) {

	.mk-vs {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
	}

	.mk-vs > :first-child {
		grid-column: 1/-1;
		padding-bottom: 0 !important;
	}

	.mk-vs > :first-child:empty {
		display: none;
	}

	.mk-vs > * {
		padding-left: 14px !important;
		padding-right: 14px !important;
	}
}

/* Hidden on phones (781px and below): the homepage's playground and what
   points to it. */
@media (max-width: 781px) {

	.mkwp-hide-phone {
		display: none !important;
	}
}
