/* The style axes page (templates/pages/style-axes.php): a top band - the
   title beside the settings rows, pinned - and a kitchen sink below that
   re-paints as they change.

   The controls are chrome (data-ui='app' - the app-ui contract in
   settings-panel.css governs their insides); this file only places the
   rows and pins the band. */

.style-axes-header {
	p {
		margin-top: 0.5rem;
	}
}

.style-axes-controls {
	margin-top: 2rem;
}

@media (width >= 1450px) {
	.style-axes-controls {
		margin-top: 0;
	}
}

/* Pinned only where there's room: from 1024 the tray is a side column, so
   the top edge is free. On a phone the rows stack tall - pinned, they'd
   cover the page they're re-painting - so there they scroll with the page,
   and the tray's settings panel is the one that stays in reach.

   Two shapes. In the reading column (1024 up) only the controls pin: the
   title sits above them and scrolls away, since the two side by side don't
   fit 720px. From 1450 the page takes the wall's width (the home grid's
   measure) and the whole top pins - the title on the left, the controls
   beside it (Derek's sketch, 2026-11-22). A sticky box holds only inside
   its parent, which is why the pinned box is always a child of <main>:
   the controls themselves below 1450 (the wrapper dissolves), the wrapper
   from 1450. */
@media (width >= 1024px) {
	.style-axes-top {
		display: contents;
	}

	.style-axes-controls {
		position: sticky;
		top: 0;
		z-index: 1;
		padding-block: 1.5rem;

		/* The page's own paper, so the strip reads as the top of the page
		   (unboxed, like the home page's settings band) while the sink
		   scrolls under it. Set on the box, outside the chrome's rows. */
		background-color: var(--fill-primary);
		border-bottom: 1px solid var(--stroke-secondary);

		.settings-panel {
			display: grid;
			grid-template-columns: repeat(3, 13rem);
			grid-template-areas:
				"scheme sounds red-light"
				"axes   axes   axes";
			gap: var(--app-row-gap) 2rem;
			align-items: start;
		}

		.mode-switcher {
			grid-area: scheme;
		}

		.sound-switcher {
			grid-area: sounds;
		}

		.red-light-switcher {
			grid-area: red-light;
		}

		/* Character, mood and flavor side by side, each under one of the
		   toggles above: the three dials read as a set on one line. */
		.axes-group {
			grid-area: axes;
			display: grid;
			grid-template-columns: subgrid;
		}
	}
}

@media (width >= 1450px) {
	/* The wall's measure (grid-view.css owns the tokens; the fallback is
	   its two-lane width, for when the grid's flag is off). */
	.page-wrapper[data-page='style-axes'] {
		grid-template-columns:
			minmax(var(--layout-wall-inset, 4vw), 2fr)
			minmax(0, var(--layout-wall-max, 92rem))
			var(--layout-tray-sidebar)
			minmax(0, 3fr);
	}

	.style-axes-top {
		position: sticky;
		top: 0;
		z-index: 1;
		display: grid;
		grid-template-columns: minmax(0, 1fr) max-content;
		gap: 2.5rem;
		align-items: start;
		padding-block: 1.5rem;
		background-color: var(--fill-primary);
		border-bottom: 1px solid var(--stroke-secondary);
	}

	.style-axes-controls {
		position: static;
		padding-block: 0;
		background-color: transparent;
		border-bottom: 0;
	}
}

.style-axes-sink {
	margin-top: 3rem;
}
