/**
 * Asmae — components
 *
 * Six compositions, each reused on at least three page types. If a seventh
 * appears here, check first whether an existing one with a modifier would
 * do the job.
 *
 * Design System v2, section 5.
 *
 * @package Asmae
 */

/* ==================================================================
   1 — Name card
   The most reused component in the product: homepage grids, archives,
   search results, finder results, related blocks, collection pages.
   Three densities, one markup.
   ================================================================== */

.asmae-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: var(--asmae-space-3);
}

.asmae-grid--tight {
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/*
 * No coloured leading edge. It read as a stripe rather than a cue, and a
 * uniform card with real elevation looks considerably more finished. The
 * gender cue now lives in the archives and filters, where it is a stated
 * fact rather than a decoration.
 */
.asmae-item {
	display: block;
	padding: var(--asmae-space-4);
}

.asmae-item:hover,
.asmae-item:focus-visible {
	border-color: transparent;
	box-shadow: var(--asmae-e-card-hover);
}

.asmae-item__name {
	display: block;
	font-size: var(--asmae-size-subtitle);
	font-weight: 600;
	line-height: var(--asmae-lh-subtitle);
	color: var(--asmae-ink-800);
}

/*
 * The transliteration is a secondary cue, not a second title. Small,
 * tracked, uppercase and quiet, so the Arabic form keeps the eye.
 */
.asmae-item__latin {
	display: block;
	font-size: var(--asmae-size-micro);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--asmae-ink-400);
	text-align: right;
}

.asmae-item__gloss {
	display: block;
	margin-top: var(--asmae-space-2);
	padding-top: var(--asmae-space-2);
	border-top: 1px solid var(--asmae-ink-100);
	font-size: var(--asmae-size-small);
	line-height: 1.7;
	color: var(--asmae-ink-600);
}

/* compact — grids of three columns and more */
.asmae-item--compact {
	padding: var(--asmae-space-3);
}

/* minimal — related blocks and the featured bar */
.asmae-item--minimal {
	padding: var(--asmae-space-3);
}

.asmae-item--minimal .asmae-item__gloss {
	display: none;
}

/* ==================================================================
   2 — Root stamp
   The signature. Two sizes, no variants.
   ================================================================== */

.asmae-stamp {
	display: inline-flex;
	align-items: center;
	gap: var(--asmae-space-1);
}

.asmae-stamp__cell {
	display: grid;
	place-items: center;
	min-width: 32px;
	height: 32px;
	background: var(--asmae-brass-100);
	border: 1px solid rgba(176, 141, 79, 0.4);
	border-radius: var(--asmae-r-sm);
	font-family: var(--asmae-font-display);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1;
	color: var(--asmae-brass-500);
}

.asmae-stamp--sm .asmae-stamp__cell {
	min-width: 24px;
	height: 24px;
	font-size: 0.85rem;
}

a.asmae-stamp:hover .asmae-stamp__cell,
.asmae-root-cell:hover .asmae-stamp__cell {
	border-color: var(--asmae-brass-500);
}

/* ==================================================================
   3 — Collection card
   ================================================================== */

.asmae-collections {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--asmae-space-3);
}

.asmae-collection {
	position: relative;
	overflow: hidden;
	padding: var(--asmae-space-5) var(--asmae-space-4);
	box-shadow: var(--asmae-e-1);
}

.asmae-collection:hover {
	border-color: transparent;
	box-shadow: var(--asmae-e-card-hover);
}

/*
 * The watermark is the first letter of the collection title, set by the
 * template in a data attribute. Automatic, so a new collection needs no
 * asset and no editorial field.
 */
.asmae-collection::before {
	content: attr(data-letter);
	position: absolute;
	inset-inline-start: -0.12em;
	bottom: -0.35em;
	font-family: var(--asmae-font-display);
	font-size: 10rem;
	line-height: 1;
	color: var(--asmae-ink-050);
	pointer-events: none;
	z-index: 0;
}

.asmae-collection > * {
	position: relative;
	z-index: 1;
}

.asmae-collection__title {
	display: block;
	font-family: var(--asmae-font-display);
	font-size: var(--asmae-size-subtitle);
	font-weight: 700;
	color: var(--asmae-ink-800);
}

.asmae-collection__note {
	display: block;
	margin-top: var(--asmae-space-1);
	font-size: var(--asmae-size-small);
	color: var(--asmae-ink-600);
}

/* ==================================================================
   4 — Featured bar
   A colophon, not a card. A third of its former height, so it
   complements the hero instead of competing with it.
   ================================================================== */

.asmae-featured__card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--asmae-space-3);
	padding: var(--asmae-space-3) var(--asmae-space-4);
	background: #fff;
	border: 1px solid var(--asmae-ink-100);
	border-radius: var(--asmae-r-md);
	box-shadow: var(--asmae-e-card);
}

.asmae-featured__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--asmae-space-1);
	font-size: var(--asmae-size-micro);
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--asmae-brass-600);
	flex: none;
}

.asmae-featured__eyebrow::before {
	content: "ْ";
	font-size: 1.1em;
}

.asmae-featured__name {
	font-family: var(--asmae-font-display);
	font-size: var(--asmae-size-title);
	font-weight: 700;
	line-height: 1.4;
	color: var(--asmae-ink-800);
	flex: none;
}

.asmae-featured__name:hover {
	color: var(--asmae-primary-600);
}

.asmae-featured__gloss {
	margin: 0;
	padding-inline-start: var(--asmae-space-3);
	border-inline-start: 1px solid var(--asmae-ink-100);
	font-size: var(--asmae-size-small);
	color: var(--asmae-ink-600);
	flex: 1 1 200px;
}

.asmae-featured__meta {
	display: flex;
	align-items: center;
	gap: var(--asmae-space-2);
	flex: none;
}

.asmae-featured__link {
	min-height: 36px;
	padding: 0 var(--asmae-space-3);
	border-radius: var(--asmae-r-sm);
	font-size: var(--asmae-size-small);
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	flex: none;
}

/* ==================================================================
   5 — Alphabet grid
   Its identity is exactness: equal cells, equal gaps, no shadow.
   Nothing else in the product sits on a perfect square grid.
   ================================================================== */

/*
 * Fixed 56px squares rather than stretching columns. Cells that grow to
 * fill the row stop being a grid and start being a toolbar; equal squares
 * are what make the alphabet read as a single graphic object.
 */
.asmae-letters {
	display: grid;
	grid-template-columns: repeat(auto-fill, 56px);
	justify-content: start;
	gap: var(--asmae-space-2);
}

.asmae-letter {
	display: grid;
	place-content: center;
	gap: 2px;
	width: 56px;
	height: 56px;
	text-align: center;
	font-family: var(--asmae-font-display);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1;
	color: var(--asmae-ink-800);
}

.asmae-letter .asmae-count {
	font-size: 0.625rem;
	opacity: 0.55;
}

.asmae-letter:hover,
.asmae-letter:focus-visible {
	border-color: transparent;
	box-shadow: var(--asmae-e-card-hover);
	color: var(--asmae-primary-600);
}

.asmae-letter--more {
	grid-column: span 2;
	width: auto;
	padding-inline: var(--asmae-space-3);
	font-family: var(--asmae-font-text);
	font-size: var(--asmae-size-small);
	font-weight: 600;
	color: var(--asmae-primary-600);
	white-space: nowrap;
}

.asmae-letter--empty {
	opacity: 0.35;
	pointer-events: none;
}

/* ==================================================================
   6 — Root explorer grid
   ================================================================== */

.asmae-roots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: var(--asmae-space-3);
}

.asmae-root-cell {
	display: grid;
	justify-items: center;
	gap: var(--asmae-space-2);
	padding: var(--asmae-space-4) var(--asmae-space-3);
	text-align: center;
}

.asmae-root-cell:hover {
	border-color: transparent;
	box-shadow: var(--asmae-e-card-hover);
}

.asmae-root-cell__letters {
	display: inline-flex;
	gap: var(--asmae-space-1);
}

.asmae-root-cell__letters span {
	display: grid;
	place-items: center;
	min-width: 32px;
	height: 32px;
	background: var(--asmae-brass-100);
	border: 1px solid rgba(176, 141, 79, 0.4);
	border-radius: var(--asmae-r-sm);
	font-family: var(--asmae-font-display);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1;
	color: var(--asmae-brass-500);
}

.asmae-root-cell__count {
	font-variant-numeric: tabular-nums;
	font-size: var(--asmae-size-micro);
	color: var(--asmae-ink-400);
}

/* ==================================================================
   Supporting pieces
   ================================================================== */

/* Facts row on the name page */
.asmae-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: var(--asmae-space-2);
	list-style: none;
	margin: 0 0 var(--asmae-space-4);
	padding: 0;
}

.asmae-fact {
	padding: var(--asmae-space-3);
}

.asmae-fact__label {
	display: block;
	font-size: var(--asmae-size-micro);
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--asmae-ink-400);
	margin-bottom: var(--asmae-space-1);
}

.asmae-fact__value {
	font-size: var(--asmae-size-small);
	font-weight: 600;
	color: var(--asmae-ink-800);
}

a.asmae-fact__value:hover {
	color: var(--asmae-primary-600);
}

/* Ruling verdict */
.asmae-card--ruling .asmae-card__title {
	display: flex;
	align-items: center;
	gap: var(--asmae-space-2);
}

.asmae-verdict {
	margin-inline-start: auto;
	padding: 4px var(--asmae-space-3);
	border-radius: 999px;
	background: var(--asmae-ink-050);
	color: var(--asmae-ink-600);
	font-family: var(--asmae-font-text);
	font-size: var(--asmae-size-micro);
	font-weight: 600;
}

.asmae-ruling--recommended .asmae-verdict,
.asmae-ruling--permitted .asmae-verdict {
	background: var(--asmae-green-100);
	color: var(--asmae-green-600);
}

.asmae-ruling--disliked .asmae-verdict {
	background: var(--asmae-warn-100);
	color: var(--asmae-warn-600);
}

.asmae-ruling--forbidden .asmae-verdict {
	background: var(--asmae-danger-100);
	color: var(--asmae-danger-600);
}

/* Quran block — the only place scripture type appears */
.asmae-card--quran {
	background: var(--asmae-green-050);
	border-color: var(--asmae-green-line);
	color: var(--asmae-green-800);
}

.asmae-card--quran .asmae-card__title {
	color: var(--asmae-green-800);
}

.asmae-citation {
	margin: 0;
	font-family: var(--asmae-font-scripture);
	font-size: 1.5rem;
	line-height: 1.7;
	color: var(--asmae-green-800);
}

.asmae-citation__ayah {
	font-family: var(--asmae-font-text);
	font-size: var(--asmae-size-small);
	font-variant-numeric: tabular-nums;
	color: var(--asmae-green-600);
	margin-inline-start: var(--asmae-space-2);
}

.asmae-card--quran .asmae-note {
	color: var(--asmae-green-600);
}

.asmae-note {
	margin: var(--asmae-space-2) 0 0;
	font-size: var(--asmae-size-small);
	color: var(--asmae-ink-600);
}

/* Notices */
.asmae-canonical {
	padding: var(--asmae-space-3) var(--asmae-space-4);
	margin: 0 0 var(--asmae-space-4);
	border: 1px solid rgba(138, 90, 8, 0.24);
	border-radius: var(--asmae-r-md);
	background: var(--asmae-warn-100);
	color: var(--asmae-warn-600);
	font-size: var(--asmae-size-small);
}

.asmae-canonical a {
	color: var(--asmae-warn-600);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.asmae-stub {
	padding: var(--asmae-space-3) var(--asmae-space-4);
	margin: 0 0 var(--asmae-space-4);
	border: 1px dashed var(--asmae-ink-100);
	border-radius: var(--asmae-r-md);
	background: var(--asmae-ink-050);
	color: var(--asmae-ink-400);
	font-size: var(--asmae-size-small);
}

.asmae-sources {
	padding-top: var(--asmae-space-2);
	font-size: var(--asmae-size-micro);
	color: var(--asmae-ink-400);
}

.asmae-sources__label {
	font-weight: 600;
	margin-inline-end: var(--asmae-space-1);
}

/* Pagination — chevrons mirror under RTL */
.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--asmae-space-2);
	justify-content: center;
	margin-top: var(--asmae-space-5);
}

.asmae-page .page-numbers {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 var(--asmae-space-2);
	border: 1px solid var(--asmae-ink-100);
	border-radius: var(--asmae-r-sm);
	background: #fff;
	color: var(--asmae-ink-800);
	font-variant-numeric: tabular-nums;
}

.asmae-page .page-numbers.current {
	background: var(--asmae-ink-800);
	border-color: var(--asmae-ink-800);
	color: #fff;
}

/* Skeleton — matches the real card dimensions exactly */
.asmae-skeleton {
	background: var(--asmae-ink-050);
	border-radius: var(--asmae-r-md);
	min-height: 96px;
	animation: asmae-shimmer 1.4s ease-in-out infinite;
}

@keyframes asmae-shimmer {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.55; }
}

/* ==================================================================
   Favourite button
   Lives outside the card link, which is stretched over the card with a
   pseudo-element — a <button> inside an <a> is invalid markup and eats
   keyboard focus.
   ================================================================== */

.asmae-item {
	position: relative;
}

.asmae-item__link {
	display: block;
}

.asmae-item__link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.asmae-fav {
	position: absolute;
	inset-inline-end: var(--asmae-space-3);
	top: var(--asmae-space-3);
	z-index: 1;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #e3a9c6;
	cursor: pointer;
	transition: color var(--asmae-fast) var(--asmae-ease),
	            background-color var(--asmae-fast) var(--asmae-ease);
}

.asmae-fav svg {
	width: 19px;
	height: 19px;
}

.asmae-fav:hover {
	background: var(--asmae-ink-050);
	color: #f08ab8;
}

.asmae-fav.is-on {
	color: #ec6ca8;
}

.asmae-fav.is-on svg {
	fill: currentColor;
}

/* The card leaves room so a long name never runs under the heart. */
.asmae-item__name {
	padding-inline-end: 26px;
}

/* ==================================================================
   Paired panels — meaning beside Quran
   ================================================================== */

.asmae-pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--asmae-space-3);
	align-items: start;
	max-width: var(--asmae-max);
	margin: 0 auto;
	padding-inline: var(--asmae-space-3);
}

/*
 * Only the margin and the width cap are neutralised. Zeroing the inline
 * padding here was what pushed the green band's content against its own
 * edges.
 */
.asmae-pair > .asmae-block {
	margin: 0;
	max-width: none;
}

.asmae-pair > .asmae-panel-block {
	padding-inline: var(--asmae-space-4);
}

.asmae-pair > .asmae-band--green {
	padding: var(--asmae-space-4) var(--asmae-space-4) var(--asmae-space-3);
}

/* A chip strip inside a pair becomes a card in its own right. */
.asmae-pair > .asmae-panel-block {
	background: #fff;
	border-radius: var(--asmae-r-lg);
	box-shadow: var(--asmae-e-card);
	padding: var(--asmae-space-4);
	height: 100%;
}

.asmae-pair > .asmae-band--green {
	height: 100%;
}

/* ==================================================================
   Assurance strip
   ================================================================== */

.asmae-assure {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--asmae-space-3);
	background: #fff;
	border-radius: var(--asmae-r-lg);
	box-shadow: var(--asmae-e-card);
	padding: var(--asmae-space-4);
}

.asmae-assure__item {
	display: flex;
	align-items: center;
	gap: var(--asmae-space-3);
	padding-inline: var(--asmae-space-2);
	border-inline-start: 1px solid var(--asmae-ink-100);
}

.asmae-assure__item:first-child {
	border-inline-start: 0;
}

.asmae-assure__icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	flex: none;
	border-radius: var(--asmae-r-md);
	background: var(--asmae-ink-050);
	color: var(--asmae-primary-600);
}

.asmae-assure__icon svg {
	width: 20px;
	height: 20px;
}

.asmae-assure__text {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.asmae-assure__text strong {
	font-size: var(--asmae-size-small);
	font-weight: 700;
	color: var(--asmae-ink-800);
}

.asmae-assure__text span {
	font-size: var(--asmae-size-micro);
	line-height: 1.6;
	color: var(--asmae-ink-400);
}

/* ==================================================================
   Name Finder
   A discovery instrument, not a sidebar. One large white card, soft
   borders, no heavy shadow, everything moving in 150-200ms.
   ================================================================== */

.asmae-finder__card {
	background: #fff;
	border: 1px solid #eceef5;
	border-radius: 20px;
	padding: var(--asmae-space-5) var(--asmae-space-5) var(--asmae-space-4);
}

.asmae-finder__head {
	text-align: center;
	margin-bottom: var(--asmae-space-4);
}

.asmae-finder__title {
	font-family: var(--asmae-font-display);
	font-size: var(--asmae-size-title);
	font-weight: 700;
	color: var(--asmae-ink-800);
	margin: 0 0 4px;
}

.asmae-finder__sub {
	margin: 0;
	font-size: var(--asmae-size-small);
	color: var(--asmae-ink-400);
}

/* --- Search ---------------------------------------------------------- */

.asmae-finder__search {
	max-width: 520px;
	margin: 0 auto var(--asmae-space-4);
}

.asmae-finder__input {
	width: 100%;
	min-height: 52px;
	padding: 0 var(--asmae-space-4);
	border: 1px solid #eceef5;
	border-radius: var(--asmae-r-md);
	background: var(--asmae-ink-050);
	font-family: inherit;
	font-size: var(--asmae-size-body);
	color: var(--asmae-ink-800);
	transition: background-color 180ms var(--asmae-ease),
	            border-color 180ms var(--asmae-ease),
	            box-shadow 180ms var(--asmae-ease);
}

.asmae-finder__input::placeholder {
	color: var(--asmae-ink-400);
}

/* The one place a gradient is allowed: a soft focus halo. */
.asmae-finder__input:focus {
	outline: none;
	background: #fff;
	border-color: var(--asmae-primary-600);
	box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}

/* --- Filter rows ------------------------------------------------------ */

.asmae-finder__filters {
	display: grid;
	gap: var(--asmae-space-3);
}

.asmae-frow {
	display: grid;
	grid-template-columns: 88px 1fr;
	align-items: start;
	gap: var(--asmae-space-3);
	padding-bottom: var(--asmae-space-3);
	border-bottom: 1px solid #f3f5fa;
}

.asmae-frow:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.asmae-frow__label {
	font-size: var(--asmae-size-small);
	font-weight: 600;
	color: var(--asmae-ink-400);
	padding-top: 7px;
}

.asmae-frow__opts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--asmae-space-2);
}

.asmae-frow__opts--letters {
	gap: 6px;
}

.asmae-fchip {
	min-height: 34px;
	padding: 0 var(--asmae-space-3);
	border: 1px solid #eceef5;
	border-radius: 999px;
	background: #fff;
	font-family: inherit;
	font-size: var(--asmae-size-small);
	color: var(--asmae-ink-600);
	cursor: pointer;
	transition: background-color 150ms var(--asmae-ease),
	            border-color 150ms var(--asmae-ease),
	            color 150ms var(--asmae-ease);
}

.asmae-fchip:hover {
	border-color: var(--asmae-primary-600);
	color: var(--asmae-primary-600);
}

.asmae-fchip.is-on {
	background: var(--asmae-primary-600);
	border-color: var(--asmae-primary-600);
	color: #fff;
}

.asmae-fchip--letter {
	min-width: 38px;
	padding: 0 8px;
	text-align: center;
	font-size: var(--asmae-size-body);
}

.asmae-frow--inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--asmae-space-4);
}

.asmae-ftoggle,
.asmae-fsort {
	display: inline-flex;
	align-items: center;
	gap: var(--asmae-space-2);
	font-size: var(--asmae-size-small);
	color: var(--asmae-ink-600);
	cursor: pointer;
}

.asmae-fsort select {
	min-height: 34px;
	padding: 0 var(--asmae-space-2);
	border: 1px solid #eceef5;
	border-radius: var(--asmae-r-sm);
	background: #fff;
	font-family: inherit;
	font-size: var(--asmae-size-small);
	color: var(--asmae-ink-800);
}

/* --- Selected filters and count --------------------------------------- */

.asmae-finder__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--asmae-space-2);
	margin: var(--asmae-space-4) 0 var(--asmae-space-3);
	padding-top: var(--asmae-space-3);
	border-top: 1px solid #f3f5fa;
}

.asmae-finder__count {
	margin: 0;
	font-size: var(--asmae-size-body);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--asmae-ink-800);
	flex: none;
}

.asmae-finder__active {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	flex: 1 1 auto;
}

.asmae-achip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 30px;
	padding: 0 6px 0 12px;
	border: 0;
	border-radius: 999px;
	background: var(--asmae-primary-100);
	color: var(--asmae-primary-700);
	font-family: inherit;
	font-size: var(--asmae-size-micro);
	font-weight: 600;
	cursor: pointer;
	transition: background-color 150ms var(--asmae-ease);
}

.asmae-achip:hover {
	background: #ded8fc;
}

.asmae-achip i {
	font-style: normal;
	font-size: 15px;
	line-height: 1;
	opacity: 0.7;
}

.asmae-finder__clear {
	flex: none;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: var(--asmae-size-small);
	font-weight: 600;
	color: var(--asmae-ink-400);
	cursor: pointer;
	transition: color 150ms var(--asmae-ease);
}

.asmae-finder__clear:hover {
	color: var(--asmae-primary-600);
}

/* --- Results ----------------------------------------------------------- */

.asmae-finder__results {
	min-height: 120px;
	transition: opacity 180ms var(--asmae-ease);
}

.asmae-finder__results.is-loading {
	opacity: 0.45;
}

.asmae-finder__empty {
	padding: var(--asmae-space-5) var(--asmae-space-4);
	text-align: center;
	color: var(--asmae-ink-600);
}

.asmae-finder__empty p {
	margin: 0 0 var(--asmae-space-2);
}

.asmae-finder__hint {
	color: var(--asmae-ink-400);
	font-size: var(--asmae-size-small);
}

.asmae-finder__more {
	text-align: center;
}

@media (max-width: 640px) {

	.asmae-finder__card {
		padding: var(--asmae-space-4) var(--asmae-space-3);
		border-radius: var(--asmae-r-lg);
	}

	/*
	 * The label moves above its options: an 88px column next to wrapping
	 * chips leaves under 200px of usable width on a phone.
	 */
	.asmae-frow {
		grid-template-columns: 1fr;
		gap: var(--asmae-space-2);
	}

	.asmae-frow__label {
		padding-top: 0;
	}

	.asmae-finder__bar {
		flex-direction: column;
		align-items: stretch;
	}

	.asmae-finder__clear {
		text-align: start;
	}
}

/* ==================================================================
   Name suggestions
   A lookup, not a search: the panel offers names, and choosing one goes
   straight to its page.
   ================================================================== */

.asmae-suggest {
	position: relative;
	max-width: 560px;
	margin: 0 auto;
}

.asmae-suggest--slim {
	margin: 0 0 var(--asmae-space-5);
}

.asmae-suggest__list {
	position: absolute;
	z-index: 30;
	inset-inline: 0;
	top: calc(100% + 8px);
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid #eceef5;
	border-radius: var(--asmae-r-md);
	box-shadow: 0 12px 32px rgba(18, 19, 31, 0.12);
	max-height: 380px;
	overflow-y: auto;
	text-align: right;
}

.asmae-suggest__item {
	display: grid;
	grid-template-columns: auto auto 1fr;
	align-items: baseline;
	gap: var(--asmae-space-2);
	padding: 10px var(--asmae-space-3);
	border-radius: var(--asmae-r-sm);
	cursor: pointer;
	transition: background-color 150ms var(--asmae-ease);
}

.asmae-suggest__item.is-active {
	background: var(--asmae-primary-100);
}

.asmae-suggest__name {
	font-size: var(--asmae-size-subtitle);
	font-weight: 600;
	color: var(--asmae-ink-800);
}

.asmae-suggest__latin {
	font-size: var(--asmae-size-micro);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--asmae-ink-400);
}

.asmae-suggest__gloss {
	font-size: var(--asmae-size-small);
	color: var(--asmae-ink-400);
	text-align: end;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 640px) {

	.asmae-suggest__gloss {
		display: none;
	}
}

/* ==================================================================
   Article blocks — [asmae_list] and [asmae_cta]
   A table of thirty names is a dead end. These render the same list as
   linked cards, and close it with one clear route into the database.
   ================================================================== */

.asmae-list {
	margin: 32px 0;
	direction: rtl;
	text-align: right;
}

.asmae-list__title {
	margin: 0 0 16px;
	font-family: var(--asmae-font-display, inherit);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--asmae-ink-800, #1b1d2e);
}

.asmae-list__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.asmae-list--1 .asmae-list__grid {
	grid-template-columns: 1fr;
}

.asmae-list--3 .asmae-list__grid {
	grid-template-columns: repeat(3, 1fr);
}

.asmae-list__item {
	display: block;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid #eceef5;
	border-radius: 14px;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(27, 29, 46, 0.03), 0 4px 12px rgba(27, 29, 46, 0.04);
	transition: box-shadow 160ms cubic-bezier(0.2, 0, 0.1, 1),
	            border-color 160ms cubic-bezier(0.2, 0, 0.1, 1);
}

.asmae-list__item:hover,
.asmae-list__item:focus-visible {
	border-color: transparent;
	box-shadow: 0 2px 6px rgba(27, 29, 46, 0.05), 0 14px 30px rgba(27, 29, 46, 0.10);
}

/* A name with no record yet: same shape, no link, visibly quieter. */
.asmae-list__item--plain {
	background: #fafafc;
	box-shadow: none;
	cursor: default;
}

.asmae-list__name {
	display: block;
	font-family: var(--asmae-font-display, inherit);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.6;
	color: var(--asmae-ink-800, #1b1d2e);
}

.asmae-list__latin {
	display: block;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--asmae-ink-400, #767c94);
	text-align: right;
}

.asmae-list__gloss {
	display: block;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #f1f3f8;
	font-size: 0.9375rem;
	line-height: 1.75;
	color: var(--asmae-ink-600, #454a63);
}

/* ------------------------------------------------------------- CTA */

.asmae-cta-block {
	margin: 40px 0;
	padding: 34px 30px;
	background: linear-gradient(135deg, #7c5cff 0%, #9b84ff 100%);
	border-radius: 20px;
	text-align: center;
	color: #fff;
}

.asmae-cta-block__title {
	margin: 0 0 8px;
	font-family: var(--asmae-font-display, inherit);
	font-size: clamp(1.3rem, 3vw, 1.7rem);
	font-weight: 800;
	line-height: 1.6;
	color: #fff;
}

.asmae-cta-block__text {
	margin: 0 auto 22px;
	max-width: 52ch;
	font-size: 1rem;
	line-height: 1.9;
	color: rgba(255, 255, 255, 0.9);
}

.asmae-cta-block__link {
	display: inline-block;
	padding: 14px 38px;
	background: #fff;
	border-radius: 999px;
	color: #5a3ce0;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
	transition: transform 160ms cubic-bezier(0.2, 0, 0.1, 1);
}

.asmae-cta-block__link:hover,
.asmae-cta-block__link:focus-visible {
	color: #4a2fc8;
	transform: scale(1.03);
}

@media (max-width: 640px) {

	.asmae-list__grid,
	.asmae-list--3 .asmae-list__grid {
		grid-template-columns: 1fr;
	}

	.asmae-cta-block {
		padding: 26px 20px;
	}
}

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

	.asmae-list__item,
	.asmae-cta-block__link {
		transition: none;
	}

	.asmae-cta-block__link:hover {
		transform: none;
	}
}
