/* ====================================================================
   Mizain deck sections, page furniture only.

   Loads after css/mizain-tokens.css and css/mizain-templates.css and
   adds only the two deck slides rebuilt for the web: the anatomy of a
   Level, and the three testable properties with the evidence chain.

   Nothing here defines a custom property and nothing here redefines a
   class owned by the token sheet (.mz-section, .mz-container,
   .mz-eyebrow, .mz-card, .mz-grid-3, .mz-btn, .mz-lead) or by the
   template sheet (.mz-actions, .mz-split, .mz-figure, .mz-note).

   Tokens consumed: --mz-ink, --mz-card, --mz-border, --mz-plum,
   --mz-plum-deep, --mz-mauve, --mz-lilac, --mz-lilac-2, --mz-ground,
   --mz-body-on-dark, --mz-muted, --mz-font-mono, --mz-radius,
   --mz-gap, --mz-fs-small, --mz-fs-body, --mz-fs-lead, --mz-s1 to
   --mz-s5.
   ==================================================================== */

/* --- Mono label ------------------------------------------------------
   The deck's small uppercase mono caption that titles a diagram or a
   card. Plum on light grounds, mauve on the ink card.
   -------------------------------------------------------------------- */

.mz-page .mz-mono-label {
	margin: 0 0 var(--mz-s2);
	max-width: none;
	font-family: var(--mz-font-mono);
	font-size: var(--mz-fs-small);
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
	color: var(--mz-plum);
}

.mz-page .mz-mono-label.is-on-ink {
	color: var(--mz-mauve);
}

/* --- Flow row ---------------------------------------------------------
   A sequence of block chips joined by decorative arrows. Used by the
   Level anatomy row and by the evidence chain.

   The row lives inside its own overflow-x container so a narrow screen
   scrolls the sequence, never the page. Chips grow to share the rail on
   wide screens and hold a readable floor below that, which is what puts
   the row into scroll at phone widths.
   -------------------------------------------------------------------- */

.mz-page .mz-flow-scroll {
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	padding-block: 2px;
}

.mz-page .mz-flow-scroll:focus-visible {
	outline: 2px solid var(--mz-plum);
	outline-offset: 3px;
	border-radius: var(--mz-radius);
}

.mz-page .mz-flow {
	display: flex;
	align-items: stretch;
	gap: var(--mz-s1);
	width: 100%;
}

.mz-page .mz-flow__chip {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 7rem;
	min-width: max-content;
	min-height: 56px;
	/* A block name is a single label, so it never breaks mid word. The rail
	   scrolls instead, which is what .mz-flow-scroll is for. */
	white-space: nowrap;
	overflow-wrap: normal;
	word-break: keep-all;
	padding: var(--mz-s2) var(--mz-s2);
	border: 1px solid var(--mz-border);
	border-radius: var(--mz-radius);
	background: var(--mz-card);
	color: var(--mz-ink);
	font-size: var(--mz-fs-body);
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-wrap: balance;
}

/* Instrumented blocks, filled lilac. Ink on lilac clears AA. */
.mz-page .mz-flow__chip.is-instrumented {
	background: var(--mz-lilac);
	border-color: var(--mz-lilac-2);
	color: var(--mz-ink);
}

/* The end of the chain, filled deep plum with a white label. */
.mz-page .mz-flow__chip.is-final {
	background: var(--mz-plum-deep);
	border-color: var(--mz-plum-deep);
	color: #FFFFFF;
}

/* Decorative only, hidden from assistive technology in the markup. */
.mz-page .mz-flow__arrow {
	flex: 0 0 auto;
	align-self: center;
	padding-inline: 2px;
	color: var(--mz-mauve);
	font-size: var(--mz-fs-small);
	line-height: 1;
	-webkit-user-select: none;
	user-select: none;
}

/* The chain row carries fewer, wider chips than the anatomy row. */
.mz-page .mz-flow--chain .mz-flow__chip {
	flex: 1 1 9rem;
	min-width: 9rem;
}

/* Caption under a flow row. */
.mz-page .mz-flow-note {
	margin: var(--mz-s2) 0 0;
	font-size: var(--mz-fs-small);
	color: var(--mz-muted);
}

/* --- Level anatomy band ------------------------------------------------ */

/* The template sheet gives every section lead a 64px trailing gap. Here
   the mono label belongs to the diagram below it, so the lead sits
   closer to it. */
.mz-page .mz-levels > .mz-container > .mz-lead {
	margin-bottom: var(--mz-s4);
	max-width: 76ch;
}

/* Activity types beside one worked example. */
.mz-duo {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--mz-gap);
	align-items: stretch;
	margin-top: var(--mz-s5);
}

@media (max-width: 860px) {
	.mz-duo {
		grid-template-columns: minmax(0, 1fr);
	}
}

.mz-page .mz-duo__list {
	margin: 0;
	padding-left: 1.15rem;
	list-style: disc;
}

.mz-page .mz-duo__list li {
	margin-bottom: var(--mz-s2);
	padding-left: 0.25rem;
}

.mz-page .mz-duo__list li:last-child {
	margin-bottom: 0;
}

.mz-page .mz-duo__list li::marker {
	color: var(--mz-mauve);
}

/* The ink card, as the deck sets it. Body on dark over ink clears AA,
   and the heading takes the ground tone. */
.mz-page .mz-card-ink {
	background: var(--mz-ink);
	border-color: var(--mz-ink);
	color: var(--mz-body-on-dark);
}

.mz-page .mz-card-ink h3 {
	color: var(--mz-ground);
	margin-bottom: var(--mz-s2);
}

.mz-page .mz-card-ink a {
	color: var(--mz-mauve);
}

.mz-page .mz-card-ink a:hover {
	color: var(--mz-lilac);
}

.mz-page .mz-card-ink :where(a, button, [tabindex]):focus-visible {
	outline: 2px solid var(--mz-mauve);
	outline-offset: 3px;
}

/* --- Three properties -------------------------------------------------- */

/* Mono number above the heading, in plum, as the deck sets it. */
.mz-page .mz-prop__num {
	margin: 0 0 var(--mz-s2);
	max-width: none;
	font-family: var(--mz-font-mono);
	font-size: var(--mz-fs-lead);
	font-weight: 400;
	font-feature-settings: "tnum" 1;
	line-height: 1.2;
	letter-spacing: 0.06em;
	overflow-wrap: anywhere;
	color: var(--mz-plum);
}

.mz-page .mz-prop h3 {
	margin-bottom: var(--mz-s2);
}

/* The chain label opens a new block under the card row. */
.mz-page .mz-mono-label--chain {
	margin-top: var(--mz-s5);
}

/* --- Motion ------------------------------------------------------------
   Nothing here animates. The guard keeps a smooth scroll setting from a
   parent theme out of the flow rows for readers who ask for less motion.
   -------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.mz-page .mz-flow-scroll {
		scroll-behavior: auto;
	}
}
