/* Reusable components, styled only through tokens. Shape language from the icon mark:
   square cells with small radii, and one round "lobe" corner (the inline-end/block-end one). */
:root { --lobe: 22px; --cell-r: 5px; --depth: 5px; --dir: 1; }
/* Depth: a solid edge (no blur) toward the reading end and down, like the guide's 3D sign blocks. */
[dir="rtl"] { --dir: -1; }
[dir="ltr"] { --dir: 1; }

/* ── Buttons: the mark's lobe corner; the icon sits in its own square cell ── */
.am-btn {
  --bg: var(--surface); --fg: var(--navy); --bd: var(--navy); --cell-bg: var(--navy); --cell-fg: var(--lemon);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3);
  min-height: 52px; padding-block: 0; padding-inline: var(--s-5);
  border: 2px solid var(--bd); border-radius: var(--cell-r); border-end-end-radius: var(--lobe);
  background: var(--bg); color: var(--fg);
  font: 700 var(--fs-sm)/1.2 var(--font-head); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.am-btn:has(.am-btn__cell) { padding-inline-end: 7px; }
.am-btn .am-icon { width: 20px; height: 20px; }
.am-btn__cell {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: var(--cell-r); border-end-end-radius: 16px; background: var(--cell-bg); color: var(--cell-fg);
  transition: translate var(--dur) var(--ease);
}
.am-btn:hover .am-btn__cell { translate: 4px 0; }
[dir="rtl"] .am-btn:hover .am-btn__cell { translate: -4px 0; }
.am-btn:hover { --bg: var(--second-soft); }
.am-btn--primary { --bg: var(--action); --fg: var(--on-action); --bd: var(--action); }
.am-btn--primary:hover { --bg: var(--action-strong); --bd: var(--action-strong); }
.am-btn--dark { --bg: var(--navy); --fg: var(--on-primary); --bd: var(--navy); --cell-bg: var(--lemon); --cell-fg: var(--navy); }
.am-btn--dark:hover { --bg: var(--primary-soft); --bd: var(--primary-soft); }
.am-btn--ghost { --bg: var(--primary-soft); --fg: var(--on-primary); --bd: var(--primary-soft); --cell-bg: var(--on-primary); --cell-fg: var(--navy); } /* on navy: a filled cell, so its edge shows */
.am-btn--ghost:hover { --bg: #4A6273; --bd: #4A6273; }
.am-btn--sm { min-height: 42px; padding-inline: var(--s-4); --lobe: 18px; }
.am-btn--sm .am-btn__cell { width: 28px; height: 28px; }
.am-btn--icon { width: 52px; padding: 0; }
.am-btn--sm.am-btn--icon { width: 42px; padding: 0; }
.am-btn--block { width: 100%; justify-content: space-between; }
.am-btn:disabled, .am-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.am-btn.is-loading { color: transparent; pointer-events: none; }
.am-btn.is-loading > * { visibility: hidden; }
.am-btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px;
  border: 2.5px solid var(--fg); border-inline-end-color: transparent; border-radius: 50%;
  animation: am-spin .7s linear infinite;
}

/* Text link: the arrow in a small lemon cell */
.am-link { display: inline-flex; align-items: center; gap: var(--s-2); font: 700 var(--fs-sm)/1.3 var(--font-head); color: var(--primary); text-decoration: none; }
.am-link .am-icon { width: 24px; height: 24px; padding: 4px; border-radius: 4px; border-end-end-radius: 10px; background: var(--lemon); color: var(--navy); transition: translate var(--dur) var(--ease); }
.am-link:hover span { text-decoration: underline; text-underline-offset: .3em; }
.am-on-dark .am-link { color: var(--on-primary); }

/* ── Badges (spec chips) and tags ────────────────────────────────────── */
.am-badge { display: inline-flex; align-items: center; gap: var(--s-1); padding: 3px var(--s-2); border-radius: 3px; border-end-end-radius: 9px; font: 700 var(--fs-xs)/1.3 var(--font-head); background: var(--lemon); color: var(--navy); }
.am-badge--sky { background: var(--sky); }
.am-badge--navy { background: var(--navy); color: var(--on-primary); }
.am-badge--line { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.am-tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.am-tag {
  display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3);
  border-radius: var(--cell-r); border-end-end-radius: 16px; background: var(--second-soft); color: var(--navy);
  font-size: var(--fs-sm); text-decoration: none; transition: background-color var(--dur) var(--ease);
}
.am-tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; opacity: .35; }
a.am-tag:hover { background: var(--sky); }
.am-tag[aria-pressed="true"], .am-tag[aria-current] { background: var(--navy); color: var(--on-primary); }
.am-tag[aria-pressed="true"]::before, .am-tag[aria-current]::before { background: var(--lemon); opacity: 1; border-end-end-radius: 50%; }

/* ── Floor sign (guide p.61): numeral, glyph or arrow, label in both languages ── */
.am-sign {
  --bg: var(--navy); --fg: var(--on-primary); --code: var(--sky);
  display: grid; grid-template: "code mark" 1fr "label label" auto / 1fr auto; gap: var(--s-4);
  min-width: 0; min-height: 200px; padding: var(--s-5); background: var(--bg); color: var(--fg);
}
.am-sign--lemon { --bg: var(--lemon); --fg: var(--navy); --code: var(--navy); }
.am-sign--sky   { --bg: var(--sky);   --fg: var(--navy); --code: var(--navy); }
.am-sign--grey  { --bg: var(--grey);  --fg: var(--navy); --code: var(--navy); --glyph: var(--lemon); } /* lemon on grey is 2.8: glyph only */
.am-sign--paper { --bg: var(--paper); --fg: var(--navy); --code: var(--navy); }
.am-sign__code { grid-area: code; font: 700 var(--fs-num)/.85 var(--font-latin); letter-spacing: -.045em; color: var(--code); }
.am-sign__glyph { grid-area: mark; color: var(--glyph, currentColor); width: clamp(40px, 4.4vw, 60px); height: auto; aspect-ratio: 1; }
.am-sign__arrow { grid-area: mark; width: clamp(48px, 5.5vw, 76px); height: auto; aspect-ratio: 1; stroke-width: 2.4; color: var(--glyph, var(--code)); }
.am-sign__label { grid-area: label; align-self: end; display: flex; align-items: end; gap: var(--s-3); font: 700 var(--fs-md)/1.25 var(--font-head); }
.am-sign__label > span { display: grid; gap: 2px; }
.am-sign__alt { font-size: var(--fs-xs); font-weight: 400; opacity: .78; }
.am-sign__alt:lang(en) { font-family: var(--font-latin); }
.am-sign__alt:lang(ar) { font-family: var(--font-arabic); }
.am-sign__go { grid-area: mark; width: clamp(40px, 4.4vw, 60px); height: auto; aspect-ratio: 1; stroke-width: 2.4; color: var(--code); opacity: 0; translate: calc(-10px * var(--dir)) 0; transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease); }
a.am-sign .am-sign__glyph { transition: opacity var(--dur) var(--ease); }
a.am-sign:is(:hover, :focus-visible) .am-sign__glyph { opacity: 0; }
a.am-sign:is(:hover, :focus-visible) .am-sign__go { opacity: 1; translate: 0 0; }
.am-sign__mini { width: 30px; height: auto; aspect-ratio: 1; color: var(--glyph, currentColor); }
.am-sign--sm { min-height: 0; padding: var(--s-4); gap: var(--s-3); }
.am-sign--sm .am-sign__code { font-size: var(--fs-xl); }
.am-sign--sm .am-sign__label { font-size: var(--fs-sm); }
.am-sign--sm .am-sign__glyph, .am-sign--sm .am-sign__arrow { width: 30px; }
/* A wall of signs: tiles touch, like the guide's panels */
.am-signwall { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ── Form fields ─────────────────────────────────────────────────────── */
.am-fields { display: grid; gap: var(--s-5) var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.am-field { display: grid; gap: var(--s-2); align-content: start; min-width: 0; }
.am-field--wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .am-fields { grid-template-columns: minmax(0, 1fr); } }
.am-field__label { display: flex; align-items: center; gap: var(--s-2); font: 700 var(--fs-sm)/1.3 var(--font-head); }
.am-field__mark { padding: 1px 6px; border-radius: 3px; border-end-end-radius: 7px; font: 400 11px/1.5 var(--font-body); color: var(--ink-soft); background: var(--page); }
.am-field__mark.is-req { background: var(--lemon); color: var(--navy); font-weight: 600; }
.am-field__hint { font-size: var(--fs-xs); color: var(--ink-soft); }
.am-field__error { display: flex; align-items: center; gap: var(--s-1); font-size: var(--fs-xs); font-weight: 600; color: var(--danger); }
.am-field__error[hidden] { display: none; }
.am-field__error .am-icon { width: 16px; height: 16px; }
.am-input {
  width: 100%; min-height: 52px; padding: var(--s-3) var(--s-4);
  border: 1.5px solid var(--ink-faint); border-radius: var(--cell-r); background: var(--surface); color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-radius var(--dur) var(--ease);
}
.am-input::placeholder { color: var(--ink-soft); opacity: .8; }
.am-input:hover { border-color: var(--navy); }
/* Focus: navy edge, lemon ring, and the field takes the mark's lobe */
.am-input:focus { outline: none; border-color: var(--navy); border-end-end-radius: var(--lobe); box-shadow: 0 0 0 3px var(--lemon); }
.am-input:disabled { background: var(--page); color: var(--ink-soft); cursor: not-allowed; }
.am-input[dir="ltr"] { text-align: start; }
[dir="rtl"] .am-input[dir="ltr"] { text-align: end; }
.am-input--area { min-height: 132px; resize: vertical; line-height: var(--lh-body); }
.has-error .am-input, .has-error .am-file { border-color: var(--danger); background: #FFF8F7; }
.has-error .am-input:focus { box-shadow: 0 0 0 3px rgb(180 35 24 / .25); }
.am-select { position: relative; display: block; }
.am-select select { appearance: none; padding-inline-end: var(--s-8); cursor: pointer; }
.am-select .am-icon { position: absolute; inset-inline-end: var(--s-3); inset-block: 0; margin-block: auto; width: 28px; height: 28px; padding: 4px; border-radius: 4px; background: var(--page); pointer-events: none; }
.am-file {
  position: relative; display: flex; align-items: center; justify-content: center; gap: var(--s-4); min-height: 104px; padding: var(--s-4);
  border: 1.5px dashed var(--ink-faint); border-radius: var(--cell-r); border-end-end-radius: var(--lobe);
  background: var(--paper); color: var(--ink-soft); cursor: pointer; text-align: center;
}
.am-file__cell { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--cell-r); border-end-end-radius: 18px; background: var(--navy); color: var(--lemon); }
.am-file:hover, .am-file:focus-within { border-color: var(--navy); color: var(--navy); }
.am-file:focus-within { box-shadow: 0 0 0 3px var(--lemon); }
.am-file.is-set { border-style: solid; color: var(--navy); font-weight: 600; background: var(--second-soft); }
.am-file__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
/* Radios and checkboxes: cells; checked = navy with a lemon dot (radio) or tick (checkbox) */
.am-check { display: inline-flex; align-items: center; gap: var(--s-3); min-height: 36px; cursor: pointer; }
.am-check input {
  appearance: none; width: 24px; height: 24px; margin: 0; flex: none; cursor: pointer;
  border: 2px solid var(--navy); border-radius: var(--cell-r); background: var(--surface) center / 16px no-repeat;
  transition: background-color var(--dur) var(--ease), border-radius var(--dur) var(--ease);
}
.am-check input:checked { background-color: var(--navy); }
.am-check input[type="radio"] { border-end-end-radius: 12px; } /* radios carry the lobe, checkboxes stay square */
.am-check input[type="radio"]:checked { background-image: radial-gradient(circle, var(--lemon) 0 4px, transparent 4.5px); background-size: auto; }
.am-check input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E4FF2B' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.am-check input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.am-choices { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.am-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); margin-block-start: var(--s-6); padding-block-start: var(--s-5); border-block-start: 1px solid var(--line); }
.am-form-foot p { font-size: var(--fs-xs); color: var(--ink-soft); }
.am-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } /* honeypot: off-screen in both directions */

/* ── Alerts and toasts: the icon in a coloured cell ─────── */
.am-alert { --c: var(--navy); --soft: var(--second-soft); display: flex; align-items: center; gap: var(--s-4); padding: var(--s-2); padding-inline-end: var(--s-4); border-radius: var(--cell-r); border-end-end-radius: var(--lobe); font-size: var(--fs-sm); background: var(--soft); color: var(--c); }
.am-alert__cell { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 4px; border-end-end-radius: 16px; background: var(--c); color: var(--soft); }
.am-alert p { flex: 1; padding-block: var(--s-2); }
.am-alert--info .am-alert__cell { color: var(--lemon); }
.am-alert--success { --c: #155A38; --soft: #E3F1E9; }
.am-alert--warning { --c: #7A4100; --soft: #FBEEDC; }
.am-alert--danger  { --c: #8E1B12; --soft: #F9E3E1; }
.am-alert__close { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 4px; background: none; color: inherit; cursor: pointer; }
.am-alert__close:hover { background: rgb(0 0 0 / .07); }
.am-toasts { position: fixed; inset-block-end: var(--s-8); inset-inline: var(--s-4); display: grid; justify-items: center; gap: var(--s-2); z-index: 1000; pointer-events: none; }
.am-toast {
  display: flex; align-items: stretch; max-width: 440px; overflow: hidden;
  border-radius: var(--cell-r); border-end-end-radius: var(--lobe); background: var(--navy); color: var(--on-primary); box-shadow: var(--shadow); font-size: var(--fs-sm);
}
.am-toast__cell { display: grid; place-items: center; width: 52px; flex: none; background: var(--lemon); color: var(--navy); }
.am-toast__text { padding: var(--s-3) var(--s-5); }

/* ── Tabs: numbered like floor signs ─────────────────────────────────── */
.am-tabs { min-width: 0; }
.am-tabs__list { max-width: 100%; display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; border-block-end: 2px solid var(--navy); }
.am-tabs__tab {
  display: inline-flex; align-items: baseline; gap: var(--s-2); flex: none; min-height: 48px; padding: var(--s-3) var(--s-4);
  border: 0; border-start-start-radius: var(--cell-r); border-start-end-radius: var(--cell-r); background: var(--page);
  font: 700 var(--fs-sm)/1 var(--font-head); color: var(--ink-soft); cursor: pointer;
}
.am-tabs__n { font: 700 var(--fs-xs)/1 var(--font-latin); color: var(--second-strong); }
.am-tabs__tab:hover { color: var(--navy); background: var(--second-soft); }
.am-tabs__tab[aria-selected="true"] { background: var(--navy); color: var(--on-primary); border-start-end-radius: 16px; }
.am-tabs__tab[aria-selected="true"] .am-tabs__n { color: var(--lemon); }
.am-tabs__panel { padding-block: var(--s-5) 0; }
.am-tabs__panel[hidden] { display: none; }

/* ── Accordion: numbered rows; the plus cell turns into a cross ──────── */
.am-acc { border-block-start: 2px solid var(--navy); }
.am-acc__item { border-block-end: 1px solid var(--line); transition: background-color var(--dur) var(--ease); }
.am-acc__item[open] { background: var(--paper); }
.am-acc__q { display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-3); font: 700 var(--fs-md)/var(--lh-head) var(--font-head); cursor: pointer; list-style: none; }
.am-acc__q::-webkit-details-marker { display: none; }
.am-acc__n { font: 700 var(--fs-lg)/1 var(--font-latin); color: var(--second-strong); }
.am-acc__cell { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 4px; border-end-end-radius: 14px; background: var(--lemon); color: var(--navy); transition: background-color var(--dur) var(--ease); }
.am-acc__cell .am-icon { transition: transform var(--dur) var(--ease); }
.am-acc__item[open] .am-acc__cell { background: var(--navy); color: var(--lemon); }
.am-acc__item[open] .am-acc__cell .am-icon { transform: rotate(45deg); }
.am-acc__a { padding-block-end: var(--s-5); padding-inline: calc(var(--s-3) + 2.4rem + var(--s-4)) var(--s-3); max-width: 80ch; color: var(--ink-soft); }

/* ── Pagination: page cells; the current one is lemon with the lobe ──── */
.am-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-3); }
.am-pager__list { display: flex; gap: var(--s-1); }
.am-pager__n { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--cell-r); text-decoration: none; font-weight: 700; background: var(--surface); border: 1.5px solid var(--line); }
a.am-pager__n:hover { border-color: var(--navy); }
.am-pager__n.is-current { background: var(--lemon); color: var(--navy); border-color: transparent; border-end-end-radius: 20px; }
.am-pager__step { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; font: 700 var(--fs-sm)/1 var(--font-head); }
.am-pager__step.is-next { flex-direction: row-reverse; }
.am-pager__cell { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--cell-r); background: var(--navy); color: var(--lemon); }
.am-pager__step.is-off { opacity: .35; }
.am-pager__step.is-off .am-pager__cell { background: var(--line); color: var(--navy); }
@media (max-width: 520px) { .am-pager__word { display: none; } .am-pager { gap: var(--s-2); } .am-pager__n, .am-pager__cell { width: 40px; height: 40px; } }

/* ── Breadcrumb: small square cells as separators ────────────────────── */
.am-crumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); font-size: var(--fs-sm); }
.am-crumbs li { display: inline-flex; align-items: center; gap: var(--s-3); }
.am-crumbs a { color: inherit; opacity: .8; text-decoration: none; }
.am-crumbs a:hover { opacity: 1; text-decoration: underline; }
.am-crumbs__sep { width: 6px; height: 6px; border-radius: 1px; border-end-end-radius: 50%; background: currentColor; opacity: .45; }
.am-crumbs [aria-current] { padding: 2px 10px; border-radius: 4px; border-end-end-radius: 10px; background: var(--paper); color: var(--navy); font-weight: 600; } /* marks where you are: flat, not pressable */

/* ── Page banner (utility pages only): a bilingual sign beside a pattern panel ── */
.am-banner { position: relative; display: grid; grid-template-columns: 1fr min(36%, 420px); overflow: hidden; background: var(--navy); color: var(--on-primary); }
.am-banner__in { display: grid; align-content: center; gap: var(--s-2); padding-block: var(--s-8); margin: 0; max-width: none; padding-inline-start: max(var(--gutter), (100vw - var(--wrap)) / 2); padding-inline-end: var(--s-7); }
.am-banner__text { margin-block-start: var(--s-4); max-width: 56ch; color: var(--on-primary-soft); font-size: var(--fs-sm); }
.am-banner .am-crumbs { color: var(--on-primary-soft); margin-block-end: var(--s-4); }
.am-banner__panel { background: var(--pattern-checker-navy) center / cover; -webkit-mask-image: linear-gradient(to left, #000 35%, transparent); mask-image: linear-gradient(to left, #000 35%, transparent); } /* dissolves like the facade pattern (p.71) */
[dir="rtl"] .am-banner__panel { -webkit-mask-image: linear-gradient(to right, #000 35%, transparent); mask-image: linear-gradient(to right, #000 35%, transparent); }
@media (max-width: 720px) {
  .am-banner { grid-template-columns: 1fr; }
  .am-banner__in { padding-inline: var(--gutter); padding-block-end: var(--s-6); }
  .am-banner__panel, [dir="rtl"] .am-banner__panel { height: 72px; -webkit-mask-image: linear-gradient(to top, #000 30%, transparent); mask-image: linear-gradient(to top, #000 30%, transparent); }
}

/* ── Empty / error states: a small floor-sign scene ──────────────────── */
.am-state { display: grid; justify-items: center; gap: var(--s-3); padding: var(--s-7) var(--s-5); text-align: center; border-radius: var(--cell-r); border-end-end-radius: 48px; background: var(--surface); }
.am-state__scene { display: grid; grid-template-columns: 128px 128px; margin-block-end: var(--s-3); text-align: start; }
.am-state__shelf { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 6px; padding: 14px 12px 0; background: var(--paper); border-block-end: 8px solid var(--navy); }
.am-state__shelf i { height: 46px; border: 2px dashed var(--ink-faint); border-block-end: 0; border-radius: 4px 4px 0 0; }
.am-state__shelf i:nth-child(2) { height: 66px; border-start-end-radius: 14px; }
.am-state__tape { background: repeating-linear-gradient(-45deg, var(--lemon) 0 14px, var(--navy) 14px 28px); }
.am-state__title { font-size: var(--fs-lg); }
.am-state p { max-width: 44ch; color: var(--ink-soft); }
.am-state .am-btn { margin-block-start: var(--s-3); }

/* ── Loading: skeleton + the mark's four cells lighting in turn ──────── */
.am-skel { display: grid; gap: var(--s-3); }
.am-skel__box { height: 160px; border-radius: var(--cell-r); border-end-end-radius: 40px; background: var(--line); }
.am-skel__line { height: 14px; border-radius: 3px; background: var(--line); }
.am-skel__line--short { width: 60%; }
.am-skel > * { animation: am-pulse 1.4s ease-in-out infinite; }
.am-loader { display: inline-flex; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); color: var(--ink-soft); }
.am-loader__cells { display: grid; grid-template-columns: 12px 12px; gap: 3px; }
.am-loader__cells i { width: 12px; height: 12px; border-radius: 3px; background: var(--line); animation: am-cell 1.2s steps(1) infinite; }
.am-loader__cells i:nth-child(2) { animation-delay: .3s; }
.am-loader__cells i:nth-child(4) { animation-delay: .6s; border-end-end-radius: 50%; }
.am-loader__cells i:nth-child(3) { animation-delay: .9s; }

/* ── Logos ───────────────────────────────────────────────────────────── */
.am-logo { display: block; height: 44px; width: auto; }

/* ══ Frame: the building directory ═════════════════════════════════════ */
html.am-lock { overflow: hidden; }

/* Cell link: icon in a cell + text (phone, email, WhatsApp, hours), on navy */
.am-cellink { display: inline-flex; align-items: center; gap: var(--s-3); margin: 0; color: inherit; text-decoration: none; font-size: var(--fs-sm); }
.am-cellink__cell { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: var(--cell-r); border-end-end-radius: 16px; background: rgb(255 255 255 / .1); color: var(--lemon); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
a.am-cellink:hover .am-cellink__cell { background: var(--lemon); color: var(--navy); }
.am-cellink .am-icon { width: 20px; height: 20px; }

/* Header: the entrance sign */
.am-hdr { position: sticky; inset-block-start: 0; z-index: 50; background: var(--navy); }
.am-hdr__in { display: flex; align-items: center; gap: var(--s-5); min-height: 76px; transition: min-height var(--dur) var(--ease); }
.am-hdr__logo { flex: none; }
.am-hdr__logo img { height: 40px; width: auto; transition: height var(--dur) var(--ease); }
.am-hdr__nav { flex: 1; min-width: 0; }
.am-hdr__links { display: flex; justify-content: center; gap: var(--s-1); }
.am-hdr__links a { position: relative; display: block; padding: var(--s-3); border-radius: var(--cell-r); font: 700 var(--fs-sm)/1.2 var(--font-head); color: var(--on-primary-soft); text-decoration: none; white-space: nowrap; }
.am-hdr__links a:hover { color: var(--on-primary); background: rgb(255 255 255 / .08); }
.am-hdr__links a[aria-current] { display: inline-flex; align-items: center; gap: var(--s-2); padding-inline-start: 6px; background: var(--paper); color: var(--navy); border-end-end-radius: 14px; } /* current page: flat, it marks where you are */
.am-hdr__code { display: none; }
.am-hdr__links a[aria-current] .am-hdr__code { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding-inline: 4px; border-radius: 3px; border-end-end-radius: 10px; background: var(--lemon); color: var(--navy); font: 700 12px/1 var(--font-mono); }
.am-scrolled body > .am-hdr { box-shadow: 0 10px 24px rgb(0 0 0 / .22); }
.am-scrolled body > .am-hdr .am-hdr__in { min-height: 60px; }
.am-scrolled body > .am-hdr .am-hdr__logo img { height: 34px; }
.am-hdr__acts { display: flex; align-items: center; gap: var(--s-2); margin-inline-start: auto; }
.am-hdr__lang { display: grid; place-items: center; width: 42px; height: 42px; border: 0; background: var(--primary-soft); border-radius: var(--cell-r); color: var(--on-primary); font: 700 var(--fs-sm)/1 var(--font-latin); text-decoration: none; }
.am-hdr__lang:lang(ar) { font-family: var(--font-arabic); font-size: var(--fs-md); }
.am-hdr__lang:hover { background: #4A6273; }
.am-hdr__menu { display: inline-flex; align-items: center; gap: var(--s-2); padding: 0; border: 0; background: none; color: var(--on-primary); font: 700 var(--fs-sm)/1 var(--font-head); cursor: pointer; }
.am-hdr__menu-cell { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--cell-r); border-end-end-radius: 18px; background: var(--on-primary); color: var(--navy); transition: background-color var(--dur) var(--ease); }
.am-hdr__menu:hover .am-hdr__menu-cell { background: var(--lemon); }
@media (max-width: 1140px) { .am-hdr__nav { display: none; } }
@media (max-width: 720px) { .am-hdr__menu-word { display: none; } .am-hdr__in { gap: var(--s-3); min-height: 64px; } }
@media (max-width: 520px) { .am-hdr__lang { display: none; } .am-hdr__logo img { height: 32px; } }
@media (max-width: 420px) { .am-hdr__quote .am-btn__cell { display: none; } .am-hdr__quote { padding-inline: var(--s-3) !important; } }
@media (max-width: 359px) { .am-hdr__in { gap: var(--s-2); } .am-hdr__acts { gap: var(--s-1); } .am-hdr__logo img { height: 28px; } .am-hdr__quote { padding-inline: var(--s-2) !important; } } /* 320px phones */

/* Menu: the factory directory, a wall of floor signs */
.am-dir { position: fixed; inset: 0; z-index: 100; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: var(--navy); color: var(--on-primary); opacity: 0; transition: opacity .25s var(--ease); }
.am-dir.is-open, .am-dir.is-static { opacity: 1; }
.am-dir.is-static { position: relative; inset: auto; z-index: auto; }
.am-dir__in { display: grid; align-content: start; gap: var(--s-6); padding-block: var(--s-4) var(--s-7); }
.am-dir__top { display: flex; align-items: center; gap: var(--s-5); min-height: 60px; }
.am-dir__top img { height: 40px; width: auto; }
.am-dir__title { display: grid; padding-inline-start: var(--s-5); border-inline-start: 1px solid var(--line-dark); font: 700 var(--fs-sm)/1.3 var(--font-head); color: var(--sky); }
.am-dir__title span { font-weight: 400; font-size: var(--fs-xs); opacity: .75; }
.am-dir__title span:lang(en) { font-family: var(--font-latin); }
.am-dir__title span:lang(ar) { font-family: var(--font-arabic); }
.am-dir__close { display: grid; place-items: center; width: 52px; height: 52px; margin-inline-start: auto; border: 0; border-radius: var(--cell-r); border-end-end-radius: 22px; background: var(--lemon); color: var(--navy); cursor: pointer; }
.am-dir__close .am-icon { width: 24px; height: 24px; }
.am-dir__wall { display: grid; grid-template-columns: repeat(3, 1fr); } /* nine pages: a 3 × 3 sign wall */
@media (max-width: 900px) { .am-dir__wall { grid-template-columns: 1fr 1fr; } .am-dir__wall li:last-child { grid-column: 1 / -1; } }
.am-dir__wall .am-sign { min-height: clamp(150px, 21vh, 200px); height: 100%; text-decoration: none; transition: translate var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.am-dir__wall a.am-sign:hover, .am-dir__wall a.am-sign:focus-visible { translate: 0 -6px; box-shadow: 0 10px 0 -4px var(--lemon); z-index: 1; }
.am-dir.is-open .am-dir__wall li { animation: am-mount .4s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
.am-dir__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6); padding-block-start: var(--s-5); border-block-start: 1px solid var(--line-dark); }
.am-dir__foot .am-btn { margin-inline-start: auto; }
@media (max-width: 560px) {
  .am-dir__title { display: none; }
  .am-dir__wall .am-sign { min-height: 140px; padding: var(--s-4); }
  .am-dir__wall .am-sign__code { font-size: var(--fs-xl); }
  .am-dir__foot .am-btn { margin-inline-start: 0; width: 100%; justify-content: space-between; }
}

/* The current page's tile in the directory */
.am-sign { position: relative; }
.am-sign--here { --bg: var(--primary-soft); --fg: var(--on-primary); --code: var(--lemon); box-shadow: inset 0 0 0 2px var(--lemon); }
.am-sign__here { position: absolute; inset-block-end: var(--s-4); inset-inline-end: var(--s-4); padding: 2px var(--s-2); border-radius: 3px; border-end-end-radius: 9px; background: var(--lemon); color: var(--navy); font: 700 var(--fs-xs)/1.4 var(--font-head); }

/* Floating WhatsApp cell */
.am-fab { position: fixed; inset-block-end: var(--s-5); inset-inline-end: var(--s-5); z-index: 60; display: grid; place-items: center; width: 60px; height: 60px; border-radius: var(--cell-r); border-end-end-radius: 26px; background: var(--lemon); color: var(--navy); }
.am-fab .am-icon { width: 28px; height: 28px; }
/* phones: smaller, and it slides away while you scroll down so it never sits on the text you read */
@media (max-width: 640px) {
  .am-fab { width: 48px; height: 48px; inset-block-end: var(--s-4); inset-inline-end: var(--s-4); border-end-end-radius: 20px; transition: translate .3s var(--ease); }
  .am-fab .am-icon { width: 24px; height: 24px; }
  .am-fab-away .am-fab { translate: 0 calc(100% + var(--s-5)); }
}

/* Footer: the reception plaque */
.am-ftr { background: var(--navy); }
.am-ftr__cta { position: relative; overflow: hidden; background: var(--lemon); color: var(--navy); }
.am-ftr__cta { --super: var(--navy); --super-o: .08; } /* the mark as a faint navy tint on lemon */
.am-ftr__glyphs { position: relative; z-index: 1; padding-block-start: var(--s-5); } /* aligned with the band's text and button */
.am-ftr__cta-in { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-6); }
.am-ftr__cta p { font: 700 var(--fs-lg)/var(--lh-head) var(--font-head); }
.am-ftr__body { position: relative; }
.am-ftr__main { display: grid; grid-template-columns: 1.25fr 1fr 1.1fr; gap: var(--s-7); padding-block: var(--s-8) var(--s-7); }
.am-ftr__logo { height: 60px; width: auto; margin-block-end: var(--s-4); }
.am-ftr__about p { max-width: 40ch; color: var(--on-primary-soft); font-size: var(--fs-sm); }
.am-ftr__socials { display: flex; gap: var(--s-2); margin-block-start: var(--s-5); }
.am-ftr__social { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: var(--primary-soft); border-radius: var(--cell-r); border-end-end-radius: 16px; color: var(--on-primary); }
.am-ftr__social:hover { background: var(--lemon); border-color: var(--lemon); color: var(--navy); }
.am-ftr__nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.am-ftr__h { margin-block-end: var(--s-3); font-size: var(--fs-sm); color: var(--sky); }
.am-ftr__list li a { display: inline-flex; align-items: center; gap: var(--s-3); padding-block: 6px; color: var(--on-primary-soft); text-decoration: none; font-size: var(--fs-sm); }
.am-ftr__list li a::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--lemon); opacity: .6; transition: opacity var(--dur); }
.am-ftr__list li a:hover { color: var(--on-primary); }
.am-ftr__list li a:hover::before { opacity: 1; border-end-end-radius: 50%; }
.am-ftr__desk { display: grid; align-content: start; gap: var(--s-3); font-style: normal; }
.am-ftr__plaque {
  display: grid; grid-template: "code label" auto "addr addr" auto "map map" auto / auto 1fr; gap: var(--s-2) var(--s-4); align-items: center;
  margin-block-end: var(--s-2); padding: var(--s-5); border-radius: var(--cell-r); border-end-end-radius: 36px;
  background: var(--paper); color: var(--navy); text-decoration: none; transition: translate var(--dur) var(--ease);
}
.am-ftr__plaque:hover { translate: 0 -3px; }
.am-ftr__plaque-code { grid-area: code; font: 700 var(--fs-xl)/.9 var(--font-latin); letter-spacing: -.04em; }
.am-ftr__plaque-label { grid-area: label; display: grid; font: 700 var(--fs-md)/1.25 var(--font-head); }
.am-ftr__plaque-label span { font-size: var(--fs-xs); font-weight: 400; opacity: .75; }
.am-ftr__plaque-label span:lang(en) { font-family: var(--font-latin); }
.am-ftr__plaque-label span:lang(ar) { font-family: var(--font-arabic); }
.am-ftr__plaque-addr { grid-area: addr; font-size: var(--fs-sm); color: var(--ink-soft); }
.am-ftr__plaque-map { grid-area: map; display: inline-flex; align-items: center; gap: var(--s-2); font: 700 var(--fs-xs)/1 var(--font-head); color: var(--second-strong); }
.am-ftr__plaque-map .am-icon { width: 16px; height: 16px; }
.am-ftr__base { border-block-start: 1px solid var(--line-dark); }
.am-ftr__base-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); padding-block: var(--s-4); font-size: var(--fs-xs); color: var(--on-primary-soft); }
.am-ftr__group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0; }
.am-ftr__brand { display: inline-flex; align-items: center; gap: var(--s-1); padding: 4px 10px; border: 1px solid rgb(255 255 255 / .25); border-radius: 4px; border-end-end-radius: 12px; color: var(--on-primary); text-decoration: none; font-weight: 600; }
.am-ftr__brand .am-icon { width: 14px; height: 14px; opacity: .7; }
a.am-ftr__brand:hover { border-color: var(--lemon); }
.am-ftr__brand small { margin-inline-start: var(--s-1); color: var(--lemon); font-weight: 400; }
.am-ftr__legal { margin: 0; }
.am-ftr__legal a { color: inherit; }
.am-ftr__credit { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 24px; color: inherit; text-decoration: none; opacity: .85; }
@media (min-width: 641px) { .am-ftr__base-in { padding-inline-end: max(var(--gutter), 100px); } } /* keeps "back to top" clear of the WhatsApp button */
.am-ftr__credit img { height: 20px; width: auto; }
@media (max-width: 1000px) { .am-ftr__main { grid-template-columns: 1fr 1fr; } .am-ftr__about { grid-column: 1 / -1; } }
@media (max-width: 640px) { .am-ftr__main { grid-template-columns: 1fr; gap: var(--s-6); padding-block: var(--s-7) var(--s-6); } .am-ftr__base-in { flex-direction: column; align-items: flex-start; } }

/* Preloader: the mark's cells click into place, then the panel lifts */
.am-pre { display: none; }
.am-pre-on .am-pre { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: var(--navy); animation: am-pre-safety 0s 3s forwards; }
.am-pre-out .am-pre { translate: 0 -100%; transition: translate .5s var(--ease); }
.am-pre__mark { width: 112px; height: 112px; overflow: visible; }
.am-pre__cell { transform-box: fill-box; transform-origin: center; animation: am-pre-cell .42s var(--ease) calc(var(--i) * 90ms) backwards, am-pre-hide .2s .62s forwards; }
.am-pre__cell--lemon { fill: var(--lemon); }
.am-pre__cell--sky { fill: var(--sky); }
.am-pre__cell--paper { fill: var(--paper); }
.am-pre__cell:nth-child(1) { --fx: -70px; --fy: -70px; }
.am-pre__cell:nth-child(2) { --fx: 70px; --fy: -70px; }
.am-pre__cell:nth-child(3) { --fx: -70px; --fy: 70px; }
.am-pre__cell:nth-child(4) { --fx: 70px; --fy: 70px; }
.am-pre__whole { color: var(--lemon); opacity: 0; animation: am-pre-whole .25s .58s forwards; }

/* ══ Wayfinding sign (guide p.64, the hanging ceiling signs) ═════════════════
   A paper slab hung from two rods, the department glyph and the arrow fixed to its end, the floor code hanging
   below like a tag. Thickness is a darker bottom face, not a shadow. Linked signs swing on their rods. */
.am-way {
  --slab: var(--paper); --slab-edge: #CFC8BA; --cell: var(--lemon); --cell-fg: var(--navy); --cell-edge: #B3C91A;
  --c: 52px; --rod-h: 30px; --rod: var(--ink-faint);
  position: relative; display: inline-grid; grid-template: "slab glyph arrow" auto "code . ." auto / 1fr auto auto; align-items: stretch;
  width: max-content; max-width: 100%; margin-block-start: var(--rod-h); color: var(--navy); text-decoration: none; vertical-align: top; /* size to the label, wrap only at the container edge */
}
.am-way::before, .am-way::after { content: ""; position: absolute; inset-block-start: calc(-1 * var(--rod-h)); width: 2px; height: var(--rod-h); background: var(--rod); }
.am-way::before { inset-inline-start: 22%; }
.am-way::after { inset-inline-end: 22%; }
.am-way--navy { --cell: var(--navy); --cell-fg: var(--sky); --cell-edge: #0E1C26; }
.am-way--sky  { --cell: var(--sky);  --cell-fg: var(--navy); --cell-edge: #5E9CB1; }
.am-way--grey { --cell: var(--grey); --cell-fg: var(--navy); --cell-edge: #6E6F71; }
.am-way--grey .am-way__glyph { color: var(--lemon); } /* lemon on grey is 2.7: decorative glyph only, the code stays navy */
.am-way--on-navy { --slab-edge: rgb(0 0 0 / .4); --rod: rgb(255 255 255 / .35); }
.am-way__slab { grid-area: slab; display: grid; align-content: center; gap: 2px; padding: 16px 24px; border-start-start-radius: 6px; border-end-start-radius: 6px; background: var(--slab); border-block-end: 5px solid var(--slab-edge); }
.am-way:not(:has(.am-way__glyph, .am-way__arrow)) .am-way__slab { border-radius: 6px; }
.am-way__label { margin: 0; font: 700 var(--fs-lg)/var(--lh-head) var(--font-head); color: inherit; }
.am-way__alt { font: 400 var(--fs-xs)/1.3 var(--font-head); opacity: .72; }
.am-way__alt:lang(en) { font-family: var(--font-latin); }
.am-way__alt:lang(ar) { font-family: var(--font-arabic); }
.am-way__glyph, .am-way__arrow { display: grid; place-items: center; width: var(--c); min-height: var(--c); background: var(--cell); color: var(--cell-fg); border-block-end: 5px solid var(--cell-edge); }
.am-way__glyph { grid-area: glyph; }
.am-way__arrow { grid-area: arrow; --cell: var(--navy); --cell-fg: var(--lemon); --cell-edge: #0E1C26; }
.am-way--on-navy .am-way__arrow { --cell: var(--lemon); --cell-fg: var(--navy); --cell-edge: #B3C91A; }
.am-way > .am-way__arrow, .am-way:not(:has(.am-way__arrow)) > .am-way__glyph { border-start-end-radius: 6px; border-end-end-radius: 6px; } /* the last piece closes the sign */
/* Icon sizes are fixed: a % height falls back to the SVG default (150px) when the cell stretches */
.am-way__glyph .am-icon { width: calc(var(--c) * .58); height: calc(var(--c) * .58); }
.am-way__arrow .am-icon { width: calc(var(--c) * .55); height: calc(var(--c) * .55); stroke-width: 2.4; }
.am-way__code { grid-area: code; justify-self: start; display: grid; place-items: center; min-width: var(--c); height: calc(var(--c) * .9); margin-inline-start: 16px; padding-inline: 8px; border-radius: 0 0 6px 6px; background: var(--cell); color: var(--cell-fg); font: 700 calc(var(--c) * .42)/1 var(--font-latin); letter-spacing: -.03em; }
.am-way--lg { --c: 64px; }
.am-way--lg .am-way__slab { padding-inline: 32px; }
.am-way--lg .am-way__label { font-size: var(--fs-xl); }
.am-way--sm { --c: 36px; --rod-h: 20px; }
.am-way--sm .am-way__slab { padding: 8px 16px; }
.am-way--sm .am-way__label { font-size: var(--fs-sm); }
a.am-way { transform-origin: 50% calc(-1 * var(--rod-h)); transition: rotate .35s var(--ease); }
a.am-way:is(:hover, :focus-visible) { rotate: calc(-1.5deg * var(--dir)); } /* swings on its rods */
@media (max-width: 560px) {
  .am-way { --c: 42px; }
  .am-way--lg { --c: 50px; }
  .am-way--sm { --c: 32px; }
  .am-way .am-way__slab, .am-way--lg .am-way__slab { padding-inline: 14px; }
  .am-way--lg .am-way__label { font-size: var(--fs-lg); }
}

/* ══ Van line (guide p.57) and mono voice ═══════════════════════════════ */
.am-mono, .am-badge, .am-cellink .am-num, .am-ftr__legal .am-num { font-family: var(--font-mono); }
.am-eyebrow { display: grid; justify-items: start; gap: 6px; font: 700 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.am-eyebrow:lang(ar) { font: 700 var(--fs-sm)/1.4 var(--font-arabic); letter-spacing: 0; text-transform: none; }
.am-eyebrow__line { display: flex; align-items: center; gap: 10px; margin: 0; }
.am-eyebrow__line i { width: 32px; height: 8px; border-radius: 4px; background: currentColor; }
.am-eyebrow__items { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-weight: 400; }
.am-eyebrow__items li { display: inline-flex; align-items: center; }
.am-eyebrow__items li + li::before { content: ""; width: 7px; height: 7px; margin-inline: 10px; border-radius: 2px; background: currentColor; }
.am-shead { display: grid; justify-items: start; gap: var(--s-4); }

/* ══ Photos: one treatment per kind, in brand shapes ════════════════════ */
.am-photo { position: relative; margin: 0; overflow: hidden; border-radius: var(--cell-r); background: var(--tile, var(--paper)); }
.am-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.am-photo--cell, .am-photo--lobe { aspect-ratio: 6 / 5; }
.am-photo--lobe { border-end-end-radius: 34%; }
.am-photo--mark { aspect-ratio: 1; border-radius: 0; -webkit-mask: url(../img/logo/mark-navy.svg) center / contain no-repeat; mask: url(../img/logo/mark-navy.svg) center / contain no-repeat; }
.am-photo--on-paper { --tile: var(--paper); }
.am-photo--on-sky { --tile: var(--sky); }
.am-photo--on-lemon { --tile: var(--lemon); }
.am-photo--on-navy { --tile: var(--navy); }
/* Product shots sit on light grey: multiply drops that grey into the tile colour. Lemon tiles: dark or coloured products only. */
.am-photo--product img { object-fit: contain; mix-blend-mode: multiply; filter: brightness(1.1) contrast(1.08); }
/* Factory photos: navy-to-sky duotone (multiply on sky, then navy lifts the shadows) */
.am-photo--duo { background: var(--sky); isolation: isolate; }
.am-photo--duo img { filter: grayscale(1) contrast(1.2) brightness(1.05); mix-blend-mode: multiply; }
.am-photo--duo::after { content: ""; position: absolute; inset: 0; background: var(--navy); mix-blend-mode: lighten; pointer-events: none; }

/* ══ Oversized mark (guide p.44 bags, p.70 ID card) and the glyph row (p.57, p.43) ══ */
.am-super { isolation: isolate; overflow: clip; }
.am-super.am-dir { overflow-x: hidden; overflow-y: auto; } /* the menu must still scroll on short screens */
.am-super::before {
  content: ""; position: absolute; z-index: -1; inset-block-start: -22%; inset-inline-end: -14%;
  width: min(80vw, 880px); aspect-ratio: 1; pointer-events: none;
  background: var(--super, var(--primary-soft)); opacity: var(--super-o, .55);
  -webkit-mask: url(../img/logo/mark-navy.svg) center / contain no-repeat; mask: url(../img/logo/mark-navy.svg) center / contain no-repeat;
}
.am-glyphrow { --g: 22px; display: grid; grid-template-columns: repeat(auto-fill, var(--g)); grid-auto-rows: var(--g); justify-content: space-between; column-gap: 14px; height: var(--g); overflow: hidden; color: var(--navy); } /* whole glyphs only, spread edge to edge; extras wrap out of sight */
.am-glyphrow .am-icon { width: var(--g); height: var(--g); }
.am-on-dark .am-glyphrow { color: var(--sky); }
.am-ftr__cta .am-glyphrow { color: var(--navy); } /* the lemon band inside the dark footer */

/* ══ Back to top: an up arrow and the ground-floor code ═════════════════ */
.am-top { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 10px; border-radius: 4px; border-end-end-radius: 14px; background: var(--lemon); color: var(--navy); text-decoration: none; font: 700 12px/1 var(--font-mono); }
.am-top__arrow { width: 16px; height: 16px; rotate: -90deg; stroke-width: 2.4; }

/* ══ Depth rule: a solid edge means you can press it ═══════════════════════
   Every standalone pressable cell sits on a solid edge (no blur), pointing down and toward the reading end,
   and goes into it: half on hover/focus, fully while pressed. Not pressable = flat (badges, alert/toast/upload
   icons, tabs, the current page number, "soon" brands, the hours row). Exceptions: the menu's sign wall lifts
   instead (signs on a wall), and hanging wayfinding signs have a bottom face as objects; linked ones swing on their rods. */
/* :where() keeps these defaults at zero specificity, so each control's own --edge and --d (below) always win */
:where(.am-btn, a.am-tag, .am-fab, .am-top, .am-hdr__lang, .am-hdr__menu-cell, .am-dir__close, .am-acc__cell, .am-mapmark__door,
    a.am-pager__n, a.am-pager__step .am-pager__cell, .am-ftr__social, a.am-ftr__brand, a.am-cellink .am-cellink__cell, .am-link > .am-icon, .am-rowgo) {
  --d: 3px; --edge: #0E1C26;
  box-shadow: calc(var(--d) * var(--dir)) var(--d) 0 var(--edge);
  transition: translate .12s var(--ease), box-shadow .12s var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
/* Pressed by hovering/focusing the control itself, or the link/button that holds the cell */
:is(.am-btn, a.am-tag, .am-fab, .am-top, .am-hdr__lang, .am-dir__close, a.am-pager__n, .am-ftr__social, a.am-ftr__brand, .am-mapmark__door):is(:hover, :focus-visible),
:is(.am-hdr__menu, .am-acc__q, a.am-pager__step, a.am-cellink, a.am-notice):is(:hover, :focus-visible) :is(.am-hdr__menu-cell, .am-acc__cell, .am-pager__cell, .am-cellink__cell, .am-rowgo),
.am-link:is(:hover, :focus-visible) > .am-icon { /* only the cell itself presses, never the icon inside it */
  translate: calc(var(--d) / 2 * var(--dir)) calc(var(--d) / 2);
  box-shadow: calc(var(--d) / 2 * var(--dir)) calc(var(--d) / 2) 0 var(--edge);
}
:is(.am-btn, a.am-tag, .am-fab, .am-top, .am-hdr__lang, .am-dir__close, a.am-pager__n, .am-ftr__social, a.am-ftr__brand, .am-mapmark__door):active,
:is(.am-hdr__menu, .am-acc__q, a.am-pager__step, a.am-cellink, a.am-notice):active :is(.am-hdr__menu-cell, .am-acc__cell, .am-pager__cell, .am-cellink__cell, .am-rowgo),
.am-link:active > .am-icon {
  translate: calc(var(--d) * var(--dir)) var(--d);
  box-shadow: 0 0 0 var(--edge);
}
.am-btn:disabled, .am-btn[aria-disabled="true"] { translate: none; box-shadow: calc(var(--d) * var(--dir)) var(--d) 0 var(--edge); }
/* Edge depth: 5px for buttons and the WhatsApp cell, 3px for small cells */
.am-btn, .am-fab { --d: var(--depth); }
.am-mapmark__door { --d: 4px; --edge: #CFC8BA; }
.am-mapmark__door--sky { --edge: #5E9CB1; }
/* Edge colour = the darker side of the cell's own colour */
.am-btn { --edge: var(--navy); }
:is(.am-btn--primary, .am-fab, .am-top, .am-dir__close, .am-acc__cell, .am-link .am-icon, .am-rowgo) { --edge: #B3C91A; }
.am-btn--ghost { --edge: rgb(0 0 0 / .45); }
a.am-tag { --edge: #B5CFD8; }
a.am-tag:is([aria-pressed="true"], [aria-current]), .am-acc__item[open] .am-acc__cell { --edge: #0E1C26; }
a.am-pager__n { --edge: #CFCCC2; }
.am-hdr__menu-cell { --edge: #AFC0C8; }
:is(.am-hdr__lang, .am-ftr__social, a.am-ftr__brand, a.am-cellink .am-cellink__cell) { --edge: rgb(0 0 0 / .4); }
/* Cells that turn lemon on hover take the lemon edge with them */
.am-hdr__menu:hover .am-hdr__menu-cell, .am-ftr__social:hover, a.am-cellink:hover .am-cellink__cell { --edge: #B3C91A; }
a.am-ftr__brand { border-color: transparent; background: var(--primary-soft); }
.am-fab { filter: drop-shadow(0 8px 14px rgb(32 57 74 / .22)); } /* it floats over content */

/* Crystal · the mark as 3D cut glass (guide p.68–69): assets/js/crystal.js draws it on a transparent canvas over a dark
   section; until then (or without WebGL) the flat mark shows. The glass is tinted by --cx-tint (the section's colour). */
.am-cx { --cx-tint: var(--navy); position: relative; aspect-ratio: 1; }
.am-cx__flat { position: absolute; inset: 12.5%; width: 75%; height: 75%; color: var(--primary-soft); } /* the canvas frames the mark at 75% */
.am-cx__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.am-cx.is-3d .am-cx__flat { visibility: hidden; }

/* Smoked glass for what floats over the page: the header once the page slides under it, and the menu */
:root {
  --cx-navy: rgb(32 57 74 / .78);    /* with the dimmed backdrop: white text ≥ 7, #C7D1D6 ≥ 4.5 over any photo */
  --cx-navy-deep: rgb(32 57 74 / .9); /* the menu: sky text ≥ 4.5 over a bright page */
  --cx-filter: blur(20px) saturate(1.6) brightness(.75);
  --cx-prism: linear-gradient(100deg, rgb(255 170 90), rgb(255 255 255) 18%, rgb(255 255 255 / .25) 45% 55%, rgb(255 255 255) 82%, rgb(100 200 255));
  --cx-sheen: linear-gradient(115deg, transparent 32%, rgb(255 255 255 / .09) 40%, rgb(255 255 255 / .03) 47%, transparent 48% 54%, rgb(255 255 255 / .05) 55%, transparent 60%);
}
.am-scrolled body > .am-hdr { background: var(--cx-sheen), var(--cx-navy); -webkit-backdrop-filter: var(--cx-filter); backdrop-filter: var(--cx-filter); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 10px 24px rgb(0 0 0 / .22); }
/* The prism edge along its foot; the light is in the strip's own box (ui.js), not fixed (that kept scrolling off the compositor) */
.am-hdr::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; height: 2px; background: radial-gradient(220px circle at var(--xl-x, -999px) var(--xl-y, -999px), rgb(255 255 255 / var(--xl-on)), rgb(255 255 255 / calc(.8 * var(--xl-on))) 10%, rgb(255 255 255 / calc(.3 * var(--xl-on))) 32%, rgb(255 255 255 / calc(.1 * var(--xl-on))) 62%, rgb(255 255 255 / calc(.05 * var(--xl-on)))), var(--cx-prism); opacity: 0; transition: opacity var(--dur) var(--ease); pointer-events: none; }
.am-scrolled body > .am-hdr::after { opacity: 1; }
.am-dir:not(.is-static) { background: var(--cx-sheen), var(--cx-navy-deep); -webkit-backdrop-filter: var(--cx-filter); backdrop-filter: var(--cx-filter); } /* fixed over the viewport, so its sheen needn't be */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { :root { --cx-navy: var(--navy); --cx-navy-deep: var(--navy); } }

/* Crystal material (p.68–69) on every dark part: cut corners, a two-facet bevel, a rim lit by one shared light (ui.js).
   !important only to beat components' own border/background; their colour stays, the depth edge is the glass's thickness. */
@property --xl-g { syntax: "<length>"; inherits: false; initial-value: 0px; }
/* The light, in each part's own box: ui.js sets these on the parts on screen only (typed, so a move restyles little) */
@property --xl-x { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --xl-y { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --la { syntax: "<angle>"; inherits: true; initial-value: 315deg; } /* the light's angle from the viewport centre */
@property --xl-t { syntax: "<time>"; inherits: false; initial-value: 0s; } /* .3s while the light glides back after a scroll */
@property --xl-part { syntax: "<integer>"; inherits: false; initial-value: 0; } /* marks what ui.js lights (F35: the one list is the selectors here) */
.am-hdr { --xl-part: 1; transition: --xl-x var(--xl-t, 0s), --xl-y var(--xl-t, 0s); }
:root {
  --xl-on: 1; /* 0 with reduced transparency: the moving light and glow go */
  --xl-prism: linear-gradient(100deg, rgb(255 150 60 / .55), transparent 14% 86%, rgb(70 185 255 / .6));
  --xl-face: linear-gradient(165deg, rgb(255 255 255 / .14), transparent 42%, rgb(0 0 0 / .22));
  --xl-sheen: linear-gradient(118deg, transparent 28%, rgb(255 255 255 / .16) 36%, transparent 44% 52%, rgb(255 255 255 / .06) 56%, transparent 62%);
  --xl-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='20' cy='20' r='9' fill='url(%23g)' opacity='.8'/%3E%3Cpath d='M20 0 21.2 18.8 40 20 21.2 21.2 20 40 18.8 21.2 0 20 18.8 18.8Z' fill='%23fff'/%3E%3C/svg%3E");
}
:is(.am-xl, .am-btn--dark, .am-btn--ghost, .am-btn__cell, .am-hdr__lang, .am-hdr__menu-cell, .am-dir__close, .am-dir__wall .am-sign,
    .am-ftr__social, a.am-ftr__brand, .am-top, .am-fab, .am-pager__cell, .am-acc__cell, .am-file__cell, .am-cellink__cell,
    .am-badge--navy, .am-toast,
    .am-journey__cell, .am-doorplate__cell, .am-floor__tag, .am-err__floor, .am-env__more, .am-nb__n, .am-xray__tabs button,
    .am-home-hero__facts > div, .am-doorplate, .am-xcard__frame, .am-samples__cta, .am-bcard__front, .am-bcard__back, .am-mapmark__door) {
  --xl-part: 1;
  --xl-light: radial-gradient(220px circle at var(--xl-x, -999px) var(--xl-y, -999px), rgb(255 255 255 / var(--xl-on)), rgb(255 255 255 / calc(.8 * var(--xl-on))) 10%, rgb(255 255 255 / calc(.3 * var(--xl-on))) 32%, rgb(255 255 255 / calc(.1 * var(--xl-on))) 62%, rgb(255 255 255 / calc(.05 * var(--xl-on)))); /* the hot spot: small, bright, fast falloff */
  --xl-glow: radial-gradient(520px circle at var(--xl-x, -999px) var(--xl-y, -999px), rgb(255 255 255 / calc(.13 * var(--xl-on))), rgb(255 255 255 / calc(.04 * var(--xl-on))) 45%, transparent 70%); /* the same light, reflected softly by the face */
  /* The inner facet (p.69's second cut): a crisp band inside the rim, lit from the top-start, dark at the foot */
  --xl-rim: conic-gradient(from var(--la, 315deg), rgb(255 255 255 / .95) 0deg 5deg, rgb(255 255 255 / .16) 12deg 50deg, rgb(255 255 255 / .8) 56deg 59deg, rgb(0 0 0 / .3) 68deg 118deg, rgb(255 255 255 / .55) 126deg 130deg, rgb(255 255 255 / .1) 138deg 186deg, rgb(255 255 255 / .85) 192deg 196deg, rgb(0 0 0 / .26) 208deg 266deg, rgb(255 255 255 / .5) 274deg 277deg, rgb(255 255 255 / .14) 286deg 350deg, rgb(255 255 255 / .95) 356deg); /* cut glass reflects strips, not a wash */
  --xl-ft: linear-gradient(to bottom, rgb(255 255 255 / .42) 0 var(--xl-f), transparent var(--xl-f));
  --xl-fb: linear-gradient(to top, rgb(0 0 0 / .38) 0 var(--xl-f), transparent var(--xl-f));
  --xl-fs: linear-gradient(to right, rgb(255 255 255 / .2) 0 var(--xl-f), transparent var(--xl-f));
  --xl-fe: linear-gradient(to left, rgb(0 0 0 / .18) 0 var(--xl-f), transparent var(--xl-f));
  border-style: solid !important; border-width: var(--xl-b) !important; border-color: rgb(255 255 255 / .3) !important; /* rim without border-area support */
  corner-shape: bevel; corner-end-end-shape: round;
  background-image: var(--xl-star), var(--xl-sheen), var(--xl-glow), var(--xl-ft), var(--xl-fb), var(--xl-fs), var(--xl-fe), var(--xl-face) !important;
  background-origin: border-box !important;
  background-clip: border-box, padding-box, padding-box, padding-box, padding-box, padding-box, padding-box, padding-box !important;
  background-attachment: scroll !important;
  background-size: var(--xl-g) var(--xl-g), auto, auto, auto, auto, auto, auto, auto !important;
  background-position: 0 0 !important; background-repeat: no-repeat !important;
  outline: 1px solid rgb(255 255 255 / .2); outline-offset: calc(var(--xl-b) * -1 - 1px); /* the bevel's inner step */
  transition: --xl-x var(--xl-t, 0s), --xl-y var(--xl-t, 0s), --la var(--xl-t, 0s), --xl-g .25s var(--ease), translate .12s var(--ease), box-shadow .12s var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
/* The rim: painted in the border ring only; the last, empty layer keeps the colour filling the whole shape */
@supports (background-clip: border-area) {
  :is(.am-xl, .am-btn--dark, .am-btn--ghost, .am-btn__cell, .am-hdr__lang, .am-hdr__menu-cell, .am-dir__close, .am-dir__wall .am-sign,
      .am-ftr__social, a.am-ftr__brand, .am-top, .am-fab, .am-pager__cell, .am-acc__cell, .am-file__cell, .am-cellink__cell,
      .am-badge--navy, .am-toast,
    .am-journey__cell, .am-doorplate__cell, .am-floor__tag, .am-err__floor, .am-env__more, .am-nb__n, .am-xray__tabs button,
    .am-home-hero__facts > div, .am-doorplate, .am-xcard__frame, .am-samples__cta, .am-bcard__front, .am-bcard__back, .am-mapmark__door) {
    border-color: transparent !important;
    background-image: var(--xl-star), var(--xl-sheen), var(--xl-glow), var(--xl-ft), var(--xl-fb), var(--xl-fs), var(--xl-fe), var(--xl-face), var(--xl-prism), var(--xl-light), var(--xl-rim), linear-gradient(transparent, transparent) !important;
    background-clip: border-box, padding-box, padding-box, padding-box, padding-box, padding-box, padding-box, padding-box, border-area, border-area, border-area, border-box !important;
    background-size: var(--xl-g) var(--xl-g), auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto !important;
  }
}
@media (prefers-reduced-transparency: reduce) { :root { --cx-navy: var(--navy); --cx-navy-deep: var(--navy); --cx-filter: none; --xl-sheen: linear-gradient(transparent, transparent); --xl-on: 0; } }
/* A glint on the corner when you reach for it */
:is(.am-xl, .am-btn--dark, .am-btn--ghost, .am-hdr__lang, .am-dir__close, .am-dir__wall .am-sign, .am-ftr__social, a.am-ftr__brand, .am-top, .am-fab):is(:hover, :focus-visible),
:is(.am-btn, .am-hdr__menu, .am-acc__q, a.am-pager__step):is(:hover, :focus-visible) :is(.am-btn__cell, .am-hdr__menu-cell, .am-acc__cell, .am-pager__cell) { --xl-g: 22px; }
/* Light parts on light faces: a navy step line instead of a white one */
:is(.am-hdr__menu-cell, .am-dir__close, .am-top, .am-fab, .am-dir__wall .am-sign:not(.am-sign--here), .am-journey__cell, .am-err__floor, .am-doorplate, .am-bcard__back, .am-mapmark__door, .am-xray__tabs button[aria-selected="true"]) { outline-color: rgb(32 57 74 / .2); }
/* Keyboard focus beats the bevel's step line */
:is(.am-btn--dark, .am-btn--ghost, .am-hdr__lang, .am-dir__close, .am-dir__wall .am-sign, .am-ftr__social, a.am-ftr__brand, .am-top, .am-fab, .am-xray__tabs button, .am-mapmark__door):focus-visible { outline: 3px solid var(--focus-on-dark); outline-offset: 3px; }
/* Sizes: slabs and the menu's tiles get a wider bevel */
:where(.am-xl, .am-btn--dark, .am-btn--ghost, .am-btn__cell, .am-hdr__lang, .am-hdr__menu-cell, .am-dir__close, .am-ftr__social, a.am-ftr__brand, .am-top, .am-fab, .am-pager__cell, .am-acc__cell, .am-file__cell, .am-cellink__cell, .am-badge--navy, .am-journey__cell, .am-doorplate__cell, .am-floor__tag, .am-err__floor, .am-env__more, .am-nb__n, .am-xray__tabs button) { --xl-b: 5px; --xl-f: 4px; }
:where(.am-xl, .am-dir__wall .am-sign, .am-toast, .am-home-hero__facts > div, .am-doorplate, .am-xcard__frame, .am-samples__cta, .am-bcard__front, .am-bcard__back, .am-mapmark__door) { --xl-b: 9px; --xl-f: 8px; }
:where(.am-xl) { border-radius: 16px; }
.am-xl--cell { --xl-b: 5px; --xl-f: 4px; }
.am-dir__wall .am-sign { border-radius: 12px; } /* a wall of glass blocks: each tile's corners cut (the lobe corner stays round) */
