/* PRE►LOΔD — shared bottom navigation.
   ==========================================================================
   Paired with /js/module-nav.js. Every module links both, so the nav cannot
   drift between surfaces. Colours come from /css/tokens.css — link that FIRST.

   Both themes are covered here rather than left to each module: a module may
   choose its own accent, but never its own idea of what the nav looks like.

   The Practice PICKER lives in /css/module-picker.css. app.html needs the
   picker but must NOT link this file: it has its own .bnav with .ni children
   and the two sets of .bnav rules would fight. Modules link both. */

/* ── Bottom nav ─────────────────────────────────────────────────────────── */
.bnav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 30;
	display: flex;
	justify-content: space-around;
	align-items: center;
	background: var(--depth);
	border-top: 1px solid var(--border);
	padding: 8px 0 calc(14px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 600px) {
	.bnav {
		max-width: 600px;
		left: 50%;
		transform: translateX(-50%);
		border-radius: 16px 16px 0 0;
		border: 1px solid var(--border);
		border-bottom: none;
	}
}

.ni {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-height: 48px;
	flex: 1;
	/* Flex children default to min-width:auto, which refuses to shrink below
	   their widest unbreakable word. Six items on a 320px screen at the
	   XX-Large text step pushed "Profile" 42px past the viewport edge. */
	min-width: 0;
	padding: 4px 2px;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--muted);
	font-family: inherit;
	/* Capped, not free-scaling. The label is chrome rather than reading content,
	   and the icon above it is already a fixed 22px instead of tracking the text
	   setting — so the label follows the same rule. Below the cap it still grows
	   with the user's choice; above it, six labels stop fitting the screen. */
	font-size: min(0.62rem, 13px);
	font-weight: 500;
	letter-spacing: 0.04em;
}

.ni svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ni.active {
	color: var(--gold);
}

/* ── Prior Press mark (the Practice item) ───────────────────────────────── */
/* The product's mark: a solid Δ with the ► knocked out (Spirit), held by three
   element arcs — Mind, Body, Relationships. Identical to app.html's
   ICO.practice; scripts/check-mark-drift.js fails the build if they diverge.

   Inactive: one muted ink, so it reads as a single mark rather than a chart.
   Active: the three arcs take their own hues while the Δ stays with the item's
   colour, which is what makes the mark legible without relying on hue alone.

   The Δ is FILLED and the arcs are STROKED, so the fill/stroke split is stated
   here rather than left to the presentation attributes — .ni svg sets
   `fill: none; stroke-width: 2` for every other glyph, and a future edit to
   that rule must not be able to erase the Δ. */
.pmk {
	vector-effect: non-scaling-stroke;
}

.pmk .pmk-s { fill: currentColor; stroke: none; }
.pmk .pmk-m,
.pmk .pmk-b,
.pmk .pmk-r { fill: none; stroke-width: 1.7; }

.ni.active .pmk-m { stroke: var(--mind); }
.ni.active .pmk-b { stroke: var(--teal); }
.ni.active .pmk-r { stroke: var(--rose); }

/* Room for the fixed nav so it never covers the end of a page. */
.has-module-nav {
	padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

