/*
 * studio.css — the tool's own appearance.
 *
 * Deliberately UNLAYERED. In the author origin, unlayered normal declarations beat
 * every layered normal declaration whatever the specificity, so these rules sit
 * above armor.css and above anything that ever gets injected into the armor layers.
 * Everything is rooted at #asas-studio so nothing leaks outward either.
 *
 * The palette is a graded grey scale, not a set of one-off greys: nine steps from
 * paper to ink, so panels, rules and text always sit a predictable distance apart.
 */

#asas-studio {
	--g0: #ffffff;
	--g1: #f7f6f3;
	/* The ground the cards sit ON. A step darker than the page and warmer with
	   it — beige rather than a grey — so the cards read as objects laid on a
	   surface instead of holes cut out of one. */
	--grid: #f3efe5;
	--g2: #eeece7;
	--g3: #e2dfd8;
	--g4: #cfccc3;
	--g5: #a8a49a;
	--g6: #78746b;
	--g7: #4a4741;
	--g8: #24221e;
	--g9: #14140f;

	--rail: 300px;
	/* 352 before the stack grew a grip and two move buttons; at 352 the block name was
	   cut to five characters, which is not a name. The preview loses 32px and does not
	   notice — it is scaled to fit either way. */
	--stack: 384px;
	--bar: 58px;
	--r: 3px;

	--sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	position: fixed;
	inset: 0;
	display: grid;
	grid-template-rows: var(--bar) 1fr;
	font-family: var(--sans);
	/* Was 13px. A tool is denser than a marketing page, but 13px base put the facet
	   counts at 11px and the layout tags at 10px, which is smaller than anyone should
	   have to read to use the thing. */
	font-size: 15px;
	line-height: 1.5;
	color: var(--g9);
	background: var(--g1);
	-webkit-font-smoothing: antialiased;
}

#asas-studio *,
#asas-studio *::before,
#asas-studio *::after { box-sizing: border-box; }

/*
 * The reset for form controls, wrapped in :where() so it contributes NO specificity.
 *
 * This is the second time this selector has caused a silent bug. Written as
 * `#asas-studio button { color: inherit; background: none }` it scores (1,0,1), which
 * beats every class rule in this file — so `.asas-facet:hover { background: … }` and
 * `.asas-modes button[aria-pressed="true"] { background: … }` were both being written
 * and then thrown away. The active mode was never highlighted and the rail rows never
 * lit up on hover; both read as "the studio has no navigation", which is exactly what
 * it was reported as.
 *
 * :where() zeroes the specificity, so these are now a floor that anything can override.
 */
:where(#asas-studio) button,
:where(#asas-studio) input,
:where(#asas-studio) select {
	font: inherit;
}
:where(#asas-studio) button { color: inherit; background: none; border: 0; }

/* ------------------------------------------------------------------ top bar -- */

.asas-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 14px;
	background: var(--g9);
	color: var(--g0);
	border-bottom: 1px solid var(--g9);
}

/* The mark is a link home, wearing the brand: the orange triangle first — the same
   mark the site header carries — then the wordmark, then the Arabic. */
.asas-mark {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-size: 14px;
	color: inherit;
	text-decoration: none;
	padding: 6px 10px 6px 4px;
	border-radius: var(--r);
}
.asas-mark:hover { background: var(--g8); }
.asas-mark .tri {
	display: inline-flex;
	width: 16px;
	height: 16px;
	flex: none;
}
.asas-mark .tri svg { width: 100%; height: 100%; display: block; }
/* Stated in CSS, not only as SVG attributes: the armor reset sits in the author
   cascade, and any author rule outranks a presentation attribute — which silently
   painted this triangle black-on-black and the person icon invisible. */
.asas-mark .tri svg,
.asas-mark .tri svg path {
	stroke: #C25121;
	fill: none;
	/* 2.6, not 2: at 16px the viewBox scales strokes by two thirds, and a 1.3px line
	   anti-aliased against the black bar reads as rust, not as the brand orange. */
	stroke-width: 2.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.asas-mark small {
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--g5);
	font-size: 12.5px;
}

/*
 * The language switch. A segmented pair, not a toggle: one lit, one not, and
 * pressing either says which language you want rather than which one you are in.
 * The single toggling button it replaces read as its own opposite — see
 * langSwitch() in studio.js.
 *
 * It carries a lit border rather than only a fill, because the bar is already
 * near-black and a fill alone at this size reads as a shadow.
 */
.asas-lang {
	display: inline-flex;
	align-items: center;
	gap: 0;
	border: 1px solid var(--g7);
	border-radius: var(--r);
	overflow: hidden;
	flex: 0 0 auto;
}
.asas-langopt {
	padding: 5px 11px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--g5);
	background: var(--g8);
	cursor: pointer;
	white-space: nowrap;
	border: 0;
	border-inline-end: 1px solid var(--g7);
}
.asas-langopt:last-child { border-inline-end: 0; }
.asas-langopt:hover { color: var(--g0); background: var(--g7); }
.asas-langopt.is-on {
	color: var(--g9);
	background: var(--g0);
	font-weight: 600;
}
/* Arabic at 13px sits visually smaller than Latin at 13px; a point back and a
   touch of line makes the pair read as one control rather than two sizes. */
.asas-langopt[data-lang="ar"] { font-size: 14px; }

.asas-modes { display: flex; gap: 4px; margin-left: 4px; }
.asas-modes button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 1px solid transparent;
	color: var(--g4);
	padding: 7px 14px 7px 9px;
	border-radius: var(--r);
	cursor: pointer;
	letter-spacing: .01em;
	white-space: nowrap;
}
.asas-modes .lb { display: inline-flex; white-space: nowrap; }
/* A flex container drops the leading space inside a flex item, so "Build" and
   " & colour" rendered as "Build& colour". */
.asas-modes .amp { margin-left: .3em; }
/* Numbered, because Browse and Build are steps one and two of the same job rather
   than two unrelated tabs. */
.asas-modes button .n {
	display: grid;
	place-items: center;
	width: 20px; height: 20px;
	border-radius: 50%;
	border: 1px solid var(--g7);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	color: var(--g5);
}
.asas-modes button:hover { color: var(--g0); background: var(--g8); }
.asas-modes button:hover .n { border-color: var(--g5); color: var(--g2); }
.asas-modes button[aria-pressed="true"] { background: var(--g0); color: var(--g9); font-weight: 600; }
.asas-modes button[aria-pressed="true"] .n { border-color: var(--g9); color: var(--g9); }

/* Blocks | Pages | Journal — the three faces of Browse, one segmented control. */
.asas-tabs {
	display: inline-flex;
	padding: 3px;
	border: 1px solid var(--g7);
	border-radius: 999px;
	margin-left: 6px;
}
.asas-tabs button {
	padding: 4px 13px;
	border-radius: 999px;
	color: var(--g4);
	font-size: 13.5px;
	cursor: pointer;
	white-space: nowrap;
}
.asas-tabs button:hover { color: var(--g0); }
.asas-tabs button[aria-pressed="true"] { background: var(--g0); color: var(--g9); font-weight: 600; }
#asas-studio[data-mode="build"] .asas-tabs { display: none; }

.asas-back {
	display: inline-flex;
	align-items: center;
	color: var(--g4);
	text-decoration: none;
	padding: 6px 4px;
	white-space: nowrap;
}
.asas-back:hover { color: var(--g0); text-decoration: underline; text-underline-offset: 3px; }
.asas-back:focus-visible { outline: 2px solid var(--g0); outline-offset: 2px; border-radius: var(--r); }

/* The single global search, in the header, 44px tall so it clears the minimum
   pointer target on its own without a padded wrapper. */
.asas-search {
	flex: 0 1 298px;
	max-width: 298px;
	min-width: 180px;
	position: relative;
}
.asas-search input {
	width: 100%;
	height: 44px;
	background: var(--g8);
	border: 1px solid var(--g7);
	border-radius: var(--r);
	color: var(--g0);
	font: inherit;
	font-size: 14px;
	padding: 0 12px 0 36px;
	outline: none;
	text-overflow: ellipsis;
}
.asas-search input:hover { border-color: var(--g6); }
.asas-search input:focus-visible {
	border-color: var(--g0);
	outline: 2px solid var(--g0);
	outline-offset: 1px;
}
.asas-search input:focus { border-color: var(--g4); }
.asas-search input::placeholder { color: var(--g6); }
.asas-search::before {
	content: "";
	position: absolute;
	left: 10px; top: 50%;
	width: 11px; height: 11px;
	margin-top: -7px;
	border: 1.5px solid var(--g5);
	border-radius: 50%;
}

/* The results header: what is on screen, and the order it is in. Nothing that
   narrows the grid may live here — those are down the left panel. */
.asas-gridhead {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 2px 12px;
}
.asas-gridhead .asas-count { margin: 0; flex: 1; min-width: 0; }
.asas-sort { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
/* The same select Sort wears, narrower and without a word beside it: "3 columns"
   names itself, and a second uppercase label in the head was one label too many. */
.asas-cols { display: flex; align-items: center; flex: 0 0 auto; }
.asas-colssel { min-width: 132px; }
.asas-sortlbl {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--g6);
}
.asas-sortsel {
	height: 44px;
	min-width: 178px;
	padding: 0 34px 0 12px;
	border: 1px solid var(--g4);
	border-radius: var(--r);
	background: var(--g0);
	background-image: linear-gradient(45deg, transparent 50%, var(--g7) 50%),
	                  linear-gradient(135deg, var(--g7) 50%, transparent 50%);
	background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	color: var(--g9);
	font: inherit;
	font-size: 13.5px;
	cursor: pointer;
	appearance: none;
}
.asas-sortsel:hover { border-color: var(--g6); }
.asas-sortsel:focus-visible { outline: 2px solid var(--g9); outline-offset: 1px; border-color: var(--g9); }

/* Who you are, not something you press: a person in a ring and a name, quiet until
   hovered. Underneath it is still a button — it opens the account sheet — but nothing
   about it borrows the How-it-works treatment any more. */
.asas-account {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 8px;
	border: 0;
	background: transparent;
	color: var(--g3);
	cursor: pointer;
	border-radius: var(--r);
	white-space: nowrap;
}
.asas-account:hover { color: var(--g0); background: var(--g8); }
.asas-account:focus-visible { outline: 2px solid var(--g0); outline-offset: 1px; }
.asas-accicon {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border: 1px solid var(--g6);
	border-radius: 50%;
	flex: none;
}
.asas-accicon svg { width: 13px; height: 13px; display: block; }
.asas-accicon svg,
.asas-accicon svg * {
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
}
.asas-account.is-in .asas-accicon { border-color: var(--g3); }
.asas-account.is-in { color: var(--g0); }

.asas-spacer { flex: 1; }

.asas-bar .asas-btn {
	background: var(--g8);
	border: 1px solid var(--g7);
	color: var(--g2);
}
.asas-bar .asas-btn:hover { background: var(--g7); color: var(--g0); }
.asas-bar .asas-btn.is-key { background: var(--g0); color: var(--g9); border-color: var(--g0); font-weight: 600; }

.asas-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 11px;
	border: 1px solid var(--g4);
	background: var(--g0);
	border-radius: var(--r);
	cursor: pointer;
	white-space: nowrap;
}
.asas-btn:hover { background: var(--g2); }
.asas-btn:disabled { opacity: .45; cursor: default; }
.asas-btn.is-small { padding: 4px 9px; font-size: 13px; }

/* The house heading rule, in the tool as well as on the pages it builds. H5 and H6 are
   left alone; the studio does not use them. .asas-mark is the wordmark and sets its own
   case, and .ar spans hold Arabic, which uppercase does not touch anyway. */
#asas-studio h1,
#asas-studio h2,
#asas-studio h3,
#asas-studio h4 {
	text-transform: uppercase;
}

/* -------------------------------------------------------------------- body -- */

.asas-body {
	display: grid;
	min-height: 0;
	grid-template-columns: var(--rail) 1fr;
}
/*
 * min-width: 0 on the two right-hand columns, and it is not cosmetic.
 *
 * A `1fr` grid track has an automatic minimum size, so it can never be narrower
 * than its own content. The Build preview writes an explicit pixel width onto the
 * iframe — the width it measured the stage to be — and that width then became the
 * column's floor. Shrink the window and the column stayed where it was: measured,
 * a 2400px session dragged down to 1280 kept a 2400px body, and everything on the
 * right of the two bars (Open full page, Back to the site) sat off the screen with
 * no scrollbar to reach it. The panel could grow and never shrink, because the
 * observer that resizes it was reading a width its own last write had pinned.
 *
 * Zero here breaks that loop: the column is free to shrink, the stage then reports
 * the space it actually has, and the iframe is re-fitted to it.
 */
.asas-main,
.asas-view,
.asas-stage { min-width: 0; }
/* The build body is three children now — the face switch, the column, the
   preview — placed by name so the same markup can be a desktop split and a
   phone's one-at-a-time without the JS knowing which it is. */
#asas-studio[data-mode="build"] .asas-body {
	grid-template-columns: var(--stack) 1fr;
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"tabs  view"
		"stack view";
}
#asas-studio[data-mode="build"] .asas-objtabs { grid-area: tabs; }
#asas-studio[data-mode="build"] .asas-stack   { grid-area: stack; }
#asas-studio[data-mode="build"] .asas-view    { grid-area: view; }

/* ------------------------------------------------------------- filter rail -- */

/*
 * Rooms in a house, not thirty-four words in alphabetical order. Each group has a
 * heading — The house, The echo, The market, Pieces — and each room is two lines:
 * the house name (Latin + Arabic, one line) and the house English with the count
 * under it. No map word ever appears here; Hero, CTA and FAQ are for search.
 */
.asas-rail {
	overflow-y: auto;
	background: var(--g0);
	border-right: 1px solid var(--g3);
	padding: 10px 0 40px;
}
.asas-rail h3,
.asas-railhead {
	margin: 0;
	padding: 16px 14px 5px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--g6);
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.asas-rail h3:first-child { padding-top: 6px; }
.asas-railhead .ar { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 12.5px; color: var(--g6); }
/* Pieces is a drawer: shut by default, a button to open it. */
.asas-drawer {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	padding: 2px 4px 2px 0;
	margin-left: -2px;
	border-radius: var(--r);
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
	cursor: pointer;
}
.asas-drawer:hover { color: var(--g9); }
.asas-drawer:focus-visible { outline: 2px solid var(--g9); outline-offset: 1px; }
.asas-drawer .chev { font-size: 11px; width: 10px; display: inline-block; }
.asas-drawer .ar { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 12.5px; }

.asas-facet {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	width: 100%;
	padding: 6px 14px 7px;
	border: 0;
	background: none;
	text-align: left;
	cursor: pointer;
	border-left: 2px solid transparent;
	transition: background .12s ease, border-color .12s ease;
	line-height: 1.35;
}
.asas-facet:hover { background: var(--g2); border-left-color: var(--g5); }
.asas-facet:focus-visible { outline: 2px solid var(--g9); outline-offset: -2px; background: var(--g2); }
.asas-facet[aria-pressed="true"] { background: var(--g2); border-left-color: var(--g9); }
.asas-facet .nm { display: flex; align-items: baseline; gap: 7px; font-size: 16px; font-weight: 500; color: var(--g9); }
.asas-facet:hover .nm,
.asas-facet[aria-pressed="true"] .nm { font-weight: 600; }
.asas-facet .nm .ar { font-size: 15px; font-weight: 500; }
.asas-facet[aria-pressed="true"] .nm .ar { font-weight: 600; }
/* The gloss and the count, one quiet line. */
.asas-facet .ty {
	color: var(--g7);
	font-size: 12.5px;
	font-weight: 400;
	letter-spacing: .01em;
}
.asas-facet:hover .ty,
.asas-facet[aria-pressed="true"] .ty { color: var(--g8); }

/* ------------------------------------------------------------------ chips -- */

/* A zero-count option stays on the list and goes grey. Removing it would make the
   panel rearrange itself under the reader's hand and hide the shape of the library. */
.asas-facet.is-off {
	background: var(--g2);
	cursor: not-allowed;
}
.asas-facet.is-off .nm,
.asas-facet.is-off .ty { color: var(--g5); font-weight: 500; }
.asas-facet.is-off:hover { background: var(--g2); border-left-color: transparent; }

/* The panel names the library it filters and prints the real total under it. */
.asas-paneltitle { padding: 14px 14px 4px; }
.asas-paneltitle h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 650;
	letter-spacing: -.01em;
	color: var(--g9);
}
.asas-paneltitle p {
	margin: 3px 0 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	font-size: 12.5px;
	color: var(--g6);
	font-variant-numeric: tabular-nums;
}
.asas-paneltitle p .on {
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--g2);
	color: var(--g8);
	font-weight: 600;
	font-variant-numeric: normal;
}

/* Clear sits at the foot of the panel, not as a permanent strip of chips over the
   grid, and it is quiet until there is something to clear. */
.asas-railclearwrap { padding: 14px 14px 4px; margin-top: 8px; border-top: 1px solid var(--g3); }
.asas-railclear {
	width: 100%;
	min-height: 42px;
	padding: 10px 12px;
	border: 1px solid var(--g4);
	border-radius: var(--r);
	background: var(--g0);
	color: var(--g9);
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}
.asas-railclear:hover { background: var(--g2); border-color: var(--g6); }
.asas-railclear:focus-visible { outline: 2px solid var(--g9); outline-offset: 2px; }
.asas-railclear[disabled] { color: var(--g5); border-color: var(--g3); cursor: not-allowed; background: var(--g1); }

/* ------------------------------------------------------------ catalog grid -- */

.asas-main { overflow-y: auto; padding: 16px; min-height: 0; background: var(--grid); }

.asas-count {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 2px 12px;
	color: var(--g6);
}
.asas-count b { color: var(--g9); font-variant-numeric: tabular-nums; }

/*
 * Five across on a desktop. An owner decision: four made each card too big, and the
 * grid is how you FIND a façade — the click-to-full lightbox is how you judge one.
 * Two on a phone, three on a tablet, five with the rail from 1024px up. Fixed tracks,
 * not auto-fill with a minimum: `minmax(230px, 1fr)` collapsed to three beside the
 * rail, which is the thing this replaces.
 */
/* 16px, not 12. A tall page cover is a big grey rectangle on a warm grey page,
   and at 12px two of them side by side read as one wide picture. The gap is half
   of what separates them; the card's own shadow is the other half. */
/* How many cards across is the owner's choice, one to six, carried on the root as
   data-cols. repeat() needs a literal integer — min() is not allowed where a count
   goes — so the six are written out rather than computed, and the narrow-screen
   caps are written as the subset they actually lower. A cap never RAISES a choice:
   asking for one column gives one column at any width. */
.asas-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
#asas-studio[data-cols="1"] .asas-grid { grid-template-columns: minmax(0, 1fr); }
#asas-studio[data-cols="2"] .asas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#asas-studio[data-cols="3"] .asas-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#asas-studio[data-cols="4"] .asas-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#asas-studio[data-cols="5"] .asas-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#asas-studio[data-cols="6"] .asas-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* A card below about 200px wide stops being a picture of a block and becomes a
   smudge, so the window has the last word. */
@media (max-width: 1180px) {
	#asas-studio[data-cols="5"] .asas-grid,
	#asas-studio[data-cols="6"] .asas-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
	#asas-studio[data-cols="4"] .asas-grid,
	#asas-studio[data-cols="5"] .asas-grid,
	#asas-studio[data-cols="6"] .asas-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
	#asas-studio[data-cols="3"] .asas-grid,
	#asas-studio[data-cols="4"] .asas-grid,
	#asas-studio[data-cols="5"] .asas-grid,
	#asas-studio[data-cols="6"] .asas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
	#asas-studio[data-cols] .asas-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Pages: the same five tracks; the covers are tall. */
.asas-grid.is-pages .asas-shotwrap.is-tall { aspect-ratio: 2 / 3; }
.asas-gridsub {
	grid-column: 1 / -1;
	margin: 18px 2px 2px;
	padding-top: 14px;
	border-top: 1px solid var(--g3);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--g7);
}
.asas-gridsub .sub { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--g6); }
.asas-more { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }
/* The sentinel that loads the next slice when it scrolls into view. It still
   reads "Show more" for a keyboard, but sits as a quiet full-width line. */
.asas-more.is-auto {
	justify-self: stretch;
	text-align: center;
	margin: 4px 0 24px;
	padding: 12px;
	color: var(--g6);
	background: transparent;
	border: 1px dashed var(--g3);
	font-weight: 500;
}
.asas-more.is-auto:hover { background: var(--g1); }

/* A recipe's cover: its rooms stacked top to bottom in one tall frame — the page as
   a page, not one brick's screenshot. Every strip is the same height, so a ten-room
   page and a four-room page read at the same scale. */
.asas-cover {
	aspect-ratio: 2 / 3;
	background: var(--g2);
	border-bottom: 1px solid var(--g3);
	display: grid;
	grid-auto-rows: 1fr;
	overflow: hidden;
	position: relative;
}
/* The real composed-page shot laid over the strips; strips are the fallback. */
.asas-cover img.real {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	filter: var(--asas-cardgray, none);
}
.asas-cover img {
	filter: var(--asas-cardgray, none);
	width: 100%;
	height: 100%;
	/* A grid item's automatic minimum size is min-content, which for an <img> is its
	   intrinsic height (~206px at this width). That floors each `grid-auto-rows: 1fr`
	   track at the image height, so the fr never shrinks and ten rooms stack ~2060px
	   tall — clipped by overflow to nav + hero over a grey band. min-height:0 lets the
	   1fr tracks divide the frame evenly so every room reads as one thin strip. */
	min-height: 0;
	min-width: 0;
	object-fit: cover;
	object-position: center;
	display: block;
	border-bottom: 1px solid var(--g0);
}
.asas-card.is-recipe .asas-shotwrap { background: var(--g1); }
.asas-cardmeta.is-page .ar { color: var(--g6); font-size: 17px; }
.asas-cardmeta .two { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.asas-cardmeta .two b { font-size: 15.5px; }
.asas-cardmeta .two small { color: var(--g6); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asas-cardadd.is-open { opacity: 1; font-size: 14px; }

/* The rule above All rooms. */
.asas-railsep {
	border-top: 1px solid var(--g4);
	margin: 14px 2px 2px;
}
.asas-rail h3 .ar {
	font-weight: 400;
	color: var(--g9);
	margin-left: 6px;
}

.asas-card {
	position: relative;
	display: flex;
	flex-direction: column;
	/*
	 * NO PLATE. The card used to be a white rectangle with a border, and the name
	 * sat on the bottom of it — which made a grid of blocks read as a grid of forms
	 * rather than a grid of pictures. The owner asked for the panel under the name
	 * to go: the shot is the object, and the name is written on the paper beneath
	 * it, with nothing behind it and nothing round it.
	 *
	 * What separates one card from the next is now the SHOT's own shade (below),
	 * not an edge. A border at rest would only draw a frame round the text.
	 */
	background: none;
	border: 0;
	cursor: pointer;
	text-align: left;
	padding: 0;
	transition: box-shadow .16s, transform .16s cubic-bezier(.2, 0, 0, 1);
}
/*
 * Hover brings the card FORWARD — shot and name together, because they are one card
 * even when only one of them is painted.
 *
 * It was a 2px lift, which reads as a nudge rather than as depth. It is a lift and a
 * small scale now: 3.5% is enough to be felt and small enough that a 3-column card
 * grows about thirteen pixels, which the grid's own 16px padding absorbs — .asas-main
 * scrolls, and a scrolling box clips, so anything larger would shave the cards at the
 * edges of the room.
 *
 * `z-index: 2` is the half of this that is easy to forget: the cards are positioned
 * and otherwise all at auto, so a card growing without it slides UNDER its
 * right-hand neighbour and the effect reads as a glitch rather than as lifting.
 *
 * Guarded on (hover: hover). On a touch screen :hover latches after a tap — the card
 * would stay big until something else was touched — and there is no pointer to
 * explain why.
 */
@media (hover: hover) {
	.asas-card:hover { transform: translateY(-6px) scale(1.035); z-index: 2; }
}
.asas-card:hover .asas-shotwrap {
	box-shadow:
		0 3px 6px rgba(20, 20, 15, .08),
		0 22px 44px -18px rgba(20, 20, 15, .34);
}
/* Chosen is the one state that still gets an edge, and the owner said so: the ring
   goes round the SHOT, inside its own corner radius, so a picked card is a picture
   with a mark on it rather than a flat orange rectangle. */
/*
 * The chosen ring, drawn as a pseudo-element and not as anything simpler.
 *
 * Two things were tried and neither shows: an INSET SHADOW paints beneath the
 * element's own content, and the shot's image fills the box edge to edge; an
 * OUTLINE with a negative offset is clipped away by the wrap's own overflow:hidden
 * (computed style says `2px solid #C25121` and not one pixel of it reaches the
 * screen — measured, on all four edges). A positioned child inside the padding box
 * is neither hidden nor clipped.
 */
.asas-card.is-picked .asas-shotwrap { position: relative; }
.asas-card.is-picked .asas-shotwrap::after {
	content: '';
	position: absolute;
	inset: 0;
	border: 2px solid #C25121;
	border-radius: inherit;
	pointer-events: none;
}
.asas-card.is-picked:hover .asas-shotwrap {
	box-shadow:
		0 3px 6px rgba(20, 20, 15, .08),
		0 22px 44px -18px rgba(20, 20, 15, .34);
}
/* Someone who has asked their system for less motion still gets the shadow, which
   says the same thing without moving anything. Later in the file than the rule
   above and at the same specificity, so this wins. */
@media (prefers-reduced-motion: reduce) {
	.asas-card { transition: border-color .12s, box-shadow .12s; }
	.asas-card:hover { transform: none; }
}

.asas-shotwrap {
	aspect-ratio: 16 / 11;
	background: var(--g2);
	overflow: hidden;
	/* The corners and the shade used to belong to the card. They belong here now:
	 * this is the only painted thing left, so it is the thing that has to sit ON the
	 * page rather than be a region of it. Two soft casts, near-black at low alpha —
	 * a 1px contact shadow that sets it down, and a wide light one that lifts it off
	 * the warm paper. The border-bottom is gone with the plate it used to divide. */
	border-radius: var(--r);
	box-shadow:
		0 1px 2px rgba(20, 20, 15, .06),
		0 6px 16px -10px rgba(20, 20, 15, .18);
	transition: box-shadow .16s;
	display: grid;
	place-items: center;
}
.asas-shotwrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	filter: var(--asas-cardgray, none);
}
/* No card image yet: a hatched plate rather than an empty hole, so a missing
   thumbnail reads as "not shot yet" and not as "broken template". */
.asas-shotwrap.is-blank {
	background-image: repeating-linear-gradient(45deg, var(--g2) 0 6px, var(--g3) 6px 12px);
	color: var(--g6);
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
}

/* One line of chrome under the shot: `Wajha 012`, the drawing, and the plus that
   floats over the image. Not a caption block. */
.asas-cardmeta { padding: 9px 2px 2px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.asas-cardmeta b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Arabic sits smaller than Latin at the same nominal size — finer strokes, no
   ascender run — so on a card it takes two pixels more than the Latin beside it
   and one step of weight, the same 500-to-600 the rail already uses when a room
   is chosen. */
.asas-cardmeta .ar { color: var(--g5); font-size: 17px; font-weight: 700; }
/* The house name on a card: Latin and Arabic in one weight, the room beneath, quiet. */
.asas-cardmeta.is-house { align-items: flex-start; padding-top: 7px; }
.asas-cardmeta.is-house .two { flex: 1 1 auto; min-width: 0; }
.asas-cardmeta.is-house b { font-size: 15.5px; }
.asas-cardmeta.is-house b .ar { font-weight: 600; color: var(--g6); letter-spacing: 0; }
.asas-cardmeta.is-house small { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--g6); }
.asas-cardmeta.is-house .tag { margin-top: 2px; }
.asas-step .nm .hn .sep { color: var(--g5); font-weight: 400; }
.asas-step .nm .hn .tn { font-weight: 700; }
.asas-cardmeta .tag {
	margin-left: auto;
	flex: none;
	font-size: 11px;
	letter-spacing: .04em;
	color: var(--g6);
	border: 1px solid var(--g3);
	border-radius: 999px;
	padding: 1px 7px;
	line-height: 1.5;
	white-space: nowrap;
}

/* The selection control: a plus that becomes a check.

   Always visible, never revealed on hover. It used to fade in under the pointer,
   which meant the one control that puts a brick in your page was invisible until
   you happened to touch the card — and on a phone, invisible full stop. A library
   whose main verb is hidden reads as a gallery.

   Plus and check are drawn here rather than typed as text so both are optically
   centred at the same weight; a glyph "+" and a glyph "✓" never agree on baseline
   or size, and the swap between them jumped. */
.asas-cardadd {
	position: absolute;
	right: 8px; top: 8px;
	/* ABOVE EVERYTHING THE TILE PAINTS. The live grid gave the placeholder
	   screenshot `z-index: 1` so it could sit over the frame and fade out, and this
	   button — positioned, but at z-index auto — went under it. The placeholder
	   fades to opacity 0 and stays hit-testable, so the plus was dead on every live
	   card whether the frame had arrived or not: elementFromPoint at the button's
	   own centre returned the image. Anything else the wrap ever paints stays
	   under this. */
	z-index: 3;
	width: 34px; height: 34px;
	border-radius: 50%;
	border: 1px solid transparent;
	background: var(--g9);
	color: var(--g0);
	display: grid;
	place-items: center;
	cursor: pointer;
	opacity: 1;
	/* A hairline of the opposite value and a soft cast, so the circle still has an
	   edge on a mid-grey photograph — the one background where neither a black nor
	   a white disc has much contrast to spare. */
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .30), 0 1px 4px rgba(0, 0, 0, .28);
	transition: background .12s, border-color .12s, box-shadow .12s, transform .08s;
}

/*
 * On a dark block the control inverts.
 *
 * A near-black disc on a black hero is not a subtle control, it is a missing one:
 * the library is full of black-drawn blocks and on every one of them the plus
 * simply was not there. So the card's own artwork decides — the corner the button
 * sits in is sampled when the thumbnail loads, and a dark corner gets a white
 * circle with a dark mark. Chosen stays orange either way: the state is the state,
 * whatever it is standing on.
 */
.asas-cardadd.on-dark:not(.is-on) {
	background: var(--g0);
	color: var(--g9);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .32), 0 1px 4px rgba(0, 0, 0, .35);
}
.asas-cardadd.on-dark:not(.is-on):hover { background: var(--g2); }
.asas-cardadd.on-dark:not(.is-on):focus-visible { outline-color: var(--g0); }
/* The mark itself: two bars crossed for the plus, redrawn as a tick when chosen. */
.asas-cardadd-icon {
	width: 14px; height: 14px;
	display: block;
	background: currentColor;
	-webkit-mask: var(--plus) center / 14px 14px no-repeat;
	        mask: var(--plus) center / 14px 14px no-repeat;
}
#asas-studio {
	--plus: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><path d="M7 1.6v10.8M1.6 7h10.8" stroke="black" stroke-width="1.9" stroke-linecap="round" fill="none"/></svg>');
	--tick: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14"><path d="M2.4 7.4l3.1 3.1 6.1-6.6" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>');
}
.asas-cardadd:hover { background: var(--g8); }
.asas-cardadd:active { transform: scale(.96); }
.asas-cardadd:focus-visible { outline: 2px solid var(--g9); outline-offset: 2px; }

/* Chosen. Orange carries the state, but never alone — the mark changes shape and
   the card takes an orange border too, so the answer survives a grayscale screen
   and a reader who cannot tell the two circles apart by hue. */
.asas-cardadd.is-on {
	background: #C25121;
	border-color: #C25121;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .28), 0 1px 4px rgba(0, 0, 0, .30);
}
.asas-cardadd.is-on .asas-cardadd-icon {
	-webkit-mask-image: var(--tick);
	        mask-image: var(--tick);
}
.asas-cardadd.is-on:hover { background: #A9461D; border-color: #A9461D; }
.asas-cardadd.is-on:focus-visible { outline-color: #C25121; }

@media (prefers-reduced-motion: reduce) {
	.asas-cardadd { transition: none; }
	.asas-cardadd:active { transform: none; }
}

/* ------------------------------------------------------------- build stack -- */

.asas-stack {
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: var(--g0);
	border-right: 1px solid var(--g3);
}
.asas-stackhead {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-bottom: 1px solid var(--g3);
}
.asas-stackhead strong { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; }
.asas-stackhead .n { color: var(--g5); font-variant-numeric: tabular-nums; font-size: 13.5px; }

/* One scroller for both halves of the column. The stack is usually short and the
   colour controls are always the same height, so giving each its own scrollbar
   produced two tiny scroll regions and no way to see either fully. */
.asas-stackscroll { overflow-y: auto; flex: 1; min-height: 0; }
.asas-steps { padding: 8px; }

.asas-step {
	display: grid;
	grid-template-columns: 20px 1fr auto;
	align-items: center;
	gap: 8px;
	padding: 7px 8px;
	border: 1px solid var(--g3);
	border-radius: var(--r);
	background: var(--g0);
	margin-bottom: 6px;
	cursor: grab;
}
.asas-step:hover { border-color: var(--g5); background: var(--g1); }
.asas-step.is-drag { opacity: .4; }
.asas-step .i {
	color: var(--g5);
	font-variant-numeric: tabular-nums;
	font-size: 12.5px;
	text-align: right;
}
/* The name is the only thing here allowed to be cut short. The Arabic and the
   Header/Footer chip sit at their natural width, or the chip that says which slot a
   row is in disappears behind the ellipsis of the name beside it. */
.asas-step .nm { display: flex; flex-direction: column; gap: 0; min-width: 0; line-height: 1.3; }
.asas-step .nm .hn { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asas-step .nm .hn .ar { font-weight: 500; color: var(--g7); }
.asas-step .nm small { color: var(--g6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
/* The brick's own shot, small, so a slot reads as the thing it holds. */
.asas-stepshot {
	width: 56px;
	aspect-ratio: 16 / 11;
	background: var(--g2);
	border: 1px solid var(--g3);
	border-radius: 2px;
	overflow: hidden;
	flex: none;
}
.asas-stepshot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; filter: grayscale(1); }
.asas-step.is-locked { border-color: var(--g8); background: var(--g1); }
.asas-step .asas-lock[aria-pressed="true"] { background: var(--g9); color: var(--g0); border-color: var(--g9); }
.asas-emptystack { padding: 18px 10px 8px; color: var(--g7); }
.asas-emptystack p { margin: 0 0 12px; }
.asas-emptystack .row { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- reordering ----------------------------------------------------------- */

/* A row is grabbed by the grip, not by the row. Dragging from anywhere meant every
   attempt to press Swap or Remove started a drag instead, and gave a keyboard user
   nothing to focus. */
.asas-step { grid-template-columns: 18px 20px 56px 1fr; grid-template-areas: 'grip i shot name' 'grip i acts acts'; row-gap: 5px; }
.asas-step .asas-grip { grid-area: grip; }
.asas-step .i { grid-area: i; }
.asas-step .asas-stepshot { grid-area: shot; }
.asas-step .nm { grid-area: name; }
.asas-step .asas-stepacts { grid-area: acts; }
.asas-grip {
	display: grid;
	place-items: center;
	width: 18px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: var(--r);
	background: transparent;
	color: var(--g5);
	cursor: grab;
	/* Without this the phone scrolls the panel instead of moving the block. */
	touch-action: none;
	line-height: 1;
}
.asas-grip:hover { background: var(--g2); color: var(--g8); }
.asas-grip:focus-visible { outline: 2px solid var(--g9); outline-offset: 1px; }
.asas-gripdots { font-size: 15px; letter-spacing: -3px; }
.asas-step.is-slot .asas-grip { cursor: default; color: var(--g4); }

.asas-step.is-slot { background: var(--g1); border-style: dashed; }
.asas-step.is-slot .i { color: var(--g6); }
.asas-slotchip {
	flex: none;
	margin-left: 4px;
	padding: 1px 6px;
	border-radius: 9px;
	background: var(--g8);
	color: var(--g0);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	vertical-align: 1px;
}

.asas-step.is-drag { opacity: .35; }
#asas-studio.is-dragging { cursor: grabbing; }
#asas-studio.is-dragging .asas-step { cursor: grabbing; }

/* The insertion line lives in the list's own coordinate space, which is why .asas-steps
   has to be positioned — otherwise it lands relative to the viewport and drifts as the
   panel scrolls. */
.asas-steps { position: relative; }
.asas-dropline {
	position: absolute;
	left: 8px;
	right: 8px;
	height: 2px;
	background: var(--g9);
	border-radius: 2px;
	pointer-events: none;
}
.asas-dropline::before {
	content: "";
	position: absolute;
	left: -3px; top: -3px;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--g9);
}

.asas-move { padding: 3px 4px !important; font-size: 9px !important; line-height: 1.6 !important; }
.asas-move:disabled { opacity: .3; cursor: default; }
.asas-move:disabled:hover { background: var(--g0); color: inherit; border-color: var(--g4); }

/* Announced, never shown. */
.asas-sr {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* --- first-use guidance ---------------------------------------------------- */

.asas-tip {
	position: fixed;
	z-index: 42;
	width: min(300px, 78vw);
	padding: 12px 14px;
	border: 1px solid var(--g8);
	border-radius: var(--r);
	background: var(--g9);
	color: var(--g0);
	box-shadow: 0 18px 40px -24px rgba(0,0,0,.8);
	font-size: 14px;
	line-height: 1.5;
}
/* A tip that swallows clicks is worse than no tip. Anchored beside the rail it lies
   over the first card in the grid, and the first thing anyone tries to do after
   reading "start with Navigation" is click a navigation card. The box is inert; only
   the row of controls inside it is live. */
.asas-tip { pointer-events: none; }
.asas-tip p { margin: 0 0 10px; }
.asas-tipacts { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.asas-tipn { color: var(--g5); font-size: 12px; font-variant-numeric: tabular-nums; }
.asas-tip .asas-btn { background: transparent; color: var(--g2); border-color: var(--g7); }
.asas-tip .asas-btn:hover { background: var(--g8); color: var(--g0); }
/* The little beak, on whichever side the tip ended up. */
.asas-tip::after {
	content: "";
	position: absolute;
	top: 16px;
	width: 0; height: 0;
	border: 6px solid transparent;
}
.asas-tip[data-side="right"]::after { left: -12px; border-right-color: var(--g9); }
.asas-tip[data-side="left"]::after { right: -12px; border-left-color: var(--g9); }
.asas-tip[data-side="bottom"]::after { display: none; }

.is-tourtarget {
	outline: 2px solid var(--g9);
	outline-offset: 1px;
	border-radius: var(--r);
}
@media (prefers-reduced-motion: no-preference) {
	.is-tourtarget { animation: asas-pulse 1.8s ease-out 2; }
}
@keyframes asas-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(20,20,15,.35); }
	70%  { box-shadow: 0 0 0 8px rgba(20,20,15,0); }
	100% { box-shadow: 0 0 0 0 rgba(20,20,15,0); }
}

/* Swap and Remove sit side by side in a fixed, narrow column — the previous build
   gave the controls a wide track and it ate the preview. */
.asas-stepacts { display: flex; gap: 4px; }
.asas-stepacts button {
	border: 1px solid var(--g4);
	background: var(--g0);
	border-radius: var(--r);
	padding: 3px 8px;
	font-size: 12.5px;
	cursor: pointer;
	line-height: 1.5;
}
.asas-stepacts button:hover { background: var(--g9); color: var(--g0); border-color: var(--g9); }

.asas-stackfoot { border-top: 1px solid var(--g3); padding: 10px 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ----------------------------------------------------------------- colour -- */

/* Colour used to be a modal. Nobody found it. It sits under the stack now, on screen
   the whole time you are building, editing the preview you are already looking at —
   so there is no Apply step and nothing to dismiss. */
.asas-colour {
	border-top: 1px solid var(--g3);
	background: var(--g1);
	padding: 4px 12px 18px;
}
.asas-colhead { display: flex; align-items: center; gap: 8px; padding: 10px 0 8px; }

/* ------------------------------------------------- the ten-group accordion --
 * One group open at a time; a closed group still answers — its summary line is
 * built from live values, so the panel reads as a table of contents of the
 * page's style rather than a wall of controls. Sizes follow the contract:
 * headings 17px, labels 15px, values 15px, nothing essential under 14px, every
 * interactive target at least 44px tall.
 */
.asas-acc {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 44px;
	padding: 10px 10px;
	margin-top: 6px;
	border: 1px solid var(--g3);
	border-radius: var(--r);
	background: var(--g0);
	text-align: left;
	cursor: pointer;
}
.asas-acc:hover { border-color: var(--g5); }
.asas-acc:focus-visible { outline: 2px solid var(--g9); outline-offset: 2px; }
.asas-acc .nm {
	font-size: 17px;
	font-weight: 650;
	letter-spacing: .01em;
	color: var(--g9);
	flex: 0 0 auto;
}
.asas-acc .sum {
	flex: 1;
	min-width: 0;
	font-size: 14px;
	color: var(--g6);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: right;
}
.asas-acc .chev { color: var(--g6); font-size: 12px; }
.asas-acc.is-open { border-color: var(--g9); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.asas-accbody {
	border: 1px solid var(--g9);
	border-top: 0;
	border-radius: 0 0 var(--r) var(--r);
	padding: 12px 10px;
	background: var(--g0);
}
.asas-groupnote { margin: 0 0 10px; font-size: 14px; color: var(--g7); line-height: 1.5; }
.asas-groupnote.is-quiet { color: var(--g6); }
/* A warning is words, not just a colour — the tint only underlines them. */
.asas-groupnote.is-warn { color: #8a3b12; background: #faf1ea; border: 1px solid #e8cdbb; border-radius: var(--r); padding: 8px 10px; }
.asas-groupfoot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--g3); }

/* APPLY TO — the scope selector every compatible group carries. */
.asas-scope {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	padding: 8px;
	border: 1px solid var(--g3);
	border-radius: var(--r);
	background: var(--g1);
}
.asas-scope .lbl {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--g6);
}
.asas-scopebtn {
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid var(--g4);
	border-radius: var(--r);
	background: var(--g0);
	font-size: 15px;
	cursor: pointer;
	max-width: 200px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.asas-scopebtn[aria-pressed="true"] { background: var(--g9); color: var(--g0); border-color: var(--g9); font-weight: 600; }
.asas-scopebtn[disabled] { color: var(--g5); cursor: not-allowed; background: var(--g1); }
.asas-scopebtn:focus-visible { outline: 2px solid var(--g9); outline-offset: 2px; }
.asas-scope .hint { font-size: 14px; color: var(--g6); }

/* One control: name, the input row, then where its value comes from. */
.asas-ctl { display: grid; gap: 6px; margin-bottom: 14px; }
.asas-ctl .asas-ctlname { font-size: 15px; font-weight: 600; color: var(--g9); }
.asas-ctl .row { display: flex; align-items: center; gap: 8px; }
.asas-ctl input[type="range"] { flex: 1; accent-color: var(--g9); min-width: 0; height: 44px; }
.asas-ctl input[type="color"] {
	width: 44px; height: 44px;
	padding: 2px;
	border: 1px solid var(--g4);
	border-radius: var(--r);
	background: var(--g0);
	cursor: pointer;
}
.asas-hex, .asas-num, .asas-ctl select {
	min-height: 44px;
	padding: 8px 10px;
	border: 1px solid var(--g4);
	border-radius: var(--r);
	background: var(--g0);
	font: inherit;
	font-size: 15px;
	color: var(--g9);
}
.asas-hex { width: 110px; font-variant-numeric: tabular-nums; text-transform: lowercase; }
.asas-num { width: 84px; font-variant-numeric: tabular-nums; }
.asas-ctl select { flex: 1; }
.asas-unit { font-size: 14px; color: var(--g6); min-width: 18px; }
.asas-hex:focus-visible, .asas-num:focus-visible, .asas-ctl select:focus-visible,
.asas-ctl input[type="color"]:focus-visible { outline: 2px solid var(--g9); outline-offset: 1px; border-color: var(--g9); }

/* Segmented enum choices — buttons, not a hidden select. */
.asas-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.asas-segbtn {
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--g4);
	border-radius: var(--r);
	background: var(--g0);
	font-size: 15px;
	cursor: pointer;
}
.asas-segbtn[aria-pressed="true"] { background: var(--g9); color: var(--g0); border-color: var(--g9); font-weight: 600; }
.asas-segbtn:hover { border-color: var(--g6); }
.asas-segbtn:focus-visible { outline: 2px solid var(--g9); outline-offset: 2px; }
.asas-seg.is-chips { margin-bottom: 6px; }
.asas-seg.is-chips .asas-segbtn { min-height: 36px; padding: 4px 10px; font-size: 14px; }

/* The advanced drawer inside a group. */
.asas-advtoggle {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-height: 44px;
	margin: 4px 0 8px;
	padding: 8px 10px;
	border: 1px dashed var(--g4);
	border-radius: var(--r);
	background: var(--g1);
	font-size: 15px;
	font-weight: 600;
	color: var(--g8);
	cursor: pointer;
	text-align: left;
}
.asas-advtoggle:hover { border-color: var(--g6); }
.asas-advtoggle:focus-visible { outline: 2px solid var(--g9); outline-offset: 2px; }
.asas-advtoggle .chev { font-size: 12px; color: var(--g6); }
.asas-modesrow { display: grid; gap: 8px; margin-bottom: 8px; }

/* Provenance: inherited is a whisper, overridden is a fact with a way back. */
.asas-inherit { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--g6); }
.asas-inherit.is-custom { color: var(--g8); }
.asas-inherit.is-custom > span::before {
	content: "";
	display: inline-block;
	width: 7px; height: 7px;
	border-radius: 50%;
	background: #C25121;
	margin-right: 6px;
}
.asas-inheritbtn {
	min-height: 32px;
	padding: 4px 10px;
	border: 1px solid var(--g4);
	border-radius: var(--r);
	background: var(--g0);
	font-size: 14px;
	cursor: pointer;
}
.asas-inheritbtn:hover { border-color: var(--g6); }
.asas-inheritbtn:focus-visible { outline: 2px solid var(--g9); outline-offset: 1px; }

/* The Responsive group's ledger of everything overridden. */
.asas-ovlist { display: grid; gap: 6px; }
.asas-ovrow {
	display: grid;
	grid-template-columns: 1fr auto auto auto;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border: 1px solid var(--g3);
	border-radius: var(--r);
	font-size: 14px;
}
.asas-ovrow .k { font-weight: 600; color: var(--g9); }
.asas-ovrow .w { color: var(--g6); }
.asas-ovrow.is-head { margin-top: 10px; border-top: 1px solid var(--g3); padding-top: 10px; justify-content: space-between; }
.asas-ovrow .v { font-variant-numeric: tabular-nums; color: var(--g8); }

/* A selected step is the section being styled — the whole card says so. */
.asas-step.is-selected {
	border-color: #C25121;
	box-shadow: inset 0 0 0 1px #C25121;
}
.asas-step.is-selected .i { background: #C25121; color: #fff; border-radius: 50%; }

.asas-colour h3 {
	margin: 0;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--g7);
}
.asas-colfields { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.asas-colfields .asas-field.is-color { grid-column: span 1; }
.asas-colfields .asas-field.is-wide { grid-column: 1 / -1; }
.asas-colgroup {
	margin: 16px 0 8px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--g6);
	border-top: 1px solid var(--g3);
	padding-top: 14px;
}

/* ---------------------------------------------------------------- preview -- */

.asas-view {
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: var(--g2);
}
.asas-viewbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: var(--g1);
	border-bottom: 1px solid var(--g3);
}
.asas-viewbar .asas-w { display: flex; gap: 2px; }
.asas-viewbar .asas-w button {
	border: 1px solid var(--g4);
	background: var(--g0);
	padding: 4px 10px;
	font-size: 12.5px;
	border-radius: var(--r);
	cursor: pointer;
}
.asas-viewbar .asas-w button[aria-pressed="true"] { background: var(--g9); color: var(--g0); border-color: var(--g9); }

/*
 * The stage holds a screen; the screen holds a scaler; the scaler holds the iframe.
 *
 * Three boxes rather than one because a CSS transform does not change the layout box:
 * the scaler still occupies 1290px whatever it is scaled to, so the screen is given
 * the painted size explicitly (in JS) and the stage centres that instead. Without it
 * the panel scrolls sideways past half a metre of nothing.
 */
.asas-stage {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 14px;
	display: grid;
	place-items: start center;
}
.asas-screen {
	position: relative;
	overflow: hidden;
	background: var(--g0);
	border: 1px solid var(--g4);
	border-radius: var(--r);
	box-shadow: 0 14px 34px -26px rgba(0,0,0,.55);
	transition: width .15s ease, height .15s ease;
}
.asas-scaler { position: absolute; top: 0; left: 0; transform-origin: top left; }
.asas-scaler iframe { display: block; border: 0; background: var(--g0); }

.asas-zoom {
	color: var(--g6);
	font-variant-numeric: tabular-nums;
	font-size: 12.5px;
	margin-left: 4px;
}

.asas-empty {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--g6);
	text-align: center;
	padding: 40px;
}

/* A focus ring that survives both grounds: white in the ink bar, ink everywhere else. */
:where(#asas-studio) :is(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--g9);
	outline-offset: 2px;
	border-radius: 2px;
}
:where(#asas-studio) .asas-bar :is(a, button, input):focus-visible { outline-color: var(--g0); }

.asas-card:focus-visible { outline: 2px solid var(--g9); outline-offset: 2px; }

/* --------------------------------------------------------------- empty & warn -- */

.asas-stage.is-empty { place-items: center; }
.asas-stage.is-empty .asas-screen { display: none; }
.asas-emptynote { text-align: center; max-width: 46ch; }
.asas-emptynote p { margin: 0 0 8px; font-size: 17px; color: var(--g8); }
.asas-emptynote p.sub { font-size: 15px; color: var(--g6); line-height: 1.6; margin-bottom: 20px; }
.asas-emptynote .row { display: flex; gap: 8px; justify-content: center; }

.asas-warn {
	margin: 0;
	padding: 10px 12px;
	background: var(--g2);
	border-bottom: 1px solid var(--g3);
	color: var(--g7);
	font-size: 13.5px;
	line-height: 1.5;
}

/* ------------------------------------------------------------------ modals -- */

/* Two dialogs are left. The card inspector, which shows one block at full desktop
   width, and the how-it-works panel. The kit drawer that used to live here is gone:
   colour is part of building now, not a mode you open. */

/* `height: auto` is not redundant: a <dialog> gets `width: fit-content; height:
   fit-content` from the UA stylesheet, so setting the four insets stretched it
   horizontally and left it shrink-wrapped vertically. The 1fr row then collapsed onto
   the stage's own content and the preview got 228px of a 900px window. */
.asas-modal[open] {
	position: fixed;
	inset: calc(var(--bar) + 14px) 14px 14px;
	width: auto;
	height: auto;
	max-width: none;
	max-height: none;
	border: 1px solid var(--g4);
	border-radius: var(--r);
	padding: 0;
	margin: 0;
	background: var(--g1);
	display: grid;
	grid-template-rows: auto 1fr;
	box-shadow: 0 30px 70px -40px rgba(0,0,0,.7);
}
.asas-modal::backdrop { background: rgba(20,20,15,.42); }
.asas-modalhead {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: var(--g0);
	border-bottom: 1px solid var(--g3);
}
.asas-modalhead strong { font-size: 15px; }
.asas-modalhead .ar { color: var(--g6); }
.asas-modalhead code {
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--g6);
	background: var(--g1);
	border: 1px solid var(--g3);
	border-radius: var(--r);
	padding: 2px 7px;
}
.asas-modal .asas-stage { background: var(--g2); }

/* The inspector fits the whole block rather than scrolling through it, so the screen
   is centred on both axes instead of pinned to the top. */
.asas-stage.is-whole { place-items: center; overflow: hidden; }
/* Except when the block is a whole page and no scale would keep it legible — then the
   fit floor takes over and the stage has to scroll after all. */
.asas-stage.is-whole.is-clipped { place-items: start center; overflow: auto; }

.asas-modalhead .asas-zoom { margin-left: 2px; }

/* ---------------------------------------------------------------- how to -- */

/* inset:auto pinned this to the top-left corner and collapsed the row track, so the
   fourth step was cut in half. inset:0 + margin:auto is what centres a <dialog> once
   position has been taken over, and an explicit height is what makes the middle row
   scroll instead of overflowing. */
.asas-how[open] {
	position: fixed;
	inset: 0;
	margin: auto;
	width: min(700px, 92vw);
	height: min(84vh, 760px);
	border: 1px solid var(--g4);
	border-radius: var(--r);
	padding: 0;
	background: var(--g0);
	display: grid;
	grid-template-rows: auto 1fr auto;
	box-shadow: 0 30px 70px -40px rgba(0,0,0,.7);
}
.asas-how::backdrop { background: rgba(20,20,15,.5); }
.asas-howhead, .asas-howfoot {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 20px;
	border-bottom: 1px solid var(--g3);
}
.asas-howfoot { border-bottom: 0; border-top: 1px solid var(--g3); background: var(--g1); }
.asas-howhead strong { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.asas-howbody { overflow-y: auto; padding: 22px 24px 8px; }
.asas-howbody .lead {
	margin: 0 0 22px;
	font-size: 17px;
	line-height: 1.6;
	color: var(--g8);
	max-width: 52ch;
}
.asas-steps-doc { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.asas-steps-doc li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; }
.asas-steps-doc .n {
	display: grid;
	place-items: center;
	width: 30px; height: 30px;
	border-radius: 50%;
	background: var(--g9);
	color: var(--g0);
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.asas-steps-doc h4 {
	margin: 4px 0 5px;
	font-size: 15.5px;
	letter-spacing: .01em;
}
.asas-steps-doc p {
	margin: 0;
	color: var(--g7);
	font-size: 15px;
	line-height: 1.62;
	max-width: 56ch;
}
.asas-howtail {
	margin: 24px 0 4px;
	padding-top: 18px;
	border-top: 1px solid var(--g3);
	color: var(--g6);
	font-size: 14.5px;
	line-height: 1.6;
	max-width: 56ch;
}
.asas-seen { display: flex; align-items: center; gap: 8px; color: var(--g6); font-size: 14px; cursor: pointer; }
.asas-seen input { accent-color: var(--g9); }

/* ------------------------------------------------------------- kit fields -- */

.asas-field { display: grid; gap: 4px; margin-bottom: 12px; }
.asas-field label { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--g6); }
.asas-field .row { display: flex; align-items: center; gap: 8px; }
.asas-field input[type="range"] { flex: 1; accent-color: var(--g9); min-width: 0; }
.asas-field input[type="color"] {
	width: 36px; height: 28px; padding: 0;
	border: 1px solid var(--g4); border-radius: var(--r); background: none; cursor: pointer;
	flex: 0 0 auto;
}
.asas-field input[type="text"], .asas-field select {
	border: 1px solid var(--g4); border-radius: var(--r); padding: 5px 8px; background: var(--g0); width: 100%;
}
.asas-field output {
	font-variant-numeric: tabular-nums;
	color: var(--g6);
	font-size: 12.5px;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}
.asas-field:not(.is-color) output { min-width: 44px; text-align: right; }
/* The caption at the container-width slider's left end: its leftmost stop is a
   choice — full width, the house default — not a zero. */
.asas-rangemin {
	flex: 0 0 auto;
	font-size: 10px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--g6);
	white-space: nowrap;
}

.asas-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 16px; }
.asas-preset {
	border: 1px solid var(--g3);
	border-radius: var(--r);
	background: var(--g0);
	padding: 0;
	cursor: pointer;
	overflow: hidden;
	text-align: left;
}
.asas-preset:hover { border-color: var(--g6); }
.asas-preset[aria-pressed="true"] { border-color: var(--g9); box-shadow: inset 0 0 0 1px var(--g9); }
.asas-preset .sw { display: flex; height: 28px; }
.asas-preset .sw i { flex: 1; }
/* Latin then Arabic, the way a block card names itself. The swatch is the thing
   you actually pick by; the words are there to be said out loud. */
/* Two lines, not one. Side by side at this tile width the longer names lost
   their tails — Za'far…, Zayto…, Muham… — and a name you cannot read is not
   doing its job. Stacked, every one of the twelve fits whole. */
.asas-preset .nm {
	display: block;
	padding: 6px 8px 7px;
	font-size: 12px;
	line-height: 1.25;
}
.asas-preset .nm > span {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.asas-preset .nm > span:first-child {
	font-weight: 600;
	letter-spacing: .03em;
}
/* Arabic has no case and no business being tracked, and it must not reorder the
   line around the Latin beside it. */
.asas-preset .nm .ar {
	font-size: 11.5px;
	letter-spacing: 0;
	color: var(--g6);
	unicode-bidi: isolate;
}

.asas-note { padding: 12px 16px; color: var(--g6); }
.asas-flash {
	position: fixed;
	top: 72px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--g9);
	color: var(--g0);
	border-radius: var(--r);
	z-index: 99;
	padding: 14px 22px;
	font-size: 15.5px;
	font-weight: 700;
	max-width: min(92vw, 720px);
	box-shadow: 0 18px 40px -18px rgba(0,0,0,.7);
	animation: asas-flashin 0.22s ease;
}
@keyframes asas-flashin {
	from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
	to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* The swap picker: one room, five across, stills first. */
.asas-picker[open] { display: flex; flex-direction: column; }
.asas-pickerbody { overflow-y: auto; padding: 14px; flex: 1; min-height: 0; background: var(--g1); }
.asas-grid.is-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px)  { .asas-grid.is-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .asas-grid.is-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.asas-modalhead .gl { color: var(--g6); font-size: 13px; }
.asas-count .instack { margin-left: 10px; color: var(--g6); }

/* --------------------------------------------------------------- narrow -- */

@media (max-width: 1100px) {
	#asas-studio { --stack: 300px; }
	.asas-colfields { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
	/* The rail was a horizontal strip here: 46 chips and 4,826px of them, with the
	   three group headings and the English gloss both switched off to make them fit.
	   That is the two things that tell you what a chip means, removed to fit the chips
	   in. It is a bottom sheet now, holding the same rail the desktop shows, with the
	   headings and the gloss back. */
	/* --bar is a fixed 58px row on the shell grid. Wrapping the bar to two rows
	   without releasing it left the second row lying on top of the card grid, where
	   an image swallowed every tap aimed at the Filters button. */
	#asas-studio { --rail: 0px; --stack: 0px; --bar: auto; }
	#asas-studio { grid-template-rows: auto 1fr; }
	.asas-body,
	#asas-studio[data-mode="build"] .asas-body { grid-template-columns: 1fr; grid-template-rows: 1fr; }

	/* The bar becomes two rows. At 390px it measured 706px in one, so the search field
	   was cut in half and both buttons were off the right-hand edge entirely. */
	.asas-bar {
		flex-wrap: wrap;
		height: auto;
		row-gap: 8px;
		gap: 8px;
		padding: 8px 10px;
		overflow: visible;
	}
	.asas-mark { order: 1; }
	.asas-modes { order: 2; }
	.asas-spacer { order: 3; flex: 1 1 auto; }
	.asas-btn.is-key { order: 4; }
	.asas-account { order: 5; }
	.asas-tabs { order: 6; margin-left: 0; }
	.asas-lang { order: 6; }
	.asas-shuffle { order: 7; }
	.asas-filters { order: 8; }
	.asas-back { display: none; }        /* the mark is the way back, and it is a link */
	/* The one search takes a whole row of the wrapped bar, so a thumb gets a full
	   width of target rather than a 180px sliver between two pills. */
	.asas-search { order: 9; flex: 1 1 100%; max-width: none; }
	.asas-gridhead { flex-wrap: wrap; }
	.asas-sort { flex: 1 1 100%; }
	.asas-sortsel { flex: 1; min-width: 0; }
	.asas-btn.is-key .wide, .asas-shuffle .wide { display: none; }
	.asas-mark small { display: none; }

	/* Two rows, not three. Everything on this bar is sized for a 1440px desktop, and
	   at 390px the mark and the two mode pills alone came to 274 of the 370 available,
	   which pushed the help button onto a row of its own. */
	.asas-bar { font-size: 14px; }
	.asas-mark { gap: 6px; letter-spacing: .06em; font-size: 14px; }
	.asas-modes button { padding: 7px 10px; gap: 6px; }
	.asas-modes button .n { width: 18px; height: 18px; font-size: 11px; }
	.asas-bar .asas-btn { padding: 7px 11px; }
	.asas-search input { height: 40px; padding: 0 12px 0 34px; }
	.asas-shuffle { white-space: nowrap; }
	.asas-modal[open] { inset: 8px 6px 6px; }

	/* --- the sheet ------------------------------------------------------------ */
	.asas-filters { display: inline-flex; align-items: center; gap: 6px; }
	.asas-filters .n {
		min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
		background: var(--ink, #111); color: #fff; font-size: 11px; font-weight: 700;
		display: inline-flex; align-items: center; justify-content: center;
	}
	.asas-filters .n[hidden] { display: none; }
	#asas-studio[data-mode="build"] .asas-filters,
	#asas-studio[data-mode="build"] .asas-shuffle { display: none; }

	.asas-scrim {
		position: fixed; inset: 0; z-index: 40;
		background: rgba(17, 17, 17, .38);
		opacity: 0; pointer-events: none;
		transition: opacity .18s ease;
	}
	#asas-studio.is-filters .asas-scrim { opacity: 1; pointer-events: auto; }

	.asas-rail {
		position: fixed; z-index: 41;
		left: 0; right: 0; bottom: 0; top: auto;
		max-height: 78vh;
		display: block;
		overflow-y: auto;
		overflow-x: hidden;
		white-space: normal;
		border: 0;
		border-top: 1px solid var(--g3);
		border-radius: 14px 14px 0 0;
		background: var(--paper, #fff);
		box-shadow: 0 -12px 40px -18px rgba(0, 0, 0, .55);
		padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
		transform: translateY(101%);
		transition: transform .22s ease;
		overscroll-behavior: contain;
	}
	#asas-studio.is-filters .asas-rail { transform: none; }
	/* A grab handle, so the sheet reads as a sheet before anything is tapped. */
	.asas-rail::before {
		content: ""; display: block; width: 36px; height: 4px; border-radius: 2px;
		background: var(--g3); margin: 2px auto 12px;
	}
	.asas-rail h3 {
		display: block; position: sticky; top: 0; z-index: 1;
		margin: 14px 0 6px; padding: 4px 2px;
		background: var(--paper, #fff);
	}
	.asas-rail h3:first-of-type { margin-top: 0; }
	.asas-facet {
		width: 100%;
		border: 0;
		border-radius: 8px;
		padding: 9px 10px;
		flex: 0 0 auto;
	}
	.asas-facet:hover { padding: 9px 10px; }
	.asas-facet .ar,
	.asas-facet .ty { display: revert; }

	.asas-raildone {
		position: sticky; bottom: 0;
		display: block; width: 100%; margin-top: 14px;
		padding: 13px 16px; border: 0; border-radius: 10px;
		background: var(--ink, #111); color: #fff;
		font: inherit; font-weight: 600; cursor: pointer;
	}

	.asas-tip {
		left: 8px !important;
		right: 8px;
		bottom: 8px;
		top: auto !important;
		width: auto;
	}
	/* Four controls plus a grip do not fit beside a name at 390px, so the actions drop
	   to their own line rather than squeezing the name to nothing. */
	.asas-step { grid-template-columns: 18px 20px 48px 1fr; }
	.asas-stepshot { width: 48px; }
	/*
	 * ONE FACE AT A TIME.
	 *
	 * This used to be a split: the column capped at 46vh with the preview under
	 * it. Measured at 390x844 with three bricks in the stack, that gave the stack
	 * a 163px scrolling window onto 279px of content and the preview 312px. You
	 * could see one and a half bricks and a stamp. Neither half was usable, and
	 * making the halves smarter cannot fix it — a phone does not have the height
	 * for an editor and a preview at once.
	 *
	 * So the switch grows a third face and each one gets everything below the bar.
	 */
	#asas-studio[data-mode="build"] .asas-body {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		grid-template-areas: "tabs" "face";
	}
	#asas-studio[data-mode="build"] .asas-stack,
	#asas-studio[data-mode="build"] .asas-view { grid-area: face; min-height: 0; }
	#asas-studio[data-mode="build"] .asas-stack { border-right: 0; max-height: none; }

	#asas-studio[data-mode="build"][data-face="preview"] .asas-stack { display: none; }
	#asas-studio[data-mode="build"]:not([data-face="preview"]) .asas-view { display: none; }

	/* The library search belongs to Browse. In Build it was a whole wrapped row of
	   the bar — about seventy of the two hundred and eighty pixels the bar was
	   taking out of an eight-hundred-pixel screen — searching something you are
	   not looking at. */
	#asas-studio[data-mode="build"] .asas-search { display: none; }

}

/* Nothing above is wanted on a desktop: there the rail is the rail. */
@media (min-width: 901px) {
	.asas-filters, .asas-scrim, .asas-raildone { display: none; }
	.asas-btn.is-key .narrow, .asas-shuffle .narrow { display: none; }
}

/* ============================================================= the handoff -- */

/* The account chip. Dark like the rest of the bar until there is somebody in it, then
   it takes the filled treatment so "signed in" is legible at a glance rather than
   something you have to click to find out. */
/* (The 1.6.0 filled treatment lived here. The account is an indicator now — the
   rule above owns its look — and only How it works keeps the filled button.) */

/* The download and account sheets reuse .asas-how's frame — same dialog, same three
   rows, same backdrop — and only differ in what the middle row holds. */
/* height:auto is not enough on its own. .asas-how[open] pins inset:0, and an
   absolutely positioned box with both top and bottom resolved and height:auto is
   stretched to fill by definition — which is why the account sheet, with four lines in
   it, was drawing an 800px card with 600px of white underneath. Centring on one axis
   at a time is what lets the box be as tall as its contents. */
.asas-take[open] {
	width: min(620px, 92vw);
	top: 50%;
	left: 50%;
	right: auto;
	bottom: auto;
	margin: 0;
	transform: translate(-50%, -50%);
	height: auto;
	max-height: min(88vh, 820px);
}
/* While the gate is showing, the sheet's own actions are inside the form — an empty
   footer is just a grey band under the sign-up button. */
.asas-howfoot:empty { display: none; }
.asas-takebody { overflow-y: auto; padding: 20px 24px 18px; }
.asas-takebody .lead {
	margin: 0 0 16px;
	font-size: 16.5px;
	line-height: 1.6;
	color: var(--g8);
	max-width: 52ch;
}
.asas-takefoot-note {
	color: var(--g6);
	font-size: 13px;
	font-family: var(--mono);
}

.asas-takesteps {
	margin: 0 0 16px;
	padding-left: 20px;
	display: grid;
	gap: 7px;
	color: var(--g7);
	font-size: 14.5px;
	line-height: 1.55;
	max-width: 54ch;
}
.asas-takesteps li::marker { color: var(--g5); font-variant-numeric: tabular-nums; }

.asas-takenote {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-left: 2px solid var(--g4);
	background: var(--g1);
	color: var(--g7);
	font-size: 14px;
	line-height: 1.55;
}
.asas-takenote b { color: var(--g8); }

/* Elementor deletes widgets it does not have, silently, on import. Saying which ones
   before the file is downloaded is the difference between a customer who knows what to
   expect and one who thinks the export is broken. */
.asas-pro {
	margin: 0 0 12px;
	padding: 12px 14px;
	border: 1px solid var(--g3);
	border-radius: var(--r);
	background: var(--g1);
}
.asas-pro h4 { margin: 0 0 6px; font-size: 14px; letter-spacing: .01em; }
.asas-pro p { margin: 0 0 8px; color: var(--g7); font-size: 13.5px; line-height: 1.55; }
.asas-pro ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; color: var(--g7); }
.asas-pro b { color: var(--g8); }

.asas-err {
	margin: 0 0 12px;
	padding: 9px 12px;
	border-left: 2px solid var(--g9);
	background: var(--g2);
	color: var(--g9);
	font-size: 14px;
	line-height: 1.5;
}

/* --- the gate ------------------------------------------------------------- */

.asas-gate { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--g3); }
.asas-gatehead { margin: 0 0 5px; font-size: 15.5px; letter-spacing: .01em; }
.asas-gatesub { margin: 0 0 14px; color: var(--g7); font-size: 14.5px; line-height: 1.6; max-width: 54ch; }
.asas-gateform { display: grid; gap: 11px; max-width: 400px; }
.asas-gatefield { display: grid; gap: 4px; }
.asas-gatefield > span { font-size: 13.5px; color: var(--g7); }
.asas-gatefield input,
.asas-optional input {
	font: inherit;
	font-size: 15px;
	padding: 9px 11px;
	border: 1px solid var(--g4);
	border-radius: var(--r);
	background: var(--g0);
	color: var(--g9);
	width: 100%;
	min-width: 0;
}
.asas-gatefield input:focus-visible,
.asas-optional input:focus-visible { outline: 2px solid var(--g9); outline-offset: 1px; }

.asas-hint { margin: -4px 0 0; color: var(--g6); font-size: 13px; }

.asas-optional { border: 1px solid var(--g3); border-radius: var(--r); padding: 0 11px; }
.asas-optional[open] { padding-bottom: 11px; }
.asas-optional summary { cursor: pointer; padding: 9px 0; font-size: 13.5px; color: var(--g6); }
.asas-optional .asas-gatefield { margin-top: 8px; }

.asas-check {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 9px;
	align-items: start;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--g7);
	cursor: pointer;
}
.asas-check input { accent-color: var(--g9); margin-top: 2px; }
.asas-check a { color: var(--g9); text-underline-offset: 2px; }

.asas-gateacts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 3px; }
.asas-lost { color: var(--g6); font-size: 13px; text-underline-offset: 2px; }

.asas-takebody .asas-gatehead + .asas-builds,
.asas-takebody .asas-hint + .asas-gatehead { margin-top: 18px; }
.asas-builds { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.asas-builds li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border: 1px solid var(--g3);
	border-radius: var(--r);
	font-size: 14px;
}
.asas-builds .asas-hint { margin: 0; }

/* The footer is a flex row and the bar's mobile rules order .is-key to position 4, so
   the download would have sorted itself to the end of the row on a phone. It gets its
   own row here at every width instead: the label is the promise, and abbreviating it
   to fit beside three secondary buttons was the wrong trade. */
.asas-stackfoot .asas-take-btn {
	order: -1;
	flex: 1 1 100%;
	justify-content: center;
	padding: 9px 12px;
	background: var(--g9);
	color: var(--g0);
	border-color: var(--g9);
	font-weight: 600;
}
.asas-stackfoot .asas-take-btn:hover { background: var(--g8); border-color: var(--g8); }
.asas-stackfoot .asas-take-btn .wide,
.asas-stackfoot .asas-take-btn .narrow { display: inline; }

@media (max-width: 900px) {
	.asas-account { order: 8; }
	/* Same reason as above: bottom stays auto, or the sheet stretches to the viewport
	   whatever is in it. */
	.asas-take[open] {
		width: auto;
		inset: 8px 6px auto;
		transform: none;
		margin: 0;
		height: auto;
		max-height: calc(100dvh - 16px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.asas-rail, .asas-scrim { transition: none; }
}

/* --------------------------------------------------------------- headings -- */
/* Every heading in the chrome reads in caps (owner's call, August 2026): the
   room names in the rail, the card labels, the step names in the stack, the
   section and modal titles, the mode and tab buttons. Arabic has no case and is
   untouched by text-transform; glosses, counts and sentences stay as they are. */
/* :not(.ar) — the Blocks menu puts Arabic first inside .nm, and Arabic has no case:
   uppercasing and tracking it is a Latin-only treatment and must not reach it. */
.asas-facet .nm > span:first-child:not(.ar),
.asas-drawer > span:first-child,
.asas-cardmeta b,
.asas-cardmeta.is-page b,
.asas-step .nm .hn,
.asas-modalhead strong,
.asas-modes button,
.asas-tabs button,
.asas-gridsub > span:first-child,
.asas-howhead strong,
.asas-stackhead strong,
.asas-emptynote p:first-child,
.asas-take h2, .asas-take h3, .asas-take strong.t,
.asas-how h2, .asas-how h3,
.asas-modal h2, .asas-modal h3,
.asas-panelhead, .asas-fieldset legend {
	text-transform: uppercase;
	letter-spacing: .05em;
}
.asas-modes button, .asas-tabs button { letter-spacing: .06em; font-size: 13px; }
.asas-cardmeta b { letter-spacing: .04em; }
.asas-facet .nm .ar, .asas-step .nm .hn .ar, .asas-cardmeta.is-page b .ar, .asas-modalhead .ar { letter-spacing: 0; }

/* ------------------------------------------------- add feedback (+ badge) -- */
.asas-modes button .ct {
	display: none;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	margin-inline-start: 7px;
	background: #111;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}
.asas-modes button .ct.is-on { display: inline-block; }
@keyframes asas-ctpop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
.asas-modes button .ct.is-pop { animation: asas-ctpop 0.3s ease; }

/* ================================================================ the editor ==

   The owner's tab. A picker on the left, the block's words in the middle, the
   block itself on the right — so an edit is made while looking at the thing it
   changes, not at a list of field names.

   It borrows the grey scale and nothing else: no new colours, no new radii. A
   staged field is marked with the accent rule down its edge, an unsaved one with
   a fill, and those two states are the whole visual language of the screen. */

/* .asas-body is a two-column grid — rail then content — and a lone child lands in
   the 300px rail track. The editor is a whole screen, not a panel beside the rail,
   so it spans both tracks. min-width:0 for the usual reason: a `1fr` track cannot
   be narrower than its content, and the preview iframe would otherwise pin it. */
.asas-edit {
	grid-column: 1 / -1;
	min-width: 0;
	display: flex; flex-direction: column;
	height: 100%; min-height: 0;
	background: var(--g1);
}

.asas-edit-bar {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 14px;
	background: var(--g0);
	border-bottom: 1px solid var(--g3);
	flex: 0 0 auto;
}
.asas-edit-bar .asas-edit-q { flex: 0 1 320px; }
.asas-edit-q, .asas-edit-room {
	padding: 6px 9px; border: 1px solid var(--g4); border-radius: var(--r);
	background: var(--g0); color: var(--g9); font: inherit; font-size: 13px;
}

.asas-edit-body { display: flex; flex: 1 1 auto; min-height: 0; }

/* ---- the picker */
.asas-edit-list {
	flex: 0 0 290px; min-width: 0;
	overflow-y: auto;
	border-inline-end: 1px solid var(--g3);
	background: var(--g0);
	padding-bottom: 20px;
}
.asas-edit-n { margin: 0; padding: 9px 14px; font-size: 12px; color: var(--g6); border-bottom: 1px solid var(--g2); }
.asas-edit-row {
	display: flex; align-items: center; gap: 10px; width: 100%;
	padding: 7px 12px; border: 0; border-bottom: 1px solid var(--g2);
	background: none; text-align: start; cursor: pointer; font: inherit;
}
.asas-edit-row:hover { background: var(--g1); }
.asas-edit-row.is-open { background: var(--g2); }
.asas-edit-row img { width: 54px; height: 37px; object-fit: cover; background: var(--g2); border: 1px solid var(--g3); flex: 0 0 auto; }
.asas-edit-row .nm { display: flex; flex-direction: column; min-width: 0; }
.asas-edit-row .nm b { font-size: 13px; font-weight: 600; color: var(--g9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asas-edit-row .nm i { font-size: 11px; font-style: normal; color: var(--g6); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The room carries the weight on this line: a name in this library is a shape
   word and repeats across rooms, so the room is the half that identifies. */
.asas-edit-row .nm i .rm { font-family: var(--sans); font-weight: 600; letter-spacing: .04em;
	text-transform: uppercase; font-size: 10px; color: var(--g7); }
.asas-edit-row .nm b .ar { font-weight: 500; color: var(--g7); }
.asas-edit-row .dot { margin-inline-start: auto; color: var(--g9); font-size: 10px; }
.asas-edit-row.has-draft .nm b::after { content: ''; }

/* ---- the pane */
.asas-edit-pane { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.asas-edit-empty { margin: 0; padding: 28px 20px; color: var(--g6); font-size: 14px; }

.asas-edit-head {
	display: flex; align-items: flex-start; gap: 14px;
	padding: 13px 18px; background: var(--g0); border-bottom: 1px solid var(--g3); flex: 0 0 auto;
}
.asas-edit-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.asas-edit-head .sub { margin: 3px 0 0; font-size: 12px; color: var(--g6); }
/* Isolated, or the bidi algorithm reorders the Latin AROUND the Arabic run and
   `Mazaya \u0642\u0627\u062a\u0645 \u00b7 16 text fields` comes out as `Mazaya 16 \u0642\u0627\u062a\u0645 text fields`. */
.asas-edit-head .sub .ar { color: var(--g7); unicode-bidi: isolate; }
.asas-edit-row .nm b .ar { unicode-bidi: isolate; }
.asas-edit-acts { margin-inline-start: auto; display: flex; gap: 8px; }
.asas-edit-acts .asas-btn.is-key { background: var(--g9); color: var(--g0); border-color: var(--g9); font-weight: 600; }
.asas-edit-acts .asas-btn[disabled] { opacity: .45; cursor: default; }

.asas-edit-split { display: flex; flex: 1 1 auto; min-height: 0; }
.asas-edit-form { flex: 1 1 46%; min-width: 0; overflow-y: auto; padding: 14px 18px 40px; }
.asas-edit-preview {
	flex: 1 1 54%; min-width: 0; display: flex; flex-direction: column;
	border-inline-start: 1px solid var(--g3); background: var(--g2);
}
.asas-edit-preview iframe { flex: 1 1 auto; width: 100%; border: 0; background: var(--g0); }
.asas-edit-note { margin: 0; padding: 8px 14px; font-size: 11.5px; color: var(--g6); background: var(--g1); border-top: 1px solid var(--g3); }

.asas-edit-group { border: 1px solid var(--g3); border-radius: var(--r); margin: 0 0 14px; padding: 6px 12px 12px; background: var(--g0); }
.asas-edit-group legend { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--g6); padding: 0 5px; font-family: var(--mono); }

.asas-edit-field { padding: 7px 0 7px 10px; border-inline-start: 2px solid transparent; }
.asas-edit-field label { display: block; font-size: 11.5px; color: var(--g6); margin-bottom: 3px; }
.asas-edit-input {
	width: 100%; padding: 6px 8px; border: 1px solid var(--g4); border-radius: var(--r);
	background: var(--g0); color: var(--g9); font: inherit; font-size: 13.5px; line-height: 1.45;
	resize: vertical;
}
.asas-edit-input:focus { outline: 2px solid var(--g9); outline-offset: 1px; border-color: var(--g9); }
/* Unsaved in this session. */
.asas-edit-field.is-dirty { border-inline-start-color: var(--g9); background: var(--g1); }
/* Already staged on the server, waiting to be published. */
.asas-edit-field.is-staged { border-inline-start-color: var(--g5); }
.asas-edit-was { margin: 4px 0 0; font-size: 11px; color: var(--g6); font-family: var(--mono); }

/* ---- the review sheet */
.asas-sheet {
	position: fixed; inset: 0; z-index: 60;
	background: rgba(20, 20, 15, .48);
	display: flex; align-items: center; justify-content: center; padding: 24px;
}
.asas-sheet-in {
	background: var(--g0); border-radius: var(--r); width: min(860px, 100%);
	max-height: 100%; display: flex; flex-direction: column; overflow: hidden;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .3);
}
.asas-sheet-head, .asas-sheet-foot {
	display: flex; align-items: center; gap: 10px;
	padding: 13px 18px; flex: 0 0 auto;
}
.asas-sheet-head { border-bottom: 1px solid var(--g3); }
.asas-sheet-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.asas-sheet-head .asas-btn { margin-inline-start: auto; }
.asas-sheet-foot { border-top: 1px solid var(--g3); background: var(--g1); }
.asas-sheet-foot .asas-btn.is-key { background: var(--g9); color: var(--g0); border-color: var(--g9); font-weight: 600; }
.asas-sheet-body { overflow-y: auto; padding: 12px 18px 18px; }

.asas-diff { border: 1px solid var(--g3); border-radius: var(--r); margin-bottom: 12px; }
.asas-diff-head { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: var(--g1); border-bottom: 1px solid var(--g3); cursor: pointer; }
.asas-diff-head b { font-size: 13.5px; }
.asas-diff-head i { font-style: normal; font-size: 11.5px; color: var(--g6); font-family: var(--mono); }
.asas-diff-row { padding: 7px 12px; border-bottom: 1px solid var(--g2); font-size: 13px; }
.asas-diff-row:last-child { border-bottom: 0; }
/* Old above, new below, so a long line does not have to be read across a column
   boundary — and marked with del/ins so the difference survives without colour. */
.asas-diff-row del { display: block; color: var(--g6); text-decoration: line-through; }
.asas-diff-row ins { display: block; color: var(--g9); text-decoration: none; font-weight: 600; }

@media (max-width: 900px) {
	.asas-edit-body { flex-direction: column; }
	.asas-edit-list { flex: 0 0 auto; max-height: 220px; border-inline-end: 0; border-bottom: 1px solid var(--g3); }
	.asas-edit-split { flex-direction: column; }
	.asas-edit-preview { border-inline-start: 0; border-top: 1px solid var(--g3); min-height: 320px; }
}

/* ------------------------------------------------------- the blocks menu -- */

/*
 * The Blocks tab's left rail, Arabic-first (owner's call, August 2026). Everything
 * here is gated on `.is-blocks-menu`, which drawRail() puts on the rail only while
 * the Blocks tab is showing, and on the two modifier classes the new rows carry —
 * so Pages, Journal, the cards, Build mode and the previews are untouched.
 *
 * The palette is warmer and higher-contrast than the shared grey scale: a selected
 * room is a charcoal tile rather than a pale one, because on a rail of thirty rows
 * a pale selection is not findable at a glance.
 */
#asas-studio {
	--rail-bg: #fcfbf8;
	--rail-ink: #171714;
	--rail-muted: #66645e;
	--rail-border: #e3e0d8;
	--rail-selected: #1d1c19;
	/* Hover: the same tile a step lighter, so it reads as the same treatment. */
	--rail-hovered: #3a3833;
	--rail-selected-text: #fffdf7;
	--rail-selected-muted: #d7d3ca;
	--rail-accent: #c25121;
	--rail-accent-on-dark: #e77b56;
	--rail-radius: 8px;

	--rail-font-latin: "Manrope", "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	/* No Arabic face is bundled with the plugin — every font under assets/fonts is a
	   Latin subset — so this is a fallback stack, not a webfont request. Nothing here
	   fetches a remote font. */
	--rail-font-arabic: "Noto Sans Arabic", "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
}

#asas-studio .asas-rail.is-blocks-menu {
	background: var(--rail-bg);
	scrollbar-gutter: stable;
}

/* The panel title, two lines like every row under it. */
#asas-studio .asas-paneltitle.is-blocks-menu h2 {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1px;
}
#asas-studio .asas-paneltitle.is-blocks-menu h2 .ar {
	font-family: var(--rail-font-arabic);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	unicode-bidi: isolate;
}
#asas-studio .asas-paneltitle.is-blocks-menu h2 .functional {
	font-family: var(--rail-font-latin);
	font-size: 10.5px;
	font-weight: 650;
	line-height: 1.4;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--rail-muted);
}

/* A group heading: البيت over PAGE STRUCTURE. */
/* The heading reads from the right edge and the rows from the left: a heading is a
   label, not an option, and the difference has to be visible before anything is
   clicked. Padding-right is 20px because that is where a row's own content ends —
   8px of margin plus 12px of padding — so the two right edges line up. */
#asas-studio .asas-block-group-head {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 1px;
	padding: 18px 20px 6px;
	text-align: right;
	text-transform: none;
	letter-spacing: 0;
}
#asas-studio .asas-block-group-head .ar {
	font-family: var(--rail-font-arabic);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	letter-spacing: 0;
	text-transform: none;
	color: var(--rail-ink);
	unicode-bidi: isolate;
}
#asas-studio .asas-block-group-head .functional {
	font-family: var(--rail-font-latin);
	font-size: 10.5px;
	font-weight: 650;
	line-height: 1.4;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--rail-muted);
}
/* One filter row: Arabic, functional English under it, count at the far edge. */
#asas-studio .asas-block-menu-facet {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"name count"
		"function count";
	align-items: center;
	column-gap: 10px;
	row-gap: 1px;

	width: calc(100% - 16px);
	min-height: 56px;
	margin: 2px 8px;
	padding: 8px 12px;

	border: 1px solid transparent;
	border-radius: var(--rail-radius);
	background: transparent;
	color: var(--rail-ink);
	text-align: start;
	cursor: pointer;

	transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
#asas-studio .asas-block-menu-facet .nm {
	grid-area: name;
	min-width: 0;
	display: block;
	font-family: var(--rail-font-arabic);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	color: inherit;
}
#asas-studio .asas-block-menu-facet .nm > .ar {
	font: inherit;
	letter-spacing: 0;
	text-transform: none;
	unicode-bidi: isolate;
}
#asas-studio .asas-facet-functional {
	grid-area: function;
	min-width: 0;
	font-family: var(--rail-font-latin);
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--rail-muted);
}
#asas-studio .asas-facet-count {
	grid-area: count;
	align-self: center;
	min-width: 2.5ch;
	padding: 2px 7px;
	border-radius: 999px;
	background: #eeece7;
	color: var(--rail-muted);
	font-family: var(--rail-font-latin);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* Hover wears the selected treatment one step lighter (owner's call, September
   2026). Same family, so pointing at a room previews what choosing it looks like;
   one step apart, so while the cursor is on the rail the room you are IN is still
   the darker of the two. */
@media (hover: hover) {
	#asas-studio .asas-block-menu-facet:hover:not(:disabled):not([aria-pressed="true"]) {
		background: var(--rail-hovered);
		border-color: var(--rail-hovered);
		color: var(--rail-selected-text);
	}
	#asas-studio .asas-block-menu-facet:hover:not(:disabled):not([aria-pressed="true"]) .asas-facet-functional {
		color: var(--rail-selected-muted);
	}
	#asas-studio .asas-block-menu-facet:hover:not(:disabled):not([aria-pressed="true"]) .asas-facet-count {
		background: rgb(255 255 255 / 12%);
		color: var(--rail-selected-text);
	}
}
#asas-studio .asas-block-menu-facet[aria-pressed="true"] {
	background: var(--rail-selected);
	border-color: var(--rail-selected);
	color: var(--rail-selected-text);
}
#asas-studio .asas-block-menu-facet[aria-pressed="true"] .asas-facet-functional { color: var(--rail-selected-muted); }
#asas-studio .asas-block-menu-facet[aria-pressed="true"] .asas-facet-count {
	background: rgb(255 255 255 / 12%);
	color: var(--rail-selected-text);
}
/* The focus ring stays: it draws only for a keyboard, and it is the one thing that
   tells a keyboard user where they are. It is a ring around the row, not the bar
   that was removed from the row's left edge. */
#asas-studio .asas-block-menu-facet:focus-visible {
	outline: 3px solid var(--rail-accent);
	outline-offset: 2px;
	background: transparent;
}
#asas-studio .asas-block-menu-facet[aria-pressed="true"]:focus-visible {
	outline-color: var(--rail-accent-on-dark);
	background: var(--rail-selected);
}
/* A room with nothing in it stays on the list and goes quiet — it never wears the
   selected tile, and it never answers to hover. */
#asas-studio .asas-block-menu-facet:disabled,
#asas-studio .asas-block-menu-facet.is-off {
	background: transparent;
	border-color: transparent;
	color: #96928a;
	cursor: not-allowed;
}
#asas-studio .asas-block-menu-facet.is-off .asas-facet-functional,
#asas-studio .asas-block-menu-facet.is-off .asas-facet-count { color: #96928a; }
#asas-studio .asas-block-menu-facet.is-off:hover { background: transparent; border-color: transparent; }

@media (prefers-reduced-motion: reduce) {
	#asas-studio .asas-block-menu-facet { transition: none; }
}

/* The mobile filter sheet is the same rail. Rows keep their two lines and their
   44px-plus target; only the margins tighten. */
@media (max-width: 900px) {
	#asas-studio .asas-rail.is-blocks-menu { background: var(--rail-bg); }
	#asas-studio .asas-block-menu-facet {
		width: 100%;
		margin: 2px 0;
		min-height: 52px;
	}
	#asas-studio .asas-block-group-head { padding: 14px 2px 6px; background: var(--rail-bg); }
}

/* ---------------------------------------------------- the grid, in colour -- */

/*
 * THE CARDS ARE LIVE BLOCKS, AND AS OF 1.30.0 THEY ARE IN COLOUR.
 *
 * The grid was drawn grey on purpose: the August browse redesign said "grey
 * everything", and while a card was a photograph that was the right call — a wall
 * of four thousand thumbnails in four thousand palettes is noise, not a catalog.
 *
 * But the cards stopped being photographs. Every tile is now the block itself,
 * rendered live through the shot route wearing the visitor's own kit, and a live
 * block desaturated is a live block lying about what it will look like on the page.
 * The kit is the thing being sold; showing it in grey hides the product.
 *
 * ONE TOKEN, FOUR RULES — page covers, the placeholder screenshot that sits on top
 * until a frame is ready, and the frame itself. So the tile never fades from a grey
 * photo into a colour block, and going back to grey is one value here.
 *
 * The Build rail's step thumbnails stay grey deliberately: 40px chips in a control
 * surface, not the catalog.
 */
#asas-studio {
	--asas-cardgray: none;
}

/* ------------------------------------------------- live cards, owner's hands -- */

/*
 * Every card in the grid is the block itself now, rendered through the shot route
 * inside the same 16/11 frame and scaled so the whole 1280px-wide block reads at
 * card size. A photograph went out of date the moment the block was edited; a
 * frame cannot.
 *
 * The screenshot has not gone away — it is what the tile shows FIRST, and it stays
 * until the frame behind it has finished. So the grid paints instantly, a fast
 * scroll costs nothing, and the change from picture to block is a fade rather than
 * a hole. studio.js mounts and unmounts the frames; this only says how they sit.
 */
#asas-studio .asas-shotwrap.is-live {
	position: relative;
	background: var(--g0);
}
#asas-studio .asas-shotwrap.is-live iframe {
	position: absolute;
	inset: 0;
	width: 1280px;
	height: 880px;
	border: 0;
	transform-origin: top left;
	/* --k is the card's own width over 1280, set by liveShot(): the whole block
	   reads at card size and is never cropped sideways. The fallback matches a
	   four-up grid at 1440, so a frame is never left at 1:1 if the script has not
	   measured yet. */
	transform: scale(var(--k, .25));
	pointer-events: none;
	filter: var(--asas-cardgray, none);
}
/* The screenshot, on top of the frame until the frame is ready. Fading it out
   rather than removing it means the tile never flashes its own background between
   the two. */
#asas-studio .asas-shotwrap.is-live > .asas-shotph {
	position: relative;
	z-index: 1;
	/* Decoration, never a target. It covers the whole tile and outlives its own
	   visibility — opacity 0 still takes clicks — so it must not take them. The
	   card's own click still fires: the hit falls through to the wrap and bubbles. */
	pointer-events: none;
	transition: opacity .22s ease;
}
#asas-studio .asas-shotwrap.is-live.is-lit > .asas-shotph {
	opacity: 0;
}
/* A block with no card yet says so, and says it in the same place. */
#asas-studio .asas-shotwrap.is-live > span.asas-shotph {
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--g6);
}

/* Remove is the one button on these panels that cannot be undone by clicking again,
   so it does not look like its neighbours. */
#asas-studio .asas-btn.is-danger {
	border-color: #c9bdb6;
	color: #8a3b1c;
}
#asas-studio .asas-btn.is-danger:hover {
	background: #f7ece7;
	border-color: #8a3b1c;
	color: #6f2f16;
}

/* ------------------------------------------------------------------- ask -- */

/*
 * The studio's own confirmation, used where a decision needs its evidence beside
 * it. A native confirm() cannot carry a list, and the list is the question.
 */
#asas-studio .asas-ask {
	width: min(520px, calc(100vw - 32px));
	padding: 22px 24px 18px;
	border: 1px solid var(--g4);
	border-radius: 10px;
	background: var(--g0);
	color: var(--g9);
	font: inherit;
	box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .45);
}
#asas-studio .asas-ask::backdrop { background: rgb(20 20 16 / 45%); }
#asas-studio .asas-ask h2 {
	margin: 0 0 10px;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	font-size: 17px;
	font-weight: 650;
	letter-spacing: -.01em;
}
#asas-studio .asas-ask h2 code {
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 500;
	padding: 2px 6px;
	border-radius: var(--r);
	background: var(--g2);
	color: var(--g7);
}
#asas-studio .asas-ask p { margin: 0 0 10px; font-size: 13.5px; color: var(--g7); }
#asas-studio .asas-ask p.foot { color: var(--g6); font-size: 12.5px; }
#asas-studio .asas-ask ul {
	margin: 0 0 12px;
	padding: 10px 14px 10px 28px;
	border-radius: var(--r);
	background: var(--g1);
	font-size: 13px;
	color: var(--g8);
}
#asas-studio .asas-ask li { margin: 2px 0; }
#asas-studio .asas-ask li.more { list-style: none; margin-inline-start: -14px; color: var(--g6); }
/* The confirm sheet's primary is destructive by default — Remove, Discard — so
   it wears the danger colour. When the sheet is asking about the thing you came
   to do, that emphasis is backwards. */
#asas-studio .asas-ask-acts .asas-btn.is-key {
	background: var(--g9);
	border-color: var(--g9);
	color: var(--g0);
	font-weight: 600;
}
#asas-studio .asas-ask-acts .asas-btn.is-key:hover { background: var(--g8); border-color: var(--g8); }

#asas-studio .asas-ask-acts {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 4px;
}

/* ================================================================ website ==
 *
 * The build column edits one of two objects, and the switch at its top says
 * which. Everything below belongs to the website side.
 *
 * The old panel failed on one thing above all: it had no gutter. Rows sat hard
 * against the rail edge, five controls shared twenty-two pixels of height, and
 * the lead paragraph was ten-pixel grey nobody would ever read. Padding is not
 * decoration here — it is what lets a row be scanned instead of deciphered.
 */

/* ---------------------------------------------------------- object switch -- */
.asas-objtabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	flex: none;
	padding: 10px 12px;
	background: var(--g1);
	border-bottom: 1px solid var(--g3);
}

.asas-obj {
	display: flex;
	flex-direction: column;
	gap: 1px;
	padding: 8px 10px;
	font: inherit;
	text-align: left;
	color: var(--g6);
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--r);
	cursor: pointer;
}
.asas-obj:hover { background: var(--g2); }
.asas-obj .nm { font-size: 13px; font-weight: 600; line-height: 1.2; }
.asas-obj .nm .sm { display: none; }
.asas-obj .sub { font-size: 10.5px; line-height: 1.2; opacity: .75; }
.asas-obj.is-on {
	color: var(--g0);
	background: var(--g9);
	border-color: var(--g9);
}
.asas-obj.is-on:hover { background: var(--g8); }

/* The Preview face exists because a phone cannot show the editor and the page at
   the same time. A desktop can, so there it is not a face at all.
 *
 * These phone rules live HERE, after the component, and not up with the other
 * mobile rules a thousand lines earlier — same specificity, and the later rule
 * wins. Put there, `.nm .sm { display: none }` below overrode the media query's
 * `display: inline` and every tab lost its label: the switch rendered as three
 * unlabelled pills showing only "3 blocks", "no pages yet", "see the page".
 */
.asas-obj.is-phone { display: none; }

@media (max-width: 900px) {
	.asas-obj.is-phone { display: flex; }

	.asas-objtabs { grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 6px 8px; }
	/* One line, not four. The switch has to be smaller than what it switches. */
	.asas-obj {
		flex-direction: row;
		align-items: baseline;
		justify-content: center;
		gap: 5px;
		padding: 9px 4px;
		white-space: nowrap;
		overflow: hidden;
	}
	.asas-obj .nm { font-size: 12.5px; }
	.asas-obj .nm .lg { display: none; }
	.asas-obj .nm .sm { display: inline; }
	.asas-obj .sub { font-size: 10.5px; }
	/* The count is the point on a phone; the words for an empty one are not. */
	.asas-obj:not(.is-on) .sub { display: none; }
}

/* ------------------------------------------------------------- the panel -- */
.asas-site {
	padding: 18px 20px 24px;
}

.asas-site .asas-colhead { margin-bottom: 10px; }

.asas-sitelead {
	margin: 0 0 20px;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--g6);
}
.asas-sitelead b { color: var(--g9); font-weight: 600; }

.asas-fieldlab {
	display: block;
	margin: 0 0 5px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--g5);
}

.asas-siteName {
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 10px 12px;
	font: inherit;
	font-size: 14px;
	color: inherit;
	background: var(--g1);
	border: 1px solid var(--g3);
	border-radius: var(--r);
}
.asas-siteName:focus-visible { outline: none; border-color: var(--g9); background: var(--g0); }

/* A section is a title and one line saying what the section is FOR. The old
   panel had the titles and none of the sentences, which is why it read as a
   form rather than as instructions. */
.asas-sitesec { margin: 26px 0 8px; }
.asas-sitesec h4 {
	margin: 0 0 3px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--g5);
}
.asas-sitesec p {
	margin: 0;
	font-size: 11.5px;
	line-height: 1.45;
	color: var(--g6);
}

.asas-sitelist {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--g3);
	border-radius: var(--r);
	overflow: hidden;
	background: var(--g0);
}

.asas-siterow,
.asas-partrow {
	padding: 10px 12px;
	border-bottom: 1px solid var(--g2);
}
.asas-siterow:last-child,
.asas-partrow:last-child { border-bottom: 0; }

.asas-siterow .top,
.asas-partrow .top { display: flex; align-items: center; gap: 8px; }
.asas-siterow .act,
.asas-partrow .act { display: flex; align-items: center; gap: 2px; margin-top: 3px; }

.asas-siterow .fr {
	flex: none;
	width: 16px;
	padding: 0;
	font-size: 12px;
	line-height: 1;
	color: var(--g5);
	background: none;
	border: 0;
	cursor: pointer;
}
.asas-siterow .fr.on { color: var(--g9); }

.asas-siterow input.nm {
	flex: 1 1 auto;
	min-width: 0;
	padding: 2px 4px;
	margin-left: -4px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: inherit;
	background: none;
	border: 1px solid transparent;
	border-radius: 2px;
}
.asas-siterow input.nm:hover { border-color: var(--g3); }
.asas-siterow input.nm:focus-visible { outline: none; background: var(--g1); border-color: var(--g9); }

.asas-siterow .ct { flex: none; font-size: 11px; color: var(--g5); }
.asas-siterow .flag,
.asas-partrow .why { font-size: 10.5px; color: var(--g5); }

.asas-partrow .nm { flex: none; min-width: 74px; font-size: 13px; font-weight: 600; }
.asas-partrow .val {
	font-size: 12px;
	color: var(--g7);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* An empty required slot is not an error and must not look like one — it is a
   statement of what will happen, so it reads as information, not alarm. */
.asas-partrow .val.is-def { color: var(--g6); font-style: italic; }
.asas-partrow.is-empty { background: var(--g1); }

/* Actions were pale grey on grey and read as disabled. They are links now. */
.asas-siterow .lk,
.asas-partrow .lk {
	flex: none;
	padding: 3px 7px;
	font: inherit;
	font-size: 11.5px;
	font-weight: 500;
	color: var(--g7);
	background: none;
	border: 1px solid var(--g3);
	border-radius: 2px;
	cursor: pointer;
}
.asas-siterow .lk:hover,
.asas-partrow .lk:hover { color: var(--g0); background: var(--g9); border-color: var(--g9); }

.asas-siteadd {
	width: 100%;
	margin-top: 8px;
	justify-content: center;
}

.asas-stackfoot.is-site { display: block; padding: 12px 20px 14px; }
.asas-sitetake {
	width: 100%;
	justify-content: center;
	background: var(--g9);
	border-color: var(--g9);
	color: var(--g0);
	font-weight: 600;
}
.asas-sitetake:hover { background: var(--g8); border-color: var(--g8); }
.asas-sitetake[disabled] {
	background: var(--g0);
	border-color: var(--g4);
	color: var(--g5);
	cursor: default;
}

.asas-sitefoot {
	margin: 22px 0 0;
	font-size: 10.5px;
	text-align: center;
	color: var(--g5);
}

/* The language switch in the Colour & type head. Off it is a quiet EN; on it says
   عربي in the rail's own Arabic face, and is filled, because it changes every word
   on the page and should not look like a preference. */
.asas-colhead .asas-btn.is-on {
	background: var(--ink, #14140f);
	color: #fff;
	border-color: var(--ink, #14140f);
	font-family: "Noto Sans Arabic", "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
	font-weight: 600;
	letter-spacing: 0;
}
