/*
 * MASApp design tokens — the single source of truth for visual values.
 * Mirrors docs/design-tokens.md, which follows the approved prototype
 * (docs/masapp-prototype.html) except where Faizal has decided otherwise and
 * that file records it — the grounds and lines below are one such decision.
 *
 * This is the ONLY file permitted to contain literal colour values. CI fails
 * the build on a hard-coded colour anywhere else in the theme.
 */

:root {
    /* Palette — Jalur Gemilang, exactly as the prototype sets it */
    --navy: #010066;          /* prototype --biru */
    --navy-2: #010052;        /* --biru-2: language bar, pressed buttons */
    --red: #cc0001;           /* --merah */
    --red-2: #a30001;         /* --merah-2 */
    --yellow: #ffcc00;        /* --kuning: accent, badges, hero button */
    --white: #ffffff;

    /* Ink — warm navy-greys, not blue-greys */
    --ink: #111133;           /* --ink */
    --ink-2: #3d3d5c;         /* --bark: secondary text */
    --ink-3: #7a7a94;         /* --muted: captions */
    --ink-soft: #26264f;      /* long-form reading text */

    /* Grounds and lines */
    --surface: #f4f5f8;       /* light grey page ground — Faizal, 2026-09-13; prototype had cream #F7F5F0 */
    --stage: #eaecf1;         /* image wells and thumbnails, a step darker than the ground */
    --line: #dde0e8;          /* hairlines, neutral to match the grey ground */
    --line-strong: #c5c9d4;   /* form borders */

    /* On navy */
    /* The partner door. The same brand wearing its accent as the ground, so
       that nobody standing at one of the two doors has to read the heading to
       know which one it is. Navy on yellow carries 11.6:1 and the display line
       in red carries 3.9:1, which is the ratio large type is measured at. */
    --partner-ground: var(--yellow);
    --partner-ground-2: #eebd00;  /* the strip under the bar, a step down from it */
    --on-partner: var(--navy);
    --on-partner-soft: var(--ink-soft);
    --on-partner-muted: #4a4a23;  /* quiet text on yellow; 7.4:1, still readable at 11px */
    --partner-accent: var(--red);

    --on-navy: #ffffff;
    --on-navy-muted: #c9c9e8; /* deliver-to line, language bar */
    --on-navy-soft: #d6d6f0;  /* hero body copy */

    /* Notes and highlights — the prototype's promo / guard / premium panel */
    --note-bg: #fff7db;
    --note-line: #f2de93;
    --note-ink: #5c4a00;
    --note-ink-strong: #3d3100;
    --tint-navy: #f2f2fa;     /* selected option */

    /* Status */
    --success: #0f7a3d;       /* prototype halal / leaf green */
    --danger: #a8201a;

    /* Type scale */
    --t-display: clamp(23px, 4vw, 30px);
    --t-title: clamp(17px, 3vw, 21px);
    --t-price: 26px;
    --t-body: 14px;
    --t-small: 12.5px;
    --t-micro: 10.5px;
    --t-mono: 12px;

    --fw-strong: 600;
    --fw-medium: 500;
    --fw-normal: 400;

    /* Families. One sans carries everything, headings included (Faizal,
       2026-09-21: the marketplace should read like the marketplaces UAE
       shoppers already use, not like a magazine). Headings are separated from
       body text by weight and tracking rather than by a second face. The
       Arabic face is applied by [dir="rtl"] below. */
    --font-display: "Plus Jakarta Sans", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-latin: "Plus Jakarta Sans", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-arabic: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;

    /* Headings set tight; a geometric sans at heading sizes reads loose
       otherwise. Numbers never take this: tabular figures need their width. */
    --track-tight: -0.02em;

    /* The light that passes over a deal. Carried as a token because the CI
       grep rightly refuses a raw colour anywhere but this file, and because
       the sheen has to read on navy, on red and on yellow alike — which a
       white at low alpha does and a tint does not. */
    --sheen: rgba(255, 255, 255, .28);

    /* How wide the shop is allowed to be.

       One token rather than the four places that each carried 48rem, so the
       app bar, the search row, the deliver-to line and the page itself widen
       together. Stepped up on a large screen further down masapp.css: at 48rem
       on a 1680px monitor the shop sat in a 768px column with 456px of empty
       white on either side, which is over half the screen and is what it
       looked like — a phone screenshot pasted onto a desktop. */
    --page-max: 48rem;

    /* Spacing — 4px base. These are the only permitted steps. */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 20px;
    --s-6: 24px;
    --s-8: 32px;
    --s-10: 40px;
    --s-14: 56px;

    /* Radius — the prototype's: 8 for controls, 11 for cards, 14 for heroes */
    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 11px;
    --r-xl: 14px;
    --r-pill: 999px;

    /* Elevation — one shadow token for surfaces, one for the tab bar */
    --shadow-card: 0 1px 3px rgb(1 0 102 / 8%), 0 4px 12px rgb(1 0 102 / 6%);
    --shadow-bar: 0 -6px 18px rgb(0 0 0 / 5%);
    /* A tile under a thumb, and the small flags that sit on a photograph. */
    --shadow-lift: 0 2px 6px rgb(1 0 102 / 10%), 0 10px 24px rgb(1 0 102 / 10%);
    --shadow-chip: 0 1px 3px rgb(1 0 102 / 18%);
    --shadow-chip-strong: 0 1px 3px rgb(1 0 102 / 25%);
    --pack-shade: rgb(0 0 0 / 12%);  /* the darker base band on a pack placeholder */

    /* Minimum touch target — docs/design-tokens.md */
    --touch-min: 44px;
}

[dir="rtl"] {
    --font-latin: var(--font-arabic);
}

/*
 * Numbers, prices, SKUs, phone numbers and Latin brand names stay LTR
 * inside RTL text. Apply .ltr-inline to those spans.
 */
.ltr-inline {
    direction: ltr;
    unicode-bidi: isolate;
}

.mono {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
}

/*
 * MASApp theme, after the approved prototype (docs/masapp-prototype.html).
 * Every value comes from tokens.css — CI fails the build on a literal colour
 * anywhere in this file.
 *
 * Logical properties only. Arabic is a peer language, so there is no left and
 * right in this stylesheet: inline-start and inline-end flip with the document
 * direction and physical properties do not. The RTL grep in .gitlab-ci.yml
 * enforces it.
 *
 * 360px first. The prototype is a phone; wider screens get the same column,
 * centred, rather than a desktop layout the phone merely fits into.
 */

* { box-sizing: border-box; }

body {
    margin: 0;
    overflow-x: clip;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-latin);
    font-size: var(--t-body);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

body.is-shop { padding-block-end: calc(64px + env(safe-area-inset-bottom)); }

a { color: var(--navy); }

button, input, select, textarea { font-family: inherit; }

/* Every interactive thing clears the 44px floor in docs/design-tokens.md. */
.tap,
.btn,
.icon-tap,
.qty input,
.field input,
.field select {
    min-height: var(--touch-min);
}

:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}

/* ── App bar — the prototype's chrome ─────────────────────────────── */

.appbar {
    position: sticky;
    inset-block-start: 0;
    z-index: 9;
    background: var(--navy);
    color: var(--on-navy);
    padding: var(--s-2) var(--s-4) var(--s-3);
}

.appbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    min-height: 44px;
    max-width: var(--page-max);
    margin-inline: auto;
}

/* The partner panel's own bar.

   A partner arrives at a yellow door and signs in; every page behind it used
   to wear the navy of the shopfront, which belongs to whoever is buying.
   Carrying the door's colour the whole way through is how a panel says whose
   it is without a word on the screen — and it is why the one word up here can
   be navy on yellow rather than a pill stuck beside the mark.

   This file is inlined into every page, so a word written here is a word on
   the screen: four assertions have been broken by a comment before now. */
.appbar.is-partner {
    background: var(--partner-ground);
    color: var(--on-partner);
}

.appbar.is-partner .brandlock-word { color: var(--on-partner); }

.langbar.is-partner {
    background: var(--partner-ground-2);
    color: var(--on-partner-muted);
}

.langbar.is-partner a { color: var(--on-partner-muted); }
.langbar.is-partner a[aria-current] { color: var(--on-partner); }

.appbar-brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; }

.logoimg { display: block; block-size: 34px; inline-size: auto; max-inline-size: 190px; object-fit: contain; }

.appbar-tag {
    font-size: var(--t-micro);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--yellow);
    border-radius: var(--r-sm);
    padding: 2px var(--s-2);
    font-weight: var(--fw-strong);
}

.appbar-icons { display: flex; align-items: center; gap: var(--s-1); }

.icon-tap {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    color: var(--on-navy);
    border-radius: var(--r-md);
}

.icon-tap:focus-visible { outline-color: var(--yellow); }

.ic {
    inline-size: 22px;
    block-size: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.cartdot { position: relative; }

.cartdot .cartn {
    position: absolute;
    inset-block-start: 4px;
    inset-inline-end: 2px;
    min-width: 17px;
    padding: 1px 5px;
    border-radius: var(--r-pill);
    background: var(--yellow);
    color: var(--note-ink-strong);
    font-size: 9.5px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.deliverto {
    margin: var(--s-1) auto 0;
    max-width: var(--page-max);
    font-size: 11.5px;
    color: var(--on-navy-muted);
}

.deliverto b { color: var(--on-navy); font-weight: var(--fw-strong); }

.langbar {
    display: flex;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-1) var(--s-4);
    background: var(--navy-2);
    color: var(--on-navy-muted);
    font-size: 11.5px;
}

.langbar a {
    color: var(--on-navy-muted);
    text-decoration: none;
    display: inline-block;
    padding-block: var(--s-1);
}

.langbar a[aria-current] { color: var(--on-navy); font-weight: var(--fw-strong); }

.langs { display: inline-flex; gap: var(--s-2); align-items: center; }

/* Three languages a thumb apart.

   The words in this bar are a control, and a 26-pixel line of 11-point type
   is a miss waiting to happen. Growing an invisible target around each one
   was the first attempt and it does not work here: the app bar above is
   sticky and paints over anything this bar lets overflow upwards, so half the
   target was swallowed. The bar carries the height instead — the words stay
   the size they are, the bar's own padding comes off, and the chrome grows by
   ten pixels rather than the twice-as-tall it would otherwise have been. */
.langs a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--touch-min);
    padding-inline: var(--s-1);
}

.langbar {
    align-items: center;
    padding-block: 0;
}


/* Bottom tab bar, as on the prototype's phone. */
.tabbar {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 30;
    display: flex;
    justify-content: center;
    background: var(--white);
    border-block-start: 1px solid var(--line);
    box-shadow: var(--shadow-bar);
    padding: var(--s-2) 0 calc(var(--s-3) + env(safe-area-inset-bottom));
}

.tabbar a {
    flex: 1;
    max-width: 10rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-1);
    min-height: 44px;
    font-size: 10px;
    color: var(--ink-3);
    text-decoration: none;
}

.tabbar a.on { color: var(--navy); font-weight: var(--fw-strong); }

.tabbar a.on .ic { stroke-width: 2.1; }

/* Kept for the admin screens' own buttons and links. */
.tap {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-2) var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    font-size: var(--t-small);
}

.pill {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    padding: 0 var(--s-1);
    border-radius: var(--r-pill);
    background: var(--yellow);
    color: var(--note-ink-strong);
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
}

/* ── Page ─────────────────────────────────────────────────────────── */

.page {
    max-width: var(--page-max);
    margin-inline: auto;
    padding: var(--s-4) var(--s-4) var(--s-10);
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

/* One sans throughout. Headings are told apart from body text by weight and
   by tracking, not by a second face. */
h1, h2 {
    font-family: var(--font-display);
    font-weight: var(--fw-strong);
    text-wrap: balance;
    letter-spacing: var(--track-tight);
}

[dir="rtl"] h1, [dir="rtl"] h2 { font-family: var(--font-arabic); }

h1 { font-size: var(--t-display); line-height: 1.2; margin: 0; }
h2 { font-size: var(--t-title); line-height: 1.3; margin: 0 0 var(--s-3); }
h3 { font-size: var(--t-body); font-weight: var(--fw-strong); margin: 0 0 var(--s-2); }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: var(--s-4);
}

.muted { color: var(--ink-2); }
.small { font-size: var(--t-small); }

.notice {
    margin: 0;
    padding: var(--s-3) var(--s-4);
    background: var(--ink);
    color: var(--white);
    font-size: var(--t-small);
    text-align: center;
}

/* ── Money ────────────────────────────────────────────────────────── */

/* Prices in Fraunces, the prototype's .now. Stay LTR inside Arabic text —
   docs/07-functional-scope.md §6. */
.money {
    font-family: var(--font-display);
    font-weight: var(--fw-strong);
    font-variant-numeric: tabular-nums lining-nums;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

/* References are read aloud to support and typed into dashboards: mono. */
.ref {
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    direction: ltr;
    unicode-bidi: isolate;
    letter-spacing: 0.02em;
}

.price { font-size: var(--t-price); color: var(--ink); margin: 0; line-height: 1.2; }

.price-note { font-size: 11px; color: var(--ink-3); margin: 0; }

/* ── Product — the prototype's PDP ────────────────────────────────── */

.pdp { display: flex; flex-direction: column; margin-inline: calc(-1 * var(--s-4)); margin-block-start: calc(-1 * var(--s-4)); }

.pv {
    position: relative;
    display: grid;
    place-items: center;
    min-block-size: 250px;
    background: var(--stage);
    color: var(--ink-3);
}

.pv .pack {
    display: grid;
    place-items: center;
    inline-size: 96px;
    block-size: 120px;
    border-radius: var(--r-md);
    background: var(--navy);
    color: var(--white);
    font-family: var(--font-display);
    font-weight: var(--fw-strong);
    font-size: var(--t-small);
    text-align: center;
    padding: var(--s-2);
    box-shadow: inset 0 -18px 0 var(--pack-shade);
}

.pvflag {
    position: absolute;
    inset-block-start: var(--s-2);
    inset-inline-end: var(--s-2);
    font-size: var(--t-micro);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    padding: 2px var(--s-2);
    color: var(--ink-2);
}

.pdpbody {
    background: var(--white);
    padding: var(--s-4) var(--s-4) var(--s-3);
    border-block-end: 1px solid var(--line);
}

.pdp-crumb { padding: var(--s-3) var(--s-4) var(--s-2); background: var(--stage); margin: 0; }

.sellerline { font-size: var(--t-small); color: var(--navy); margin: 0 0 var(--s-2); }

/* Who makes it.

   A buyer deciding on a jar from a brand they have never heard of is deciding
   on the brand. So the mark, the name and the way into the shop sit together
   on one raised card, in that reading order: recognise, trust, go on. */
.sellerbar {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    margin-block: var(--s-2) var(--s-4);
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--stage);
    box-shadow: var(--shadow-card);
}

.seller-mark {
    flex: none;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    object-fit: contain;
    padding: var(--s-1);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--white);
}

.sellerbar-who {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1 1 auto;
    min-inline-size: 0;
}

.seller-name {
    font-family: var(--font-display);
    font-weight: var(--fw-strong);
    font-size: var(--t-body);
    color: var(--navy);
}

.seller-under { font-size: var(--t-small); color: var(--ink-3); }

/* A door, drawn as one: small, outlined, and filled the moment it is
   touched. */
.shop-link {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    padding: 7px var(--s-3);
    border: 1px solid var(--navy);
    border-radius: var(--r-pill);
    color: var(--navy);
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    text-decoration: none;
    white-space: nowrap;
}

.shop-link:hover,
.shop-link:focus-visible { background: var(--navy); color: var(--on-navy); }

/* On a phone the door drops under the name rather than squeezing it. */
@media (max-width: 26rem) {
    .sellerbar { flex-wrap: wrap; }
    .shop-link { inline-size: 100%; justify-content: center; }
}

.pdpbody h1 {
    font-family: var(--font-latin);
    font-size: 17px;
    line-height: 1.4;
    margin: 0 0 var(--s-2);
}

.pricerow { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; margin-block-start: var(--s-3); }

.deliv {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-3);
    margin-block: var(--s-3);
    font-size: var(--t-small);
    line-height: 1.6;
}

.deliv b { color: var(--red); }

.pane {
    background: var(--white);
    padding: var(--s-4);
    border-block-end: 1px solid var(--line);
}

.pane h2 { font-size: 18px; margin: 0 0 var(--s-2); }

.pane p { font-size: var(--t-body); line-height: 1.75; color: var(--ink-soft); margin: 0 0 var(--s-3); }

.spec > div {
    display: flex;
    justify-content: space-between;
    gap: var(--s-4);
    padding-block: var(--s-3);
    border-block-end: 1px solid var(--line);
    font-size: 13px;
}

.spec > div:last-child { border-block-end: 0; }

.spec span:first-child { color: var(--ink-3); }

/* The buy bar sits above the tab bar, always in reach of a thumb. */
.buybar {
    position: sticky;
    inset-block-end: calc(64px + env(safe-area-inset-bottom));
    z-index: 12;
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    background: var(--white);
    border-block-start: 1px solid var(--line);
}

.buybar .p { flex: 1; display: flex; flex-direction: column; }
.buybar small { font-size: var(--t-micro); color: var(--ink-3); }
.buybar .money { font-size: 19px; }
.buybar .btn { inline-size: auto; }

.qty { display: flex; align-items: center; gap: var(--s-2); }

.qty input {
    inline-size: 4rem;
    padding: var(--s-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    font: inherit;
    text-align: center;
    background: var(--surface);
    color: var(--ink);
}

.visually-hidden {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    inline-size: 100%;
    padding: var(--s-3) var(--s-5);
    border: 0;
    border-radius: var(--r-md);
    background: var(--navy);
    color: var(--white);
    font: inherit;
    font-size: var(--t-body);
    font-weight: var(--fw-strong);
    cursor: pointer;
    text-decoration: none;
}

.btn:active { background: var(--navy-2); }
.btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.btn[disabled] { background: var(--ink-3); cursor: not-allowed; }

.btn-quiet {
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--line);
}

.btn-accent { background: var(--yellow); color: var(--note-ink-strong); }

/* ── Trust panel on product and shop pages ────────────────────────── */

.trust { display: flex; flex-direction: column; gap: var(--s-3); }

.trust ul { margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }

.trust li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--s-3);
    align-items: start;
    list-style: none;
    font-size: 13px;
    color: var(--ink-2);
}

.trust .dot {
    inline-size: 8px;
    block-size: 8px;
    margin-block-start: var(--s-2);
    border-radius: var(--r-pill);
    background: var(--red);
}

/* ── Lines: cart, order and remittance-shaped lists ───────────────── */

.lines { display: flex; flex-direction: column; }

.line {
    display: flex;
    gap: var(--s-4);
    align-items: baseline;
    justify-content: space-between;
    padding-block: var(--s-2);
    font-size: 13px;
    color: var(--ink-2);
    border-block-end: 1px solid var(--line);
}

.line:last-child { border-block-end: 0; }

.line-total {
    border-block-start: 1px solid var(--line);
    border-block-end: 0;
    margin-block-start: var(--s-2);
    padding-block-start: var(--s-3);
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: var(--fw-strong);
    color: var(--ink);
}

.line-total .money { font-size: 19px; color: var(--ink); }

/* The seller's money screen: one figure, then what makes it up. */
.figure { font-family: var(--font-display); font-size: 30px; font-weight: var(--fw-strong); color: var(--ink); margin-block: 0 var(--s-2); }
.money-line { border-block-end: 1px solid var(--line); }
.money-line:last-of-type { border-block-end: 0; }
.money-line > summary { display: flex; gap: var(--s-3); align-items: center; justify-content: space-between; padding-block: var(--s-3); cursor: pointer; }
.money-line > summary::-webkit-details-marker { display: none; }
.money-line-head { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.money-line-figures { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }

/* Cart items: thumbnail well, name, meta — the prototype's .citem. */
.citem {
    display: flex;
    gap: var(--s-3);
    padding: var(--s-3);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.citem + .citem { margin-block-start: var(--s-2); }

.citem .th {
    flex: none;
    display: grid;
    place-items: center;
    inline-size: 64px;
    block-size: 64px;
    border-radius: var(--r-md);
    background: var(--stage);
    color: var(--ink-3);
    font-size: var(--t-micro);
    text-align: center;
}

.citem .b { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.citem h4 { margin: 0; font-size: 13px; font-weight: var(--fw-medium); line-height: 1.35; }
.citem .m { font-size: 11px; color: var(--ink-3); }
.citem .money { font-size: 15px; }

/* ── Forms ────────────────────────────────────────────────────────── */

/* The way back, at the top of every page that has one.

   It was a line of 16-pixel text, which is a thumb-sized miss on a phone.
   The words stay the size they were; the target around them does not. */
.back-link {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--touch-min);
    padding-inline-end: var(--s-2);
}

/* A form is a column, not a page.

   Faizal, 3 October 2026, on the questions card: *button dan tulisan kita tak
   well arrange.* On a laptop every box ran the full width of the card — a
   704-pixel runway to type "14" into, and a label at one end of the screen
   with its answer at the other. A form reads as a form at a column's width,
   and the same bound tidies every screen in the panel rather than this one
   card. Nothing changes on a phone, where the column was never the problem. */
.fields {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    max-inline-size: 44rem;
}

/* And on a wide screen a number needs less than that: two digits in a box as
   wide as a paragraph reads as a mistake the partner has not made yet.
   Only on a wide screen. On a phone the column is already short, and capping
   it there just left the number boxes ending 20 pixels before every other
   field on the card. */
@media (min-width: 40rem) {
    .fields .with-unit { max-inline-size: 18rem; }
}

.field { display: flex; flex-direction: column; gap: var(--s-1); }

.field label { font-size: var(--t-small); font-weight: var(--fw-strong); color: var(--ink); }

.field input,
.field select,
.field textarea {
    padding: var(--s-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    font: inherit;
    font-size: var(--t-body);
    background: var(--white);
    color: var(--ink);
    inline-size: 100%;
}

.field .hint { font-size: 11.5px; color: var(--ink-3); }

/* ── States ───────────────────────────────────────────────────────── */

.empty {
    text-align: center;
    padding: var(--s-14) var(--s-6);
    color: var(--ink-3);
    font-size: 13.5px;
    line-height: 1.6;
}

.empty h2, .empty h3 { font-family: var(--font-display); color: var(--ink); font-size: 18px; margin: 0 0 var(--s-2); }

.problem {
    padding: var(--s-4);
    border: 1px solid var(--danger);
    border-inline-start-width: 4px;
    border-radius: var(--r-lg);
    background: var(--white);
}

.problem h2 { color: var(--danger); }

.problem p { margin: 0 0 var(--s-2); }

.waiting { text-align: center; padding: var(--s-10) var(--s-5); }

/* The prototype's yellow note: promotions, guidance, gentle warnings. */
.warn, .promo {
    padding: var(--s-3);
    background: var(--note-bg);
    border: 1px solid var(--note-line);
    border-radius: var(--r-md);
    color: var(--note-ink);
    font-size: var(--t-small);
    line-height: 1.55;
}

/* ── Ops: fee rates ───────────────────────────────────────────────── */

.rate {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--s-2) var(--s-4);
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--white);
}

.rate + .rate { margin-block-start: var(--s-2); }

.rate .when { grid-column: 1 / -1; font-size: var(--t-small); color: var(--ink-2); }

.tag {
    display: inline-block;
    padding: 2px var(--s-2);
    border-radius: var(--r-sm);
    font-size: var(--t-micro);
    font-weight: var(--fw-strong);
}

.tag-active { background: var(--success); color: var(--white); }
.tag-scheduled { background: var(--yellow); color: var(--note-ink-strong); }
.tag-ended { background: var(--stage); color: var(--ink-2); }

/* Where a parcel has got to, on a buyer's own order list. Delivered is
   settled and quiet; on its way is the one worth looking for. */
.tag-paid,
.tag-dispatched,
.tag-delivered { align-self: flex-start; }
.tag-paid { background: var(--stage); color: var(--ink-2); }
.tag-dispatched { background: var(--navy); color: var(--on-navy); }
.tag-delivered { background: var(--success); color: var(--white); }
/* Sponsored (Rule 4.8): a label that reads as a label, not as a deal. */
.tag-sponsored { background: var(--note-bg); color: var(--note-ink-strong); border: 1px solid var(--note-line); align-self: flex-start; margin-block-end: var(--s-1); }

/* ── Home after noon (2026-09-14) ─────────────────────────────────── */

/* Every aisle as a photo tile, in two rows that scroll sideways. */
.cat-tiles {
    display: grid;
    grid-template-columns: repeat(7, 78px);
    gap: var(--s-3) 10px;
    overflow-x: auto;
    margin-inline: calc(-1 * var(--s-4));
    margin-block-start: calc(-1 * var(--s-4));
    padding: 14px var(--s-4);
    background: var(--white);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.cat-tiles::-webkit-scrollbar { display: none; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--ink-2); text-align: center; text-decoration: none; scroll-snap-align: start; }
.cat-tile > span:last-child { font-size: 10.5px; line-height: 1.25; }
.cat-photo {
    display: flex; align-items: center; justify-content: center;
    inline-size: 78px; block-size: 78px; overflow: hidden;
    border-radius: var(--r-lg); background: var(--stage); color: var(--navy);
}
.cat-photo .disc-photo { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.cat-photo .ic { inline-size: 30px; block-size: 30px; }
.cat-photo-ops { inline-size: 56px; block-size: 56px; flex: none; }
.category-head { display: flex; align-items: center; gap: var(--s-3); }
.category-head-text { flex: 1; min-inline-size: 0; }
.category-head-text h2 { margin: 0; }
.category-head-text p { margin: 0; }
.cat-tile-deals > span:last-child { color: var(--red); font-weight: var(--fw-strong); }
.cat-tile:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: var(--r-lg); }

/* The campaign masthead: the season, edge to edge, with its name set across it.

   Faizal, 5 October 2026: *size ini patut fit to screen dan xperlu ada gap*.
   The page is a 48rem column with a gutter; this one thing breaks out of both
   and runs the full width of the screen, flush under the header.

   Its drawing is made with the middle left open, so the name lands on clean
   colour however wide the screen is, and the doodles run out to both ends.
   Nothing here is a gradient: a season is a solid colour with a drawing on it
   (docs/design-tokens.md). */
/* The strips across the top of the page.

   It was one element because it answered one question — which season the shop
   is wearing, and the tiles can only wear one frame. What is running is a
   different question: a national day inside a month of spring offers is two
   true things, and the second had nowhere to be said.

   So the breakout to the full width of the screen belongs to the row, and
   each strip is an item in it. With one season it is exactly what it was: one
   strip, edge to edge, no gap. With two the next one peeks in, which is the
   only thing that says it is there. */
.mastheads {
    inline-size: 100vw;
    margin-inline: calc(50% - 50vw);
    margin-block-start: calc(-1 * var(--s-4));
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 94%;
    gap: var(--s-2);
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: inline mandatory;
    overscroll-behavior-inline: contain;
}
.mastheads::-webkit-scrollbar { display: none; }
.mastheads:has(> .masthead:only-child) { grid-auto-columns: 100%; gap: 0; }
.mastheads > .masthead { scroll-snap-align: center; }

.masthead {
    position: relative;
    display: block;
    overflow: hidden;
    min-block-size: clamp(11rem, 27vw, 17rem);
    text-decoration: none;
    isolation: isolate;
}
.masthead-yellow { background: var(--yellow); color: var(--navy); }
.masthead-red { background: var(--red); color: var(--white); }
.masthead-navy { background: var(--navy); color: var(--on-navy); }
.masthead-green { background: var(--success); color: var(--white); }

.masthead-art {
    position: absolute;
    inset: 0;
    z-index: -1;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    object-position: center;
    /* Breathing rather than moving: the drawing drifts a little wider while
       somebody is on the page, which is what makes a flat colour look alive.
       Switched off entirely for anybody who asked for less motion. */
    animation: masthead-breathe 24s ease-in-out infinite;
}
.masthead:hover .masthead-art,
.masthead:focus-visible .masthead-art { transform: scale(1.04); }

@keyframes masthead-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.masthead-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-1);
    padding: var(--s-5) var(--s-4);
    text-align: center;
}

/* The name is the campaign. Set in the display face, as large as the strip
   will carry, with a halo of the season's own colour so it stays legible
   wherever a doodle lands under it. */
.masthead-name {
    font-family: var(--font-display);
    font-size: clamp(26px, 7vw, 46px);
    font-weight: var(--fw-strong);
    line-height: 1.05;
    letter-spacing: var(--track-tight);
    text-transform: uppercase;
    text-wrap: balance;
    text-shadow:
        0 0 4px var(--on-season-halo),
        0 0 14px var(--on-season-halo),
        0 0 28px var(--on-season-halo);
}
.masthead-yellow { --on-season-halo: var(--yellow); }
.masthead-red { --on-season-halo: var(--red); }
.masthead-navy { --on-season-halo: var(--navy); }
.masthead-green { --on-season-halo: var(--success); }

.masthead-said {
    max-inline-size: 30rem;
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    line-height: 1.35;
    text-wrap: balance;
}
.masthead-until {
    padding: 3px var(--s-3);
    border-radius: var(--r-pill);
    font-size: var(--t-micro);
    font-weight: var(--fw-strong);
    background: var(--navy);
    color: var(--on-navy);
}
.masthead-navy .masthead-until { background: var(--yellow); color: var(--navy); }
.masthead:focus-visible { outline: 3px solid var(--ink); outline-offset: -4px; }

:lang(ar) .masthead-name { font-family: var(--font-arabic); letter-spacing: 0; }

@media (prefers-reduced-motion: reduce) {
    .masthead-art { animation: none; }
    .masthead:hover .masthead-art,
    .masthead:focus-visible .masthead-art { transform: none; }
}

@media (min-width: 48rem) {
    .masthead-in { padding-block: var(--s-8); }
}

/* Ask MASApp: somebody on the shop floor who knows the whole shelf.

   Faizal, 6 October 2026. It sits above the aisle rather than inside the
   header, because it is not the search box: search finds the word you typed,
   this one reads the shelf and chooses. It should look like being served, so
   it gets the one raised navy card on the page and the shop's own yellow on
   the button.

   No script: a form, a GET and a page that comes back with four products on
   it. The answer is a URL, which is the cheapest thing in the world to send
   somebody. */
.askbar {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-4);
    border-radius: var(--r-xl);
    background: var(--navy);
    color: var(--on-navy);
    box-shadow: var(--shadow-card);
}
.askbar-said { display: flex; flex-direction: column; gap: 2px; }
.askbar-who {
    font-family: var(--font-display);
    font-size: var(--t-title);
    font-weight: var(--fw-strong);
    letter-spacing: var(--track-tight);
}
.askbar-lead { font-size: var(--t-small); color: var(--on-navy-soft); }

.askbar-row { display: flex; gap: var(--s-2); align-items: stretch; }
.askbar-row input {
    flex: 1;
    min-inline-size: 0;
    padding: 11px var(--s-3);
    border: 0;
    border-radius: var(--r-md);
    background: var(--white);
    color: var(--ink);
    font-size: var(--t-body);
}
.askbar-row .btn { inline-size: auto; flex: 0 0 auto; }

/* What somebody might ask, as four things they can press instead of typing —
   the demo of the feature is the feature. */
.askbar-tries { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.askbar-tries a {
    padding: 5px var(--s-3);
    border: 1px solid var(--on-navy-muted);
    border-radius: var(--r-pill);
    font-size: var(--t-micro);
    color: var(--on-navy);
    text-decoration: none;
}
.askbar-tries a:hover { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.askbar-tries a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* The answer: a line, then real tiles. Set apart from the aisle below it so
   nobody reads four chosen products as the start of the grid. */
.asked {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    padding: var(--s-4);
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    background: var(--white);
}
.asked-said {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--t-title);
    line-height: 1.3;
    font-weight: var(--fw-strong);
    text-wrap: balance;
}
/* Said plainly, every time, because a shopper is entitled to know that a
   machine chose these and that the figures on them did not come from it. */
.asked-who { margin: 0; font-size: var(--t-micro); color: var(--ink-3); }

/* Miera, the shop assistant.

   Faizal, 6 October 2026: *macam kita buat dekat application.masagroup.ae*,
   and *make miera as a floating circle bubbles at side and only open when
   user press it.* So she waits as a face in a circle at the side of the
   product, and the conversation is behind a press.

   One details element is both: closed it is the circle, open it is the panel,
   and the summary is the circle's face in one state and the panel's header in
   the other. No script anywhere — the press is the browser's own.

   Once somebody has asked something it stays open, because the answer arrives
   on a fresh page and a panel that shut itself would hide the thing they
   asked for.

   It sits above the buy bar and the tab bar, never over them: a face parked
   over the button somebody came to press is a face that costs a sale. */
.agent {
    position: fixed;
    inset-inline-end: var(--s-4);
    inset-block-end: calc(64px + 4.5rem + env(safe-area-inset-bottom));
    z-index: 30;
    inline-size: 3.5rem;
    border-radius: 50%;
    overflow: visible;
    scroll-margin-block-start: var(--s-6);
}
.agent > summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 3.5rem;
    block-size: 3.5rem;
    padding: 0;
    border-radius: 50%;
    background: var(--navy);
    color: var(--on-navy);
    box-shadow: var(--shadow-lift);
    cursor: pointer;
    list-style: none;
}
.agent[open] > summary { overflow: hidden; }
.agent > summary::-webkit-details-marker { display: none; }
/* Closed, she is only a face. The name and the fold belong to the header the
   summary becomes once it is open. */
.agent:not([open]) .agent-who,
.agent:not([open]) .agent-fold { display: none; }
.agent:not([open]) .agent-face { inline-size: 100%; block-size: 100%; border-radius: 50%; }

/* What she says while she is waiting.

   Faizal, 6 October 2026: the circle should notice what somebody is doing and
   change what it offers.

   Every line is already in the page; this decides which one shows. She opens
   with the plain one, and after six seconds — long enough to have read
   something and not yet asked — she offers help instead. Where the browser can
   tell her what is on screen, she says something about that.

   None of it is script. The clock is an animation delay, and the noticing is a
   view timeline, which is CSS asking the browser what is in the viewport. */
.agent-nudge {
    position: absolute;
    inset-inline-end: calc(100% + var(--s-2));
    inline-size: max-content;
    max-inline-size: 13rem;
    padding: 7px var(--s-3);
    border-radius: var(--r-lg);
    background: var(--white);
    color: var(--ink);
    font-size: var(--t-micro);
    font-weight: var(--fw-strong);
    line-height: 1.35;
    text-align: start;
    box-shadow: var(--shadow-lift);
    opacity: 0;
    pointer-events: none;
}
.agent[open] .agent-nudge { display: none; }

/* The first six seconds, then the offer. Each is one switch with a delay:
   nothing is hidden that the page has not already sent. */
.agent-nudge-first { animation: nudge-while 6s linear both; }
.agent-nudge-wait { animation: nudge-from 1ms linear both; animation-delay: 6s; }

@keyframes nudge-from {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes nudge-while {
    0%, 99.9% { opacity: 1; }
    100% { opacity: 0; }
}

/* And what she says when the browser can tell her what is being read.

   A view timeline is the section itself reporting whether it is on screen, so
   the line follows the reader rather than a clock. Where this is not
   supported none of it applies and the six-second line stands, which is why
   there is one. */
@supports (animation-timeline: view()) {
    .reading-letter { view-timeline-name: --reading-letter; }
    .reading-reviews { view-timeline-name: --reading-reviews; }
    .reading-specs { view-timeline-name: --reading-specs; }

    /* Lifted to the page, because she does not live inside any of them. */
    body { timeline-scope: --reading-letter, --reading-reviews, --reading-specs; }

    /* Only while the stretch is properly on screen, not the moment its first
       line appears at the bottom. Without the range two of them are in view at
       once on a tall screen and both try to speak. */
    .agent-nudge-letter,
    .agent-nudge-reviews,
    .agent-nudge-specs {
        animation: nudge-seen linear both;
        animation-range: cover 30% cover 70%;
    }
    .agent-nudge-letter { animation-timeline: --reading-letter; }
    .agent-nudge-reviews { animation-timeline: --reading-reviews; }
    .agent-nudge-specs { animation-timeline: --reading-specs; }

    /* While one of them is on screen it is hers to speak, and it sits over the
       timed pair: two voices at once is two bubbles on top of each other. */
    .agent-nudge-letter,
    .agent-nudge-reviews,
    .agent-nudge-specs { z-index: 1; }

    @keyframes nudge-seen {
        0%, 100% { opacity: 0; }
        18%, 82% { opacity: 1; }
    }
}

/* A ring that keeps breathing, and a face that rocks a little with it.

   Enough to be caught out of the corner of an eye, slow enough not to nag:
   four seconds apart, and the movement lasts half a second of that. A thing
   that jumps about in the corner of a shop is a thing people stop seeing. */
.agent:not([open]) > summary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 var(--yellow);
    animation: agent-notice 4s ease-out 1.2s infinite;
}
@keyframes agent-notice {
    0% { box-shadow: 0 0 0 0 var(--yellow); opacity: .75; }
    35%, 100% { box-shadow: 0 0 0 1rem var(--yellow); opacity: 0; }
}

.agent:not([open]) .agent-face { animation: agent-rock 4s ease-in-out 1.2s infinite; }
@keyframes agent-rock {
    0%, 14%, 100% { transform: none; }
    4% { transform: rotate(-6deg) scale(1.06); }
    9% { transform: rotate(6deg) scale(1.06); }
}

/* Open, she stays a panel in the corner and never a page.
   Faizal, 6 October 2026: *not expand to much and also not blocking the pages
   to much.* So the panel is capped at a fraction of the screen and the talk
   inside it scrolls — the product, its price and its picture stay visible
   behind her, which is the whole point of answering a question about them. */
.agent[open] {
    inline-size: min(21rem, calc(100vw - 2 * var(--s-4)));
    max-block-size: min(30rem, 62vh);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-lift);
}
.agent[open] > summary { flex: none; }
.agent[open] .agent-talk { flex: 1; min-block-size: 0; overflow-y: auto; }
.agent[open] > summary {
    inline-size: auto;
    block-size: auto;
    justify-content: flex-start;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    border-radius: 0;
    box-shadow: none;
}

.agent-face {
    flex: none;
    inline-size: 2.6rem;
    block-size: 2.6rem;
    border-radius: 50%;
    object-fit: cover;
    background: var(--yellow);
}
.agent-face-letter {
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: var(--t-title);
    font-weight: var(--fw-strong);
    color: var(--navy);
}
.agent-who { display: flex; flex-direction: column; line-height: 1.25; min-inline-size: 0; }
.agent-who b { font-size: var(--t-body); }
/* She says what she is beside her own name: a face makes somebody assume a
   person unless they are told otherwise. */
.agent-who span { font-size: var(--t-micro); color: var(--on-navy-muted); }
.agent-fold {
    margin-inline-start: auto;
    inline-size: .7rem;
    block-size: .7rem;
    border-inline-end: 2px solid var(--on-navy-muted);
    border-block-end: 2px solid var(--on-navy-muted);
    transform: rotate(45deg);
}
/* The borders are logical and flip on their own; the rotation is not and does
   not, so in Arabic this pointed left and read as "back" rather than "close". */
:dir(rtl) .agent-fold { transform: rotate(-45deg); }

.agent-talk { padding: var(--s-3) var(--s-4) var(--s-4); background: var(--surface); }

/* THE BOX STACKS UPWARDS.

   Faizal, 6 October 2026: *make sure chat is showing the answer without need
   to scroll.* The markup is newest first and this turns it back the right way
   up — and a column-reverse box starts scrolled at what is, visually, the
   bottom. So the newest message is on screen the moment the page is, it stays
   there while the rest of the answer arrives underneath it, and no script is
   involved in either. */
.agent-chat {
    list-style: none;
    margin: 0 0 var(--s-3);
    padding: 0;
    display: flex;
    flex-direction: column-reverse;
    /* The box keeps its room while the first messages are still arriving, so
       the page under it does not shuffle downwards. */
    min-block-size: 6rem;
    max-block-size: min(15rem, 34vh);
    overflow-y: auto;
}
/* The space between bubbles is a margin and the padding is the bubble's, not
   the row's: a message that has not arrived yet must take no room at all, and
   a gap would keep its room for it. */
.agent-chat li {
    max-inline-size: 85%;
    position: relative;
    overflow: hidden;
    padding: 0;
    flex: none;
    margin-block-end: var(--sp, .45rem);
}
/* First in the markup is last on the screen, and the gap below it is the one
   that would push the stack off its own bottom. */
.agent-chat li:first-child { --sp: 0; }
.agent-chat p {
    margin: 0;
    padding: .55rem .8rem;
    font-size: var(--t-small);
    line-height: 1.5;
    border-radius: var(--r-lg);
}
.from-masapp { align-self: flex-start; }
.from-masapp p { background: var(--white); color: var(--ink); border-start-start-radius: 3px; }
.from-you { align-self: flex-end; }
.from-you p { background: var(--navy); color: var(--on-navy); border-start-end-radius: 3px; }
/* Said it will check rather than guessed. Not an error — a different kind of
   answer, and it should not look like something went wrong. */
.from-masapp.unsure p { background: var(--note-bg); color: var(--note-ink); box-shadow: inset 0 0 0 1px var(--note-line); }

.agent-chat li.agent-asks { max-inline-size: 100%; overflow: visible; }
.agent-chips { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.agent-chips form { margin: 0; }
/* A chip is a thing you aim a thumb at, so it clears the 44px floor in
   docs/design-tokens.md like everything else that can be pressed. It was 28px
   high — the smallest target anywhere in the panel, on the surface most likely
   to be used on a phone. */
.agent-chip {
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
    padding: .38rem .9rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--white);
    color: var(--navy);
    font: inherit;
    font-size: var(--t-micro);
    line-height: 1.3;
    text-align: start;
    cursor: pointer;
}
.agent-chip:hover { border-color: var(--navy); }
.agent-more { margin-block-start: var(--s-1); }
.agent-more > summary { display: inline-block; font-size: var(--t-micro); color: var(--ink-3); cursor: pointer; list-style: none; }
.agent-more > summary::-webkit-details-marker { display: none; }
.agent-more .agent-chips { margin-block-start: var(--s-1); }

/* What she pointed at, drawn by the catalogue. */
/* What she says would carry the basket over the line: two or three real
   tiles inside her own bubble, small enough to read as part of what she said
   rather than as the shop starting again underneath her. */
.agent-shelf {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 46%;
    gap: var(--s-2);
    margin-block: var(--s-2);
    overflow-x: auto;
    scrollbar-width: none;
}
.agent-shelf::-webkit-scrollbar { display: none; }

/* The close, as something she says.

   Faizal, 6 October 2026: the panel under the conversation looked generic, and
   the button should only turn up when it is wanted. So the offer is one of her
   own bubbles — her words, then the button, then the one line that answers
   what somebody is actually weighing, which is the risk and not the price.

   It is her bubble, so it keeps her bubble's shape and ground. The button is
   the shop's own colour; she does not get a louder one than the page has. */
.agent-chat li.agent-offer { max-inline-size: 92%; }
.agent-offer p:first-child { margin-block-end: var(--s-2); }
.agent-offer form { margin: 0; }
.agent-until {
    display: block;
    margin-block-start: 3px;
    font-size: var(--t-micro);
    font-weight: var(--fw-strong);
    color: var(--red);
}
.agent-buy {
    inline-size: 100%;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--s-2);
    padding: 11px var(--s-3);
    border: 0;
    border-radius: var(--r-md);
    background: var(--navy);
    color: var(--on-navy);
    font: inherit;
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    cursor: pointer;
}
.agent-buy:hover { background: var(--navy-2); }
/* The way on, in her own last bubble: saying yes and going to pay are one
   thought, not two screens. A link rather than a form, because nothing is
   being changed by pressing it. */
.agent-onward { margin-block-start: var(--s-2); text-decoration: none; }
.agent-buy span { font-variant-numeric: tabular-nums; opacity: .85; }
.agent-offer .agent-trust {
    margin: var(--s-2) 0 0;
    font-size: var(--t-micro);
    line-height: 1.4;
    color: var(--ink-3);
}

.agent-form { display: flex; gap: var(--s-2); align-items: flex-end; }
.agent-form textarea {
    flex: 1 1 auto;
    min-inline-size: 0;
    /* Two lines, because the invitation written in it is two lines wide and a
       box that cuts its own placeholder in half invites nothing. */
    min-block-size: 3.75rem;
    max-block-size: 7rem;
    padding: .6rem .95rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--white);
    font-size: var(--t-small);
    resize: vertical;
}
/* The send control is a mark on a disc, not a sentence.

   Faizal, 18 October 2026: the row is 302 pixels on a phone and "Ask Miera"
   was taking 105 of them, leaving 189 for the question — a box whose own
   placeholder wrapped onto a second line it was too short to show. The words
   stay as the button's name, where a screen reader reads them out. */
.agent-send {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: var(--touch-min);
    block-size: var(--touch-min);
    padding: 0;
    border: 0;
    border-radius: var(--r-pill);
    background: var(--navy);
    color: var(--on-navy);
    cursor: pointer;
    transition: background-color 120ms ease, transform 120ms ease;
}
.agent-send .mk { inline-size: 1.25em; block-size: 1.25em; }
.agent-send:active { transform: scale(.94); }
.agent-send:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
/* Read, not skimmed past. This is the line that says where her answers come
   from, and at --ink-3 it measured 3.82:1 against the panel — under the 4.5
   small text has to clear, which made the disclosure the least legible thing
   on a screen built to be trusted. */
.agent-foot { margin: var(--s-2) 0 0; font-size: var(--t-micro); line-height: 1.45; color: var(--ink-2); }
.agent-clear { margin: var(--s-1) 0 0; text-align: center; }
.agent-again {
    border: 0;
    background: none;
    padding: var(--s-1);
    font: inherit;
    font-size: var(--t-micro);
    color: var(--ink-3);
    text-decoration: underline;
    cursor: pointer;
}
.agent-err { margin: 0 0 var(--s-2); color: var(--danger); font-size: var(--t-small); }

/* She types.

   An answer arrives as a few short messages, one after another, after a pause
   with the three dots showing — the way a person replies on a phone, not as
   one wall of text and not as bubbles that all appear together.

   Every message is already in the page. What is animated is only the moment
   each is shown, and the page worked that moment out and handed it over in
   --at, because a stylesheet cannot count words. An animation one millisecond
   long is a switch: held shut by the backwards fill for the whole delay, open
   from then on by the forwards one. Linear and not step-end — what a step
   easing holds during a forwards fill is read differently by different
   browsers, and in Chrome it held every message shut for good.

   With animation off, or the stylesheet half loaded, every message is simply
   there. Nothing is hidden that the page has not already sent. */
.agent-chat li.typed {
    animation: agent-lands 1ms linear both;
    animation-delay: var(--at, 0ms);
}
@keyframes agent-lands {
    from { max-block-size: 0; margin-block-end: 0; opacity: 0; }
    to { max-block-size: 60rem; margin-block-end: var(--sp, .45rem); opacity: 1; }
}

/* The dots are the other way round: there from the start, and gone the
   instant the first message lands in the place they were standing in. */
.agent-chat li.agent-dots.typed {
    animation: agent-waits 1ms linear both;
    animation-delay: var(--at, 0ms);
}
@keyframes agent-waits {
    from { max-block-size: 60rem; margin-block-end: var(--sp, .45rem); opacity: 1; }
    to { max-block-size: 0; margin-block-end: 0; opacity: 0; }
}

.agent-dots p { display: flex; gap: .25rem; padding: .7rem .8rem; background: var(--white); border-start-start-radius: 3px; }
.agent-dots span {
    inline-size: .42rem;
    block-size: .42rem;
    border-radius: 50%;
    background: var(--ink-3);
    animation: agent-blink 1.2s ease-in-out infinite;
}
.agent-dots span:nth-child(2) { animation-delay: .2s; }
.agent-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes agent-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

/* Asked not to be animated at: the whole answer is there on arrival, and the
   dots — which only ever stood in for a message — are not shown at all. */
@media (prefers-reduced-motion: reduce) {
    .agent-chat li.agent-dots { display: none; }
    .agent-chat li.typed { animation: none; }
    .agent:not([open]) > summary::after { animation: none; }
    .agent:not([open]) .agent-face { animation: none; }
    /* The line she opens with, and no changing of it. */
    .agent-nudge { animation: none; }
    .agent-nudge-first { opacity: 1; }
}

/* Banners: swipe, the next peeks in. */
.banners {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    gap: var(--s-3);
    overflow-x: auto;
    margin-inline: calc(-1 * var(--s-4));
    padding: var(--s-1) var(--s-4) var(--s-2);
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--s-4);
    scrollbar-width: none;
}
.banners::-webkit-scrollbar { display: none; }
.banners:has(> .banner:only-child) { grid-auto-columns: 100%; }
.banner {
    position: relative; overflow: hidden; display: block;
    min-block-size: 168px; padding: var(--s-4) var(--s-5);
    border-radius: var(--r-xl); text-decoration: none; scroll-snap-align: start;
}
.banner-navy { background: var(--navy); color: var(--white); }
.banner-yellow { background: var(--yellow); color: var(--note-ink-strong); }
.banner-red { background: var(--red); color: var(--white); }
.banner-green { background: var(--success); color: var(--white); }
.banner-green .eyebrow { color: var(--yellow); }
.banner .flagbar { inline-size: 18px; }
.banner-art { position: absolute; inset-block-end: 4px; inset-inline-end: 22px; inline-size: 116px; block-size: 116px; object-fit: contain; pointer-events: none; }
.banner .in { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; max-inline-size: 60%; }
.banner .eyebrow { font-size: 11px; font-weight: var(--fw-strong); }
.banner-navy .eyebrow { color: var(--yellow); }
.banner-red .eyebrow { color: var(--yellow); }
.banner-title { font-family: var(--font-display); font-size: 18px; line-height: 1.2; font-weight: var(--fw-strong); text-wrap: balance; }
:lang(ar) .banner-title { font-family: var(--font-arabic); }
.banner-text { font-size: 12px; line-height: 1.45; opacity: .9; }
.banner-cta { margin-block-start: var(--s-1); padding: 7px 13px; border-radius: var(--r-md); font-size: 12.5px; font-weight: var(--fw-strong); background: var(--yellow); color: var(--note-ink-strong); }
.banner-yellow .banner-cta { background: var(--navy); color: var(--white); }
.banner:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* The post room: a letter as it was sent.

   Pre rather than a paragraph, because what went out had line breaks in it
   and the point of this screen is to read exactly what somebody received —
   not a tidied version of it. It wraps, so a long URL does not push the page
   sideways. */
.letter-said {
    margin: 0;
    padding: var(--s-3);
    border-radius: var(--r-md);
    background: var(--surface);
    font-family: var(--font-latin);
    font-size: var(--t-small);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.tag-post-sent { background: var(--success); color: var(--white); }
.tag-post-failed { background: var(--danger); color: var(--white); }
.tag-post-sending { background: var(--yellow); color: var(--note-ink-strong); }

/* Coupons: a ticket with its code. */
.coupons { display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: var(--s-3); overflow-x: auto; margin-inline: calc(-1 * var(--s-4)); padding: 0 var(--s-4) var(--s-2); scrollbar-width: none; }
.coupons::-webkit-scrollbar { display: none; }
.coupons-stack { grid-auto-flow: row; grid-auto-columns: auto; margin-inline: 0; padding: 0; }
/* The one thing on this page a reader is meant to take away, drawn as quietly
   as a hairline box — Faizal, 18 October 2026, with noon's home page open
   beside ours. Raised now: off the ground on a shadow, the saving leading at
   the size a price leads at, and the code a solid object rather than a tint.

   No `overflow: hidden` on this element, ever. The notches are cut outside
   its own box and an overflow rule added for something else takes them with
   it, which has happened once already. */
.coupon {
    position: relative; display: flex; flex-direction: column; gap: 3px;
    padding: var(--s-4); border-radius: var(--r-lg);
    background: var(--white); border: 1px dashed var(--line-strong);
    box-shadow: var(--shadow-card);
    color: var(--ink); text-decoration: none;
    transition: box-shadow 140ms ease, transform 140ms ease;
}
a.coupon:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.coupon::before, .coupon::after { content: ""; position: absolute; inset-block-start: 50%; inline-size: 14px; block-size: 14px; margin-block-start: -7px; border-radius: var(--r-pill); background: var(--surface); border: 1px dashed var(--line-strong); }
.coupon::before { inset-inline-start: -8px; }
.coupon::after { inset-inline-end: -8px; }
.coupon-saving {
    display: flex; align-items: center; gap: var(--s-2);
    font-family: var(--font-display); font-size: var(--t-price); font-weight: var(--fw-strong);
    line-height: 1.05; letter-spacing: var(--track-tight); color: var(--red);
}
.coupon-saving .mk { flex: none; stroke-width: 2; }
.coupon-title { margin-block-start: var(--s-1); font-size: var(--t-small); font-weight: var(--fw-strong); }
.coupon-terms { font-size: var(--t-micro); color: var(--ink-3); line-height: 1.35; }
/* Solid, because this is the object: the thing a reader copies out of the
   card and types at the checkout. */
.coupon-code {
    align-self: flex-start; margin-block-start: var(--s-2); padding: 5px 11px;
    border-radius: var(--r-sm); background: var(--navy); color: var(--on-navy);
    font-size: var(--t-small);
}
.coupon-code .small { color: var(--on-navy-muted); }

/* The deals band: a pale yellow strip, noon's flash-sale tone. */
/* A shelf you push sideways. Its own name, not `.rail` — that one is the
   partner portal's navigation, four fixed columns wide, and its explicit
   tracks were quietly beating the auto ones here: the first four products in
   the deals row were squeezed to two pixels each and read as a set of grey
   lines down the side of the band (Faizal, 6 October 2026). */
.shelf-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 44%;
    gap: 11px;
    overflow-x: auto;
    scrollbar-width: none;
}
.shelf-rail::-webkit-scrollbar { display: none; }

/* The deals band, in the house colour.

   It was a pale cream that belonged to nothing else on MASApp. Navy is what
   the marketplace is written in, it makes a white product card lift off the
   page, and it is the one strong colour that does not fight the yellow
   campaign strip across the top of every picture in it. */
.deal-band {
    margin-inline: calc(-1 * var(--s-4));
    padding: var(--s-3) var(--s-4) var(--s-4);
    background: var(--navy);
    color: var(--on-navy);
}
.deal-band .shead h2 { color: var(--on-navy); }
.deal-band .shead a { color: var(--yellow); }
.deal-tag {
    align-self: flex-start;
    padding: 2px 7px;
    border: 1px dashed var(--red);
    border-radius: var(--r-pill);
    color: var(--red);
    font-size: 10px;
    font-weight: var(--fw-strong);
}

.store-banner { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 3 / 1; object-fit: cover; border-radius: var(--r-lg); background: var(--stage); margin-block-end: var(--s-3); }
.place-input { inline-size: 5rem; flex: none; }
/* A held letter image on /ops/content: whole, never cropped — the admin is judging what is written in it. */
.letter-held { display: block; inline-size: 100%; block-size: auto; max-block-size: 60vh; object-fit: contain; border-radius: var(--r-lg); background: var(--stage); margin-block-end: var(--s-3); }

/* ── Sales letter (drag-and-drop builder, 2026-09-15) ─────────────────── */

.letter { display: flex; flex-direction: column; margin-inline: calc(-1 * var(--s-4)); container: letter / inline-size; }
.letter-section { padding: var(--s-5) var(--s-4); }
.letter-section.pad-s { padding-block: var(--s-3); }
.letter-section.pad-l { padding-block: var(--s-7, 40px); }
.letter-section.bg-white { background: var(--white); color: var(--ink); }
.letter-section.bg-surface { background: var(--surface); color: var(--ink); }
.letter-section.bg-stage { background: var(--stage); color: var(--ink); }
.letter-section.bg-navy { background: var(--navy); color: var(--white); }
.letter-section.bg-yellow { background: var(--yellow); color: var(--note-ink-strong); }
.letter-section.bg-red { background: var(--red); color: var(--white); }
.letter-section.bg-note { background: var(--note-bg); color: var(--note-ink-strong); }
.letter-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-3); align-items: center; max-inline-size: 60rem; margin-inline: auto; }
.le { grid-column: span 12; min-inline-size: 0; display: flex; flex-direction: column; }
.le.phone-6 { grid-column: span 6; }
@container letter (min-width: 720px) {
    .le.span-1 { grid-column: span 1; } .le.span-2 { grid-column: span 2; } .le.span-3 { grid-column: span 3; }
    .le.span-4 { grid-column: span 4; } .le.span-5 { grid-column: span 5; } .le.span-6 { grid-column: span 6; }
    .le.span-7 { grid-column: span 7; } .le.span-8 { grid-column: span 8; } .le.span-9 { grid-column: span 9; }
    .le.span-10 { grid-column: span 10; } .le.span-11 { grid-column: span 11; } .le.span-12 { grid-column: span 12; }
}
.le.align-start { align-items: flex-start; text-align: start; }
.le.align-center { align-items: center; text-align: center; }
.le.align-end { align-items: flex-end; text-align: end; }
.le.align-justify { align-items: stretch; text-align: justify; }
.letter-section { display: flex; flex-direction: column; }
.letter-section > .letter-grid { inline-size: 100%; }
.letter-section.valign-middle { justify-content: center; }
.letter-section.valign-bottom { justify-content: flex-end; }
.align-icons { display: inline-flex; }
.align-icons button { inline-size: 40px; display: inline-flex; align-items: center; justify-content: center; }
.align-icons svg { inline-size: 18px; block-size: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.le h2, .le p, .le blockquote { margin: 0; }
.le p + p { margin-block-start: var(--s-2); }
.le h2 { font-family: var(--font-display); line-height: 1.2; text-wrap: balance; }
:lang(ar) .le h2 { font-family: var(--font-arabic); }
.le h2.size-s { font-size: 18px; } .le h2.size-m { font-size: 22px; } .le h2.size-l { font-size: 28px; } .le h2.size-xl { font-size: 36px; }
.le p.size-s, .le blockquote.size-s { font-size: 13px; } .le p.size-m, .le blockquote.size-m { font-size: 15px; } .le p.size-l, .le blockquote.size-l { font-size: 18px; } .le p.size-xl, .le blockquote.size-xl { font-size: 22px; }
.le p, .le blockquote { line-height: 1.6; }
.le .bold { font-weight: var(--fw-strong); }
.le blockquote { padding-inline-start: var(--s-3); border-inline-start: 3px solid currentColor; font-style: italic; }
.letter-section.bg-picked { color: var(--ink); }
.le img[style*="height"] { object-fit: cover; }
.le .color-muted { color: var(--ink-3); } .le .color-navy { color: var(--navy); } .le .color-red { color: var(--red); }
.le .color-white { color: var(--white); } .le .color-yellow { color: var(--yellow); } .le .color-ink { color: inherit; }
.le img { display: block; inline-size: 100%; block-size: auto; background: var(--stage); }
.le img.shape-square { aspect-ratio: 1; } .le img.shape-wide { aspect-ratio: 16 / 9; } .le img.shape-tall { aspect-ratio: 4 / 5; }
.le img.fit-cover { object-fit: cover; } .le img.fit-contain { object-fit: contain; }
.le img.radius-soft { border-radius: var(--r-lg); } .le img.radius-round { border-radius: var(--r-pill); }
.le .money.size-s { font-size: 16px; } .le .money.size-m { font-size: 22px; } .le .money.size-l { font-size: 30px; } .le .money.size-xl { font-size: 40px; }
.le .btn.size-s { font-size: 13px; } .le .btn.size-l { font-size: 17px; padding-block: 14px; } .le .btn.size-xl { font-size: 19px; padding-block: 16px; }
.letter-section.bg-navy .le .btn, .letter-section.bg-red .le .btn { background: var(--yellow); color: var(--note-ink-strong); }
.letter-section.bg-yellow .le .btn { background: var(--navy); color: var(--white); }
.le .btn { inline-size: auto; }
.le hr { inline-size: 100%; border: 0; border-block-start: 1px solid currentColor; opacity: .25; margin: 0; }
.le .spacer { display: block; }
.le .spacer.size-s { block-size: 8px; } .le .spacer.size-m { block-size: 20px; } .le .spacer.size-l { block-size: 40px; } .le .spacer.size-xl { block-size: 72px; }

.le.anim { opacity: 0; transition: opacity .6s ease, transform .6s ease; }
.le.anim-fade-up { transform: translateY(18px); }
.le.anim-zoom-in { transform: scale(.92); }
.le.anim-slide-in { transform: translateX(-24px); }
[dir="rtl"] .le.anim-slide-in { transform: translateX(24px); }
.le.anim-pop { transform: scale(.8); transition-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
.le.anim.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .le.anim { opacity: 1; transform: none; transition: none; } }

/* ── The sales letter builder ───────────────────────────────────────── */

body:has(.builder) .page { max-width: 92rem; }
.builder { display: flex; flex-direction: column; gap: var(--s-3); }
.builder-top h1 { margin: 0; }
.builder-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.builder-bar .btn { inline-size: auto; }
.builder-status[data-kind="error"], .builder-status[data-kind="refused"] { color: var(--danger); font-weight: var(--fw-strong); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; background: var(--white); }
.seg-wrap { flex-wrap: wrap; }
.seg button { padding: 6px 10px; border: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; min-block-size: 36px; }
.seg button + button { border-inline-start: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.builder-body { display: grid; grid-template-columns: 1fr; gap: var(--s-3); align-items: start; }
@media (min-width: 900px) { .builder-body { grid-template-columns: 11rem minmax(0, 1fr) 18rem; } .builder-palette, .builder-inspector { position: sticky; inset-block-start: var(--s-3); max-block-size: calc(100vh - 2rem); overflow-y: auto; } }
.builder-palette, .builder-inspector { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); }
/* How far readers got: the page down the side in reading order, one bar per
   section for the share of visits arriving there. Worded away from the screen's
   own sentences on purpose — this file is inlined into every page, so a comment
   is page text, and one that quotes a string breaks the tests that look for it. */
.attention { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.attention li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.attention-what { font-size: var(--t-small); color: var(--ink-2); overflow-wrap: anywhere; }
.attention-bar { display: block; block-size: 10px; border-radius: var(--r-pill); background: var(--stage); overflow: hidden; }
.attention-bar > span { display: block; block-size: 100%; background: var(--navy); }
.attention-figures { color: var(--ink-2); }
@media (min-width: 34rem) {
    .attention li { grid-template-columns: minmax(0, 1.1fr) minmax(5rem, 1fr) minmax(0, 2fr); gap: var(--s-3); align-items: center; }
}

/* One address and the button that keeps it, on a line. Its own class rather
   than the two-column field row below, which is for two fields and would put
   this button in a column of its own with nothing beside it. */
.address-row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s-2); max-inline-size: 44rem; }
.address-row .field { flex: 1 1 18rem; }
.address-row .tap { flex: 0 0 auto; }

/* A buy button that leaves MASApp. Quieter than the one that stays, and
   carrying the arrow that says so: a control dressed as the basket's own and
   leading to another shop is a trick, whoever it benefits.
   (Worded around the screen's strings on purpose — this file is inlined into
   every page, so a comment here is page text and quoting a string breaks the
   tests that look for it.) */
.goes-out { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); text-decoration: none; }
.goes-out .ic { inline-size: 16px; block-size: 16px; }

/* What to change, in the adviser's own words. */
.advice { margin-block-start: var(--s-3); padding: var(--s-3); border-inline-start: 3px solid var(--navy); background: var(--surface); border-radius: var(--r-md); }
.advice p { margin: 0 0 var(--s-2); }
.advice p:last-child { margin-block-end: 0; }

/* The ways one product is being sold, side by side above its builder. */
.versions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
.versions > .small { inline-size: 100%; }
.version-tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.version-tab { display: inline-flex; align-items: center; gap: var(--s-2); min-block-size: var(--touch-min); padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-decoration: none; font-size: var(--t-small); }
.version-tab.is-here { border-color: var(--navy); background: var(--navy); color: var(--white); }
.version-tab.is-here .tag { background: var(--white); color: var(--navy); }
.version-name { display: flex; gap: var(--s-2); }
.version-name input { min-inline-size: 9rem; padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-md); font: inherit; background: var(--surface); color: var(--ink); }
.version-acts { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* The reading, drawn over the page it is about. Pinned to the section rather
   than listed beside it: the figure only means something next to the words
   that earned it. */
.builder-letter.is-heat .builder-section { outline: 1px dashed var(--line-strong); outline-offset: -2px; }
.heat {
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
    z-index: 3;
    display: grid;
    gap: 2px;
    max-inline-size: 13rem;
    padding: var(--s-2);
    border-radius: 0 var(--r-md) 0 var(--r-md);
    background: var(--navy);
    color: var(--white);
    font-size: var(--t-micro);
    line-height: 1.35;
    text-align: start;
}
.heat strong { font-size: 17px; line-height: 1; }
.heat-label { opacity: .85; }
.heat-lines { opacity: .85; }
.heat-none { background: var(--stage); color: var(--ink-2); }
/* The biggest fall is the thing to act on, so it is the thing that is loud. */
.heat-drop { background: var(--danger); }
.heat-fell { font-weight: var(--fw-strong); }

/* The six shapes to start a letter from. Cards rather than a list, because
   what is being read on each is three things: what it does, how good the
   evidence is, and whether to take it. */
.tpl-list { display: grid; gap: var(--s-3); }
.tpl-card { display: grid; gap: var(--s-2); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
.tpl-card p { margin: 0; }
.tpl-card .btn { inline-size: auto; justify-self: start; }
.tpl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); }
.tpl-head h3 { margin: 0; font-size: var(--t-body); }
.tpl-strong { background: var(--success); color: var(--white); }
.tpl-moderate { background: var(--navy); color: var(--white); }
.tpl-mechanism, .tpl-practice { background: var(--stage); color: var(--ink-2); }
.tpl-weak { background: var(--yellow); color: var(--note-ink-strong); }
@media (min-width: 50rem) { .tpl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.palette-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr)); gap: var(--s-2); }
.palette-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s-2) 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-size: 11px; cursor: grab; touch-action: none; user-select: none; }
.palette-item:hover { border-color: var(--navy); }
.palette-icon { font-size: 18px; font-weight: var(--fw-strong); color: var(--navy); line-height: 1; }
.builder-stage { background: var(--stage); border-radius: var(--r-lg); padding: var(--s-3); overflow-x: auto; }
.builder-frame { margin-inline: auto; background: var(--white); box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 18%, transparent); transition: inline-size .2s ease; }
.builder-frame.frame-phone { inline-size: 390px; max-inline-size: 100%; border-radius: 22px; overflow: hidden; }
.builder-frame.frame-desktop { inline-size: 100%; max-inline-size: 960px; }
.builder-letter { margin-inline: 0; min-block-size: 18rem; }
.builder-section { position: relative; outline: 1px dashed transparent; outline-offset: -1px; }
.builder-section:hover, .builder-section.is-selected { outline-color: var(--line-strong); }
.builder-section.is-selected { outline: 2px solid var(--navy); }
.builder-section.drop-into { outline: 2px dashed var(--red); }
.builder-section-tag { position: absolute; inset-block-start: 4px; inset-inline-start: 4px; z-index: 2; padding: 2px 6px; border: 0; border-radius: var(--r-sm); background: var(--navy); color: var(--white); font: inherit; font-size: 10px; opacity: .55; cursor: pointer; }
.builder-section:hover .builder-section-tag, .builder-section.is-selected .builder-section-tag { opacity: 1; }
.builder-drop-hint { grid-column: span 12; margin: 0; padding: var(--s-5); border: 2px dashed var(--line-strong); border-radius: var(--r-md); text-align: center; font-size: 12.5px; opacity: .7; }
.builder-el { position: relative; cursor: pointer; outline: 1px dashed transparent; outline-offset: 3px; border-radius: 2px; }
.builder-el:hover { outline-color: var(--line-strong); }
.builder-el.is-selected, .builder-el:focus-visible { outline: 2px solid var(--red); }
.builder-el.drop-before { box-shadow: inset 3px 0 0 var(--red); }
[dir="rtl"] .builder-el.drop-before { box-shadow: inset -3px 0 0 var(--red); }
.builder-el.drop-after { box-shadow: inset -3px 0 0 var(--red); }
[dir="rtl"] .builder-el.drop-after { box-shadow: inset 3px 0 0 var(--red); }
.be-handle { position: absolute; display: none; z-index: 3; touch-action: none; user-select: none; }
.builder-el:hover .be-handle, .builder-el.is-selected .be-handle { display: flex; }
.be-move { inset-block-start: -10px; inset-inline-start: -10px; inline-size: 24px; block-size: 24px; align-items: center; justify-content: center; border-radius: var(--r-pill); background: var(--red); color: var(--white); font-size: 13px; cursor: grab; }
.be-resize { inset-block: 20%; inset-inline-end: -7px; inline-size: 10px; border-radius: var(--r-pill); background: var(--red); cursor: ew-resize; }
@media (pointer: coarse) { .be-handle { display: flex; } .be-move { inline-size: 32px; block-size: 32px; } .be-resize { inline-size: 16px; inset-inline-end: -9px; } }
.builder-placeholder { opacity: .5; font-style: italic; }
.builder-ai { inline-size: 100%; background: var(--red); }
.ai-ideas { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.builder-dialog textarea { inline-size: 100%; }
.builder-dialog > div { display: flex; flex-direction: column; gap: var(--s-3); }
.builder-probe { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; visibility: hidden; pointer-events: none; }
.bs-handle { position: absolute; z-index: 4; display: none; touch-action: none; user-select: none; }
.builder-section:hover .bs-handle, .builder-section.is-selected .bs-handle { display: flex; }
.bs-move { inset-block-start: 4px; inset-inline-end: 4px; inline-size: 28px; block-size: 28px; align-items: center; justify-content: center; border-radius: var(--r-pill); background: var(--navy); color: var(--white); font-size: 14px; cursor: grab; }
.bs-height { inset-block-end: -6px; inset-inline-start: calc(50% - 22px); inline-size: 44px; block-size: 12px; border-radius: var(--r-pill); background: var(--navy); cursor: ns-resize; }
.be-scale { inset-block-end: -8px; inset-inline-end: -8px; inline-size: 16px; block-size: 16px; border: 3px solid var(--white); border-radius: var(--r-pill); background: var(--red); cursor: nwse-resize; }
[dir="rtl"] .be-scale { cursor: nesw-resize; }
@media (pointer: coarse) { .bs-handle { display: flex; } .be-scale { inline-size: 24px; block-size: 24px; } .bs-height { block-size: 18px; } }
.builder-section.section-drop-before { box-shadow: inset 0 4px 0 var(--red); }
.builder-section.section-drop-after { box-shadow: inset 0 -4px 0 var(--red); }
.colour-picker { display: flex; flex-direction: column; gap: 6px; }
.colour-row { display: flex; align-items: center; gap: var(--s-2); }
.builder-inspector .colour-row .colour-input { inline-size: 52px; flex: none; min-block-size: 40px; }
.builder-inspector .colour-row .colour-hex { inline-size: 7.5rem; flex: none; }
.colour-input { inline-size: 44px; block-size: 36px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: none; cursor: pointer; }
.colour-hex { inline-size: 6.5rem; font-family: var(--font-mono); text-transform: lowercase; }
.builder-warn { color: var(--danger); }

.builder-spacer { outline: 1px dotted var(--line-strong); }
.builder-badge { position: absolute; inset-block-start: -9px; inset-inline-end: 6px; z-index: 2; padding: 1px 6px; border-radius: var(--r-sm); font-size: 10px; font-weight: var(--fw-strong); font-style: normal; background: var(--yellow); color: var(--note-ink-strong); }
.builder-badge.badge-refused, .builder-badge.badge-rejected { background: var(--danger); color: var(--white); }
.builder-badge.badge-empty { background: var(--stage); color: var(--ink-2); }
.builder-ghost { position: fixed; inset: 0 auto auto 0; /* physical: it follows the pointer's clientX */ z-index: 50; padding: 6px 10px; border-radius: var(--r-md); background: var(--navy); color: var(--white); font-size: 12px; pointer-events: none; box-shadow: 0 4px 14px color-mix(in srgb, var(--ink) 30%, transparent); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
.builder-empty { padding: var(--s-6) var(--s-4); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.builder-empty .btn { inline-size: auto; }
.builder-label { display: block; font-size: 12px; font-weight: var(--fw-strong); margin-block-end: 4px; }
.builder-inspector h2 { margin: 0; font-size: 17px; }
.builder-inspector .field { margin: 0; }
.builder-inspector textarea { inline-size: 100%; }
.builder-inspector input[type="range"] { inline-size: 100%; }
.builder-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); border-block-start: 1px solid var(--line); padding-block-start: var(--s-2); }
.builder-danger { color: var(--danger); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { inline-size: 30px; block-size: 30px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); cursor: pointer; }
.swatch[aria-pressed="true"] { outline: 2px solid var(--navy); outline-offset: 2px; }
.swatch.bg-white, .swatch.ink-white { background: var(--white); } .swatch.bg-surface { background: var(--surface); } .swatch.bg-stage { background: var(--stage); }
.swatch.bg-navy, .swatch.ink-navy { background: var(--navy); } .swatch.bg-yellow, .swatch.ink-yellow { background: var(--yellow); } .swatch.bg-red, .swatch.ink-red { background: var(--red); }
.swatch.bg-note { background: var(--note-bg); } .swatch.ink-ink { background: var(--ink); } .swatch.ink-muted { background: var(--ink-3); }
.builder-dialog { max-inline-size: min(40rem, 92vw); border: 0; border-radius: var(--r-xl); padding: var(--s-5); }
.builder-dialog::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.builder-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: var(--s-2); margin-block: var(--s-3); }
.builder-thumb { position: relative; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--stage); aspect-ratio: 1; cursor: pointer; }
.builder-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }

/* ── Foot ─────────────────────────────────────────────────────────── */

.foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-6) var(--s-4);
    border-block-start: 1px solid var(--line);
    color: var(--ink-3);
    font-size: 11px;
}

.foot p { margin: 0; }
/* A button that reads as a word — Remove, Turn off ad cookies.

   It looks like text, so it was sized like text: an 18-pixel line to hit with
   a thumb, on the two actions a partner most often takes by accident twice.
   The word keeps its size; the target around it does not. */
.linkish {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--touch-min);
    padding: 0 var(--s-1);
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

/* The ad-cookie notice: said once, above the tab bar, never covering the page. */
.ad-notice {
    position: fixed;
    inset-inline: var(--s-3);
    inset-block-end: calc(70px + env(safe-area-inset-bottom) + var(--s-2));
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    font-size: 12.5px;
    line-height: 1.5;
}
.ad-notice p { margin: 0; }
.ad-notice-actions { display: flex; gap: var(--s-2); }
.ad-notice-actions form { flex: 1; }
.ad-notice-actions .btn { inline-size: 100%; }
@media (min-width: 720px) { .ad-notice { inset-inline-start: auto; max-inline-size: 26rem; } }

/* ── Storefront and product grid — the prototype's .pc cards ──────── */

.storefront {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    position: relative;
    overflow: hidden;
    margin-inline: calc(-1 * var(--s-4));
    margin-block-start: calc(-1 * var(--s-4));
    padding: var(--s-6) var(--s-4);
    background: var(--navy);
    color: var(--white);
}

.storefront h1 { color: var(--white); padding-inline-end: 80px; }
.storefront .muted { color: var(--on-navy-soft); padding-inline-end: 80px; }
.storefront .eyebrow { color: var(--yellow); }

/* The brand's own picture as the hero itself, with a solid navy wash over it
   so the name on top stays readable whatever the photograph is. A wash and not
   a gradient: Faizal, on every screen MASApp has. */
.storefront-art {
    position: absolute;
    inset: 0;
    z-index: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

.storefront-dressed::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: color-mix(in srgb, var(--navy) 52%, transparent);
}

/* Only when it wears a picture: a positioned image paints above static text,
   so the text has to be positioned too. Left alone otherwise, because this
   would turn the stripes from an absolute strip into an empty block. */
.storefront-dressed > :not(.storefront-art) { position: relative; z-index: 2; }

/* Jalur Gemilang stripes along the hero's end edge, as on the prototype —
   what a shop wears until it has a banner of its own. */
.flagbar {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    inline-size: 56px;
    display: flex;
    flex-direction: column;
}

.flagbar s { flex: 1; background: var(--red); }
.flagbar s:nth-child(even) { background: var(--white); }

.eyebrow { font-size: 11px; color: var(--ink-3); margin: 0; }

.shead { display: flex; justify-content: space-between; align-items: center; margin-block: var(--s-2) 0; }
.shead h2 { font-size: 17px; margin: 0; }

.breadcrumb { margin: 0; font-size: 11.5px; color: var(--ink-3); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

@media (min-width: 40rem) {
    .grid { grid-template-columns: repeat(3, 1fr); }
}

/* A tile on a shelf somebody is shopping on.

   Faizal, 4 October 2026: *impression yang ada psychology penting untuk
   promote sales and trust.* So the card is lifted off
   the page rather than drawn on it, and lifts further when a thumb is on it:
   a thing that responds to being touched reads as a thing that works. */
.pc {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    color: var(--ink);
    text-decoration: none;
    transition: box-shadow 140ms ease, transform 140ms ease;
}

.pc:hover {
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.pc:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .pc { transition: none; }
    .pc:hover { transform: none; }
}

/* The campaign, framed around every picture.

   Faizal, 4 October 2026: a strip across the head for what MASApp is running,
   a strip across the foot for what the product saves, and a line in the
   season's colour tying them together. A corner chip is decoration; a frame
   is an event, and the same frame on every photograph is what makes a shelf
   read as one week.

   Drawn over the photograph, never into it: when the season ends the frame
   goes with it, and the partner's own picture was never touched. */
.promo-top,
.promo-foot {
    position: absolute;
    inset-inline: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-1);
    padding: 5px var(--s-2);
    overflow: hidden;
    font-family: var(--font-display);
    font-size: var(--t-micro);
    font-weight: var(--fw-strong);
    letter-spacing: var(--track-tight);
    line-height: 1.1;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.promo-top { inset-block-start: 0; }
.promo-foot { inset-block-end: 0; }

.promo-yellow { background: var(--yellow); color: var(--navy); --on-season-halo: var(--yellow); }
.promo-red { background: var(--red); color: var(--white); --on-season-halo: var(--red); }
.promo-navy { background: var(--navy); color: var(--on-navy); --on-season-halo: var(--navy); }
.promo-green { background: var(--success); color: var(--white); --on-season-halo: var(--success); }

.promo-offer { background: var(--red); color: var(--white); }
.promo-free { background: var(--success); color: var(--white); }

/* The season's own artwork along the head of every photograph, with the
   campaign's name set over it.

   Faizal, 5 October 2026: *design gambar doodle sahaja xcukup, kena ada
   typography tunjuk campaign name*. The name is typeset here rather than drawn
   into the picture, for the reason every other word on MASApp is: a drawn word
   has no Arabic, and a name typed wrong is corrected by typing it again rather
   than by drawing the season a second time.

   The artwork is drawn with its middle left open, so the name lands on clean
   colour and the doodles run out to both ends of the strip. */
.promo-shot {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    object-position: center;
}
.promo-word { position: relative; z-index: 1; }
.promo-drawn {
    padding-block: 6px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
/* Set against the artwork rather than over a wash: the drawing is the
   campaign, and a wash heavy enough to guarantee the name is a wash that
   hides what was drawn. The name carries its own halo instead. */
.promo-drawn .promo-word {
    padding-inline: var(--s-2);
    text-shadow:
        0 0 2px var(--on-season-halo),
        0 0 6px var(--on-season-halo),
        0 0 12px var(--on-season-halo);
}
:lang(ar) .promo-drawn { letter-spacing: 0; }

/* The line around the picture, in the season's own colour — or in the
   offer's, where a product carries one and no season is running. */
.pv:has(.promo-yellow) { box-shadow: inset 0 0 0 2px var(--yellow); }
.pv:has(.promo-red) { box-shadow: inset 0 0 0 2px var(--red); }
.pv:has(.promo-navy) { box-shadow: inset 0 0 0 2px var(--navy); }
.pv:has(.promo-green) { box-shadow: inset 0 0 0 2px var(--success); }
.pv:has(.promo-offer):not(:has(.promo-top)) { box-shadow: inset 0 0 0 2px var(--red); }
.pv:has(.promo-free):not(:has(.promo-top)) { box-shadow: inset 0 0 0 2px var(--success); }

.pc .pv { min-block-size: 132px; }
.pc .pv .pack { inline-size: 62px; block-size: 80px; font-size: var(--t-micro); }

.pc .b { display: flex; flex-direction: column; gap: var(--s-1); padding: 9px 10px 11px; }
.pc h4 { margin: 0; font-size: 12.5px; font-weight: var(--fw-medium); line-height: 1.35; }
.pc .money { font-size: 16px; }
.pc .ship { font-size: 10px; color: var(--ink-2); }

/* The weight, in the body where it is checked rather than on the picture
   where it was in the way of what makes somebody stop. */
.pc-pack { font-size: 10.5px; color: var(--ink-3); }

@media (min-width: 40rem) {
    .btn { inline-size: auto; }
    .buybar .btn { min-inline-size: 12rem; }
}

/* ── Phone: country, then number ──────────────────────────────────── */

.phone {
    display: grid;
    grid-template-columns: minmax(0, 11rem) 1fr;
    gap: var(--s-2);
}

.phone select,
.phone input {
    min-height: var(--touch-min);
    padding: var(--s-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    font: inherit;
    background: var(--white);
    color: var(--ink);
    inline-size: 100%;
}

.code-box {
    font-family: var(--font-mono);
    font-size: var(--t-title);
    letter-spacing: 0.08em;
    direction: ltr;
    unicode-bidi: isolate;
}

/* ── Admin alerts ──────────────────────────────────────────────── */

/* The watch's own health. Quiet when it is running, loud when it is not. */
.watch-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--s-4);
    padding: var(--s-4);
    margin-block-end: var(--s-6);
    background: var(--white);
    border: 1px solid var(--line);
    border-inline-start: 4px solid var(--success);
    border-radius: var(--r-md);
}

.watch-status.is-stale { border-inline-start-color: var(--danger); }

.watch-status p { margin: var(--s-1) 0 0; }

.watch-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.alert-group { margin-block-end: var(--s-8); }

.alert-group h2 { display: flex; align-items: center; gap: var(--s-2); margin-block-end: 0; }

.alert-group > .small { margin-block: var(--s-1) var(--s-4); }

.alert-group .count {
    min-width: 1.75em;
    padding: 0 var(--s-2);
    border-radius: var(--r-pill);
    background: var(--line);
    color: var(--ink);
    font-size: var(--t-small);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.alert {
    padding: var(--s-4) var(--s-5);
    background: var(--white);
    border: 1px solid var(--line);
    border-inline-start: 4px solid var(--line-strong);
    border-radius: var(--r-md);
}

.alert + .alert { margin-block-start: var(--s-3); }

/* Severity carried by the stripe AND by the tag's words, never by colour alone. */
.alert-act_now { border-inline-start-color: var(--danger); }
.alert-safe_until_return { border-inline-start-color: var(--yellow); }

.alert h3 { margin: 0 0 var(--s-2); font-size: var(--t-body); text-wrap: balance; }

.alert-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); margin: 0 0 var(--s-3); }

.alert-meta .not-sent { color: var(--danger); font-weight: var(--fw-strong); }

.alert-detail { font-size: var(--t-small); line-height: 1.6; color: var(--ink-2); max-width: 70ch; }

.tag-act_now { background: var(--danger); color: var(--white); }
.tag-safe_until_return { background: var(--yellow); color: var(--ink); }

.resolve { margin-block-start: var(--s-3); }

.resolve summary { cursor: pointer; color: var(--navy); font-weight: var(--fw-strong); }

.resolve form { display: flex; flex-direction: column; gap: var(--s-3); margin-block-start: var(--s-3); }

.field textarea {
    font: inherit;
    padding: var(--s-2) var(--s-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    resize: vertical;
}

/* ── Admin Assist ──────────────────────────────────────────────── */

.assist {
    margin-block-start: var(--s-4);
    padding: var(--s-4);
    background: var(--surface);
    border-radius: var(--r-md);
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.assist form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }

.assist .assist-ask { flex-direction: column; align-items: stretch; }

.assist .assist-ask .btn { align-self: flex-start; }

.assist-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }

.tag-source { background: var(--navy); color: var(--white); }

.assist p { margin: 0; }

.assist h4 { margin: var(--s-3) 0 var(--s-1); font-size: var(--t-small); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }

.assist-body { max-width: 70ch; line-height: 1.55; }

.assist-steps, .assist-body ul { margin: 0; padding-inline-start: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }

.assist-dont li::marker { color: var(--danger); }

.drafts { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.draft {
    margin: 0;
    padding: var(--s-3);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.draft p { line-height: 1.6; }

.draft p[lang="ar"] { font-family: var(--font-arabic); }

.draft .copy { align-self: flex-start; }

.assist-answer {
    padding: var(--s-3);
    background: var(--white);
    border-inline-start: 3px solid var(--navy);
    border-radius: var(--r-sm);
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

/* ── AI providers ─────────────────────────────────────────────────── */

.watch-status.is-playbook { border-inline-start-color: var(--yellow); }

.provider.is-active { border-inline-start-color: var(--success); }

.provider h3 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }

.test-ok { color: var(--success); font-weight: var(--fw-strong); }

.check { display: flex; align-items: center; gap: var(--s-2); margin-block: var(--s-4); }


/* ── Service levels ───────────────────────────────────────────────── */

.sla {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--line-strong);
    border-radius: var(--r-lg);
    background: var(--white);
}

.sla + .sla { margin-block-start: var(--s-2); }
.sla.is-met { border-inline-start-color: var(--success); }
.sla.is-breached { border-inline-start-color: var(--danger); }
.sla p { margin: 0; }

.sla-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }
.sla-name { font-weight: var(--fw-strong); }
.sla-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); }
.sla-share { font-family: var(--font-display); font-size: var(--t-price); line-height: 1; font-variant-numeric: tabular-nums; }

.sla-tag-met { background: var(--success); color: var(--white); }
.sla-tag-breached { background: var(--danger); color: var(--white); }
.sla-tag-too_few { background: var(--stage); color: var(--ink-2); }

.sla-weeks {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--s-1);
    margin: 0;
    padding: 0;
    block-size: 64px;
}

.sla-weeks li { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 2px; min-inline-size: 0; }
.sla-weeks .bar { display: block; border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--stage); }
.sla-weeks .is-met .bar { background: var(--success); }
.sla-weeks .is-breached .bar { background: var(--danger); }
.sla-weeks .lbl { font-size: var(--t-micro); color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }

.sla form { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }

/* ── Emails to providers ──────────────────────────────────────────── */

.pnotice {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    margin-block-start: var(--s-3);
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--line-strong);
    border-radius: var(--r-lg);
    background: var(--white);
}

.pnotice p { margin: 0; }
.pnotice.is-draft, .pnotice.is-failed { border-inline-start-color: var(--yellow); }
.pnotice.is-sent { border-inline-start-color: var(--success); }

.pnotice-body {
    margin: var(--s-2) 0 0;
    padding: var(--s-3);
    overflow-x: auto;
    background: var(--surface);
    border-radius: var(--r-md);
    font-family: var(--font-mono);
    font-size: var(--t-mono);
    line-height: 1.55;
    white-space: pre-wrap;
    text-align: start;
}

.pnotice-body[dir="rtl"] { font-family: var(--font-arabic); font-size: var(--t-body); }

.pnotice-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.pnotice-tag-draft { background: var(--yellow); color: var(--note-ink-strong); }
.pnotice-tag-queued, .pnotice-tag-sending { background: var(--navy); color: var(--white); }
.pnotice-tag-sent { background: var(--success); color: var(--white); }
.pnotice-tag-failed { background: var(--danger); color: var(--white); }
.pnotice-tag-discarded, .pnotice-tag-superseded { background: var(--stage); color: var(--ink-2); }

/* ── Provider feeds ───────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; }

.runs { inline-size: 100%; border-collapse: collapse; font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.runs th, .runs td { padding: var(--s-1) var(--s-2); border-block-end: 1px solid var(--line); text-align: start; vertical-align: top; }
.runs th { color: var(--ink-3); font-weight: var(--fw-medium); }
.runs td:first-child { min-inline-size: 9rem; }
.runs .file { overflow-wrap: anywhere; }
.feed-template .ref { display: block; overflow-wrap: anywhere; }

textarea.mono { font-family: var(--font-mono); font-size: var(--t-mono); }

/* ── Marketplace: home, categories, search — the prototype's home and PLP ── */

.searchrow {
    display: flex;
    max-width: var(--page-max);
    margin: var(--s-2) auto 0;
    overflow: hidden;
    background: var(--white);
    border-radius: var(--r-md);
}

.searchrow select {
    max-inline-size: 38%;
    padding: 0 var(--s-2);
    border: 0;
    border-inline-end: 1px solid var(--line);
    background: var(--stage);
    color: var(--ink-2);
    font: inherit;
    font-size: 12px;
}

/* The box, and the names turning over inside it.

   Faizal, 18 October 2026: noon's search box names something different every
   few seconds and ours said the same three words all year.

   Four names, because four is what the wheel below is written for: each one
   shows for a quarter of a twelve-second turn, so exactly one is on screen at
   any moment. A shelf with fewer than four houses on it keeps the written
   words instead, rather than turning through gaps.

   The written placeholder stays underneath. It is what shows in a browser
   that cannot do the rest, and it is what `:placeholder-shown` reads to know
   the box is still empty — which is how the turning stops the moment somebody
   starts typing, with no script anywhere near it. */
.searchbox { position: relative; display: flex; flex: 1; min-inline-size: 0; }

.search-turns {
    position: absolute;
    inset-block: 0;
    inset-inline: var(--s-3) var(--s-2);
    display: flex;
    align-items: center;
    overflow: hidden;
    pointer-events: none;
    background: var(--white);
    color: var(--ink-3);
}

.search-turns > span {
    position: absolute;
    inset-inline-start: 0;
    white-space: nowrap;
    opacity: 0;
    animation: search-turn 12s ease-in-out infinite;
    animation-delay: calc(var(--n) * 3s);
}

@keyframes search-turn {
    0% { opacity: 0; transform: translateY(.45em); }
    2%, 22% { opacity: 1; transform: none; }
    25%, 100% { opacity: 0; transform: translateY(-.45em); }
}

/* Typing, or already carrying a search: the box is the reader's now. */
.searchbox input:focus ~ .search-turns,
.searchbox input:not(:placeholder-shown) ~ .search-turns { display: none; }

.searchrow input {
    flex: 1;
    min-inline-size: 0;
    min-height: var(--touch-min);
    padding: 0 var(--s-3);
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
}

.searchrow input:focus-visible, .searchrow select:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }

.cats {
    display: flex;
    gap: 13px;
    overflow-x: auto;
    margin-inline: calc(-1 * var(--s-4));
    margin-block-start: calc(-1 * var(--s-4));
    padding: 14px var(--s-4) 13px;
    background: var(--white);
    scrollbar-width: none;
}

.cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-inline-size: 62px;
    color: var(--ink-2);
    text-align: center;
    text-decoration: none;
}

.cat > span:last-child { font-size: 10.5px; line-height: 1.3; }

.disc {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 56px;
    block-size: 56px;
    flex: none;
    border-radius: var(--r-pill);
    background: var(--tint-navy);
    color: var(--navy);
}

.disc .ic { inline-size: 26px; block-size: 26px; }
.disc:has(.disc-photo) { overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.disc .disc-photo { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }

.hero {
    position: relative;
    overflow: hidden;
    padding: var(--s-5);
    border-radius: var(--r-xl);
    background: var(--navy);
    color: var(--white);
}

.hero .flagbar { inline-size: 74px; }
.hero .in { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); max-inline-size: 15rem; }
.hero .eyebrow { color: var(--yellow); }
.hero h1 { margin: 0; color: var(--white); font-size: 23px; line-height: 1.2; }
.hero p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--on-navy-soft); }
.hero .btn { inline-size: auto; margin-block-start: var(--s-1); }

.promo {
    margin: 0;
    padding: var(--s-3);
    border-radius: var(--r-md);
    background: var(--note-bg);
    border: 1px solid var(--note-line);
    color: var(--note-ink-strong);
    font-size: var(--t-small);
    font-weight: var(--fw-medium);
}

.shead a { font-size: 12px; color: var(--navy); text-decoration: none; }

.shops {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-inline: calc(-1 * var(--s-4));
    padding: 0 var(--s-4) var(--s-2);
    scrollbar-width: none;
}

.shop {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-inline-size: 150px;
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
}

.shop .mark {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 36px;
    block-size: 36px;
    margin-block-end: var(--s-1);
    border-radius: var(--r-md);
    background: var(--navy);
    color: var(--white);
    font-family: var(--font-display);
    font-weight: var(--fw-strong);
}

.shop h3 { margin: 0; font-family: var(--font-latin); font-size: 12.5px; font-weight: var(--fw-strong); }
.shop p { margin: 0; font-size: 10.5px; line-height: 1.45; color: var(--ink-3); }

.pc-brand { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }

.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
/* A search box fills the bar and its button sits beside it, rather than the
   box keeping its default width and the button dropping onto its own line. */
.filterbar input[type="search"] {
    flex: 1 1 12rem;
    min-inline-size: 0;
    min-block-size: 44px;
    padding: 0 var(--s-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--white);
    font: inherit;
    font-size: var(--t-small);
}
.filterbar .btn { inline-size: auto; flex: 0 0 auto; }

.filterbar select {
    min-height: 36px;
    padding: 0 var(--s-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-size: 12.5px;
}

.fb {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    min-height: 36px;
    padding: 0 var(--s-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--white);
    color: var(--ink-2);
    font-size: 12.5px;
    cursor: pointer;
}

.fb input { accent-color: var(--navy); }
.fb.on { border-color: var(--navy); background: var(--navy); color: var(--white); }
.fb:focus-within { outline: 2px solid var(--yellow); outline-offset: 2px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.pager .btn { inline-size: auto; }
.pager [aria-disabled="true"] { opacity: .45; }

.catlist { display: flex; flex-direction: column; gap: var(--s-2); }

.catrow {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-2) var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
}

.catrow .disc { inline-size: 44px; block-size: 44px; }
.catrow .catname { flex: 1; font-weight: var(--fw-medium); }

/* ── Delivery address and pin ──────────────────────────────────────── */

/* Two fields side by side, inside the same column as every other form row —
   a card where one row stops two thirds across and the next runs to the edge
   reads as two different forms. */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-3);
    max-inline-size: 44rem;
}

/* Two fields side by side on a phone leave about 148px each, which is not a
   width you can read a company name back in. They stack instead. */
@media (max-width: 30rem) {
    .field-row { grid-template-columns: 1fr; }
}

.pin-map {
    inline-size: 100%;
    block-size: 18rem;
    margin-block: var(--s-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    background: var(--stage);
}

.pin-search {
    inline-size: 100%;
    min-height: var(--touch-min);
    padding: 0 var(--s-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    font: inherit;
}

.pin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-block: var(--s-2); }
.pin-actions .btn { inline-size: auto; }
.pin-actions p { margin: 0; }

/* ── Joining after the first purchase ──────────────────────────────── */

.join { border-color: var(--navy); }
.join-why { margin: 0 0 var(--s-3); padding-inline-start: var(--s-5); display: flex; flex-direction: column; gap: var(--s-1); font-size: var(--t-small); }
.join-why li::marker { color: var(--success); }

.bell { position: relative; }
.bell .cartn { background: var(--red); color: var(--white); }

.inbox-item { display: flex; flex-direction: column; gap: 2px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); color: var(--ink); text-decoration: none; }
.inbox-item + .inbox-item { margin-block-start: var(--s-2); }
.inbox-item.is-unread { border-inline-start: 3px solid var(--navy); }
.inbox-item.is-unread strong { color: var(--navy); }

/* ── Promotions and vouchers ───────────────────────────────────────── */

.promo-poster { display: block; inline-size: 100%; max-block-size: 16rem; object-fit: cover; border-radius: var(--r-md); background: var(--stage); }
.promo-state-live { background: var(--success); color: var(--white); }
.promo-state-scheduled { background: var(--yellow); color: var(--note-ink-strong); }
.promo-state-paused, .promo-state-draft { background: var(--stage); color: var(--ink-2); }
.promo-state-ended { background: var(--line); color: var(--ink-3); }

.join-offer { display: flex; flex-direction: column; gap: var(--s-2); margin-block-end: var(--s-3); padding: var(--s-3); border-radius: var(--r-md); background: var(--note-bg); border: 1px dashed var(--note-line); }
.join-offer p { margin: 0; }

.voucher { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
.voucher + .voucher { margin-block-start: var(--s-3); }
.voucher .promo-poster { border-radius: 0; }
.voucher-body { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); }
.voucher-body h2, .voucher-body p { margin: 0; }
.voucher-code { padding: var(--s-2) var(--s-3); border: 2px dashed var(--navy); border-radius: var(--r-md); text-align: center; font-size: var(--t-title); }
.voucher.is-spent { opacity: .55; }

/* ── Marketing calendar ────────────────────────────────────────────── */

.calendar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-5); }
.cal-month { display: flex; flex-direction: column; gap: var(--s-2); padding-inline-start: var(--s-3); border-inline-start: 2px solid var(--line-strong); }
.cal-month h2 { margin: 0; font-size: var(--t-title); }
.cal-event { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-inline-start: 4px solid var(--navy); border-radius: var(--r-lg); background: var(--white); }
.cal-event p { margin: 0; }
.cal-event.kind-religious { border-inline-start-color: var(--success); }
.cal-event.kind-national { border-inline-start-color: var(--red); }
.cal-event.kind-retail { border-inline-start-color: var(--yellow); }
.cal-event.kind-malaysia { border-inline-start-color: var(--navy); }
.cal-event.is-past { opacity: .55; }
.cal-kind { background: var(--stage); color: var(--ink-2); }
.cal-promo { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-small); color: var(--ink); text-decoration: none; }
.warn-inline { color: var(--note-ink); font-weight: var(--fw-medium); }
.ps-agreed { background: var(--success); color: var(--white); }
.ps-proposed { background: var(--yellow); color: var(--note-ink-strong); }
.ps-declined { background: var(--stage); color: var(--ink-3); }
.seller-row .fields { display: flex; flex-direction: column; gap: var(--s-2); }

/* .field sets display, which would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

/* ── Order progress and returns ───────────────────────────────────── */

.timeline {
    list-style: none;
    margin: 0 0 var(--s-5);
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-2);
}

.timeline li {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding-block-start: var(--s-3);
    border-block-start: 3px solid var(--line);
    color: var(--ink-2);
    font-size: var(--t-small);
}

.timeline li.is-done { border-block-start-color: var(--success); color: var(--ink); font-weight: var(--fw-strong); }

.timeline li.is-next { border-block-start-color: var(--yellow); }

.timeline .dot { display: none; }

.journey { list-style: none; margin: calc(-1 * var(--s-3)) 0 var(--s-5); padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.journey li { display: flex; justify-content: space-between; gap: var(--s-3); padding-inline-start: var(--s-3); border-inline-start: 3px solid var(--success); font-size: var(--t-small); }
.journey li.is-attention { border-inline-start-color: var(--yellow); }

.order-line { display: flex; flex-direction: column; gap: var(--s-2); padding-block: var(--s-2); }

.order-line + .order-line { border-block-start: 1px solid var(--line); }

.order-line p { margin: 0; }

.return-status { padding: var(--s-2) var(--s-3); border-radius: var(--r-md); font-size: var(--t-small); background: var(--surface); }

.return-refunded { background: var(--success); color: var(--white); }

.return-declined { border-inline-start: 3px solid var(--danger); }

.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }

.choices legend { font-weight: var(--fw-strong); margin-block-end: var(--s-2); }

.choices .check { margin: 0; min-height: var(--touch-min); }

.stack { display: flex; flex-direction: column; gap: var(--s-3); margin-block-start: var(--s-4); }

.stack .btn { align-self: flex-start; }

.decide { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.row-link { text-decoration: none; color: inherit; }

.row-link:hover, .row-link:focus-visible { border-color: var(--navy); }

/* ── Delivery pricing ─────────────────────────────────────────────── */

/* The answer to "are buyers paying for delivery right now". */
.delivery-now {
    padding: var(--s-5) var(--s-4);
    border-radius: var(--r-xl);
    background: var(--navy);
    color: var(--white);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.delivery-now h2 { color: var(--white); margin: 0; }
.delivery-now p { margin: 0; color: var(--on-navy-soft); }
.delivery-now .eyebrow { color: var(--yellow); }
.delivery-now.is-free { border-inline-start: 6px solid var(--yellow); }
.delivery-now .warn { color: var(--note-ink); margin-block-start: var(--s-2); }

.promo-card { border-inline-start-color: var(--yellow); }

.free-tag {
    display: inline-block;
    margin-inline-start: var(--s-1);
    padding: 1px var(--s-2);
    border-radius: var(--r-sm);
    background: var(--note-bg);
    color: var(--note-ink);
    font-weight: var(--fw-strong);
}

/* ── Rate book ────────────────────────────────────────────────────── */

.tabs {
    display: flex;
    gap: var(--s-1);
    overflow-x: auto;
    border-block-end: 1px solid var(--line);
    background: var(--white);
    border-radius: var(--r-md) var(--r-md) 0 0;
}

.tab {
    flex: none;
    padding: var(--s-3) var(--s-4);
    min-height: var(--touch-min);
    font-size: var(--t-small);
    color: var(--ink-3);
    text-decoration: none;
    border-block-end: 2px solid transparent;
}

.tab.on { color: var(--navy); border-block-end-color: var(--navy); font-weight: var(--fw-strong); }

.rate-grid { display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }

.rate-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--s-3);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.rate-name { font-size: 13px; font-weight: var(--fw-medium); }
.rate-value { font-size: 22px; }
.promo-note { color: var(--note-ink); font-weight: var(--fw-strong); }

.searchbar { display: flex; gap: var(--s-2); }
.searchbar input { flex: 1; min-height: var(--touch-min); padding: var(--s-2) var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-md); font: inherit; }
.searchbar .btn { inline-size: auto; }

/* ── Buyer points ─────────────────────────────────────────────────── */

.points-balance { display: flex; flex-direction: column; gap: var(--s-1); }
.points-balance p { margin: 0; }
.points-figure { font-family: var(--font-display); font-size: 40px; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; }
.invite-link { margin: 0; padding: var(--s-2) var(--s-3); border: 2px dashed var(--navy); border-radius: var(--r-md); overflow-wrap: anywhere; text-align: center; }

/* What a partner wrote that no buyer can see. Two kinds in one list, told
   apart by whose move it is rather than by shouting: the ones MASA holds are
   not the partner's fault and must not read like a telling-off. */
.not-live-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.not-live-list li { display: grid; gap: 2px; padding-inline-start: var(--s-3); border-inline-start: 3px solid var(--line-strong); }
.not-live-list li.is-theirs { border-inline-start-color: var(--danger); }
.not-live-list li.is-ours { border-inline-start-color: var(--navy); }

/* A form that sits inside a sentence: one button that reads as a word in it. */
.inline-form { display: inline; }
.linklike { padding: 0; border: 0; background: none; color: var(--navy); font: inherit; text-decoration: underline; cursor: pointer; }

/* The ad managers' own addresses, first on the card: a sales letter is where
   a paid ad lands, and an advertiser copying one into a campaign wants it
   whole rather than assembled from a channel mark. */
.ads-ready { display: grid; gap: var(--s-2); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.ads-row { display: grid; gap: 2px; }
.ads-row .ref { overflow-wrap: anywhere; text-align: start; }
.ads-row .tap { justify-self: start; }
@media (min-width: 34rem) {
    .ads-row { grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; }
    .ads-row .tap { justify-self: end; }
}

/* What has to be true before an ad is worth paying for. */
.ready-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); font-size: var(--t-small); }
.ready-list li { display: grid; grid-template-columns: 1.2rem minmax(0, 1fr); gap: var(--s-2); align-items: start; }
.ready-list li::before { content: '✓'; font-weight: var(--fw-strong); color: var(--success); }
.ready-list li.is-not::before { content: '!'; color: var(--danger); }
.ready-list li.is-not { color: var(--ink-2); }

.elsewhere-set { display: grid; gap: var(--s-2); padding-block-start: var(--s-2); border-block-start: 1px solid var(--line); }

/* The product's links, under its sales letter. The channel is a mark to press,
   not an address to read: six addresses one under another was six lines of
   machine text to compare, when what is being chosen is which app to open. */
/* Six marks on one line at 360px, which is the width the panel is built to:
   at eight pixels apart the sixth wrapped onto a row of its own and the strip
   read as though it had ended. The marks themselves keep the touch floor. */
.share-strip { display: flex; flex-wrap: wrap; gap: var(--s-1); }
@media (min-width: 30rem) { .share-strip { gap: var(--s-2); } }

.share-chip {
    inline-size: var(--touch-min);
    block-size: var(--touch-min);
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--white);
    color: var(--ink-2);
    cursor: pointer;
}

.share-chip:hover { border-color: var(--navy); color: var(--navy); }
.share-chip.is-chosen { border-color: var(--navy); background: var(--navy); color: var(--white); }
.share-chip .ic { inline-size: 24px; block-size: 24px; }

/* The one address in play, which is what the chosen mark means. */
.share-now { margin: 0; padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.share-now .ref { overflow-wrap: anywhere; text-align: start; }

/* Side by side where the card has room, stacked where it has not: a full
   width button each is two bars across a card that is mostly marks. */
.share-go { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.share-go .btn { inline-size: auto; flex: 1 1 12rem; }

/* Every address written out, for a browser running no script. */
.share-links { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--white); }
.share-links > div { display: grid; gap: 2px; padding: var(--s-2) var(--s-3); }
.share-links > div + div { border-block-start: 1px solid var(--line); }
.share-links .ref { overflow-wrap: anywhere; text-align: start; }

/* ── Seller levels ────────────────────────────────────────────────── */

.tag.level-style-plain { background: var(--stage); color: var(--ink-2); }
.tag.level-style-silver { background: var(--line); color: var(--ink); }
.tag.level-style-gold { background: var(--yellow); color: var(--note-ink-strong); }
.tag.level-style-platinum { background: var(--ink); color: var(--white); }
.tag.level-style-navy { background: var(--navy); color: var(--white); }
.tag.level-style-red { background: var(--red); color: var(--white); }
.tag.level-style-green { background: var(--success); color: var(--white); }
.pc-brand .tag { margin-inline-start: var(--s-1); text-transform: none; letter-spacing: 0; }
.tag .level-icon { inline-size: 14px; block-size: 14px; vertical-align: -2px; object-fit: contain; }
.level-icon-large { inline-size: 48px; block-size: 48px; object-fit: contain; vertical-align: middle; }
.level-icon-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }

.level-progress { block-size: 8px; border-radius: var(--r-sm); background: var(--stage); overflow: hidden; }
.level-progress span { display: block; block-size: 100%; background: var(--navy); }

/* ── Reviews ──────────────────────────────────────────────────────── */

.stars { color: var(--yellow); letter-spacing: 1px; white-space: nowrap; }
.stars-off { color: var(--line); }
.review { display: flex; flex-direction: column; gap: var(--s-1); padding-block: var(--s-3); border-block-end: 1px solid var(--line); }
.review p { margin: 0; }
.review-reply { margin-inline-start: var(--s-4); padding-inline-start: var(--s-3); border-inline-start: 2px solid var(--line); }
.rating-choice .check { gap: var(--s-2); }

.review-photos { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.review-photos img { inline-size: 96px; block-size: 96px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); }
.review-photo-large { inline-size: 100%; max-inline-size: 480px; block-size: auto; border-radius: var(--r-md); }

.review-original summary { cursor: pointer; color: var(--ink-3); }
.review-original p { margin-block-start: var(--s-1); color: var(--ink-2); }

/* ── The Agreement and its Policies ──────────────────────────────────────────
   Long legal text is read, not scanned: a measure a person can follow, the
   long-form ink, and room between clauses. The text itself is English in every
   language (Agreement §20.4), so its block is always left-to-right even inside
   an Arabic page — set on the element with dir="ltr", not here. Tables in the
   schedules scroll inside themselves so a phone never scrolls the page sideways. */
.legal { max-inline-size: 70ch; color: var(--ink-soft); line-height: 1.65; font-size: var(--t-body); }
.legal h1, .legal h2, .legal h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.25; margin-block: var(--s-5) var(--s-2); }
.legal h1 { font-size: var(--t-display); }
.legal h2 { font-size: var(--t-title); }
.legal h3 { font-size: var(--t-body); }
.legal p, .legal ul, .legal ol { margin-block: 0 var(--s-3); }
.legal ul, .legal ol { padding-inline-start: var(--s-5); }
.legal li { margin-block-end: var(--s-1); }
.legal hr { border: 0; border-block-start: 1px solid var(--line); margin-block: var(--s-5); }
.legal blockquote { margin-inline: 0; padding-inline-start: var(--s-3); border-inline-start: 3px solid var(--note-line); color: var(--note-ink); }
.legal table { display: block; overflow-x: auto; border-collapse: collapse; font-size: var(--t-small); margin-block-end: var(--s-4); }
.legal th, .legal td { border: 1px solid var(--line); padding-block: var(--s-1); padding-inline: var(--s-2); text-align: start; vertical-align: top; }
.legal code { font-family: var(--font-mono); font-size: var(--t-mono); }
.legal-scroll { max-block-size: 60vh; overflow-y: auto; padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.legal-accept { display: flex; gap: var(--s-2); align-items: flex-start; }
.legal-accept input { margin-block-start: 3px; inline-size: 18px; block-size: 18px; flex: none; }

/* ── The step board ──────────────────────────────────────────────────────────
   One row per step: a mark, what it is and where it stands, and whose move it
   is. The seller's own move is the one that stands out; MASA's and finished
   steps sit quieter, so the eye lands on what is theirs to do. */
.step-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 1.25rem 1fr auto; gap: var(--s-2); align-items: start; padding-block: var(--s-3); border-block-start: 1px solid var(--line); }
.step-mark { color: var(--ink-3); line-height: 1.4; text-align: center; }
.step-body { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.step-name { font-weight: var(--fw-medium); color: var(--ink); }
.step-done .step-mark { color: var(--success); }
.step-you .step-mark { color: var(--navy); }
.step-you .step-name { font-weight: var(--fw-strong); }
.step-later .step-name, .step-package .step-name { color: var(--ink-2); }

/* Admins: the ticks that say what somebody may work in.
   One area per row, because a row of checkboxes wrapping mid-phrase reads as
   prose and cannot be aimed at with a thumb. */
.ticks {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    margin-block: var(--s-2);
}

.tick {
    display: flex;
    gap: var(--s-2);
    align-items: flex-start;
    padding-block: var(--s-2);
    padding-inline: var(--s-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
}

.tick:hover { border-color: var(--line-strong); }

/* A checkbox inside .field would otherwise inherit `inline-size: 100%` from
   the input rule above, becoming a box the width of the card and pushing its
   own label out of the frame. */
.tick input {
    inline-size: auto;
    flex: 0 0 auto;
    margin-block-start: 1px;
    accent-color: var(--navy, currentColor);
}

.tick span { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-inline-size: 0; }

.tick .small { font-weight: var(--fw-normal); }

/* One admin, kept apart from the next. */
.line-block {
    padding-block: var(--s-4);
    border-block-end: 1px solid var(--line);
}

.line-block:last-child { border-block-end: 0; }

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    align-items: baseline;
    margin-block-start: var(--s-2);
}

/* A registration link is long and has no spaces to break at. */
.wrap { overflow-wrap: anywhere; }


/* ── The admin console ─────────────────────────────────────────── */

/* A tool read at a desk, not a shop read on a phone in a queue. The shop's
   48rem column leaves a console two thirds empty on any laptop. */
body.is-ops .page { max-width: 76rem; }

.ops-head { display: flex; flex-direction: column; gap: var(--s-1); }
.ops-head p { margin: 0; }

.section-label {
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 0 0 var(--s-3);
}

/* The console's menu: one card per area of authority, opening when pressed.
   The cards carry the brand's navy, and the card you are in is marked with
   the brand's yellow rather than with a fourth shade of grey.

   Built on <details>, so it opens with no script and answers the keyboard by
   itself. The panel is lifted out of the flow: a card that pushed its
   neighbours down would move the page under the reader on every press. */
/* A bar, not a wall.

   Faizal, 12 October 2026: the menu should be a bar you glance along, not
   something you travel through. Nine equal blocks on a grid took the top
   third of every screen before the page itself began, and on a narrow one
   they stacked three rows deep.

   Chips that size to their own words instead, wrapping where they must. It
   wraps rather than scrolls on purpose: overflow on one axis is overflow on
   both, and a bar that scrolled sideways would clip the panels hanging off
   it — which are the whole point of the bar. */
.ops-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--s-1);
    margin-block-end: var(--s-4);
}

.menu-card { position: relative; }

.menu-head {
    display: flex;
    align-items: center;
    gap: 5px;
    /* The 44px floor still applies: this is a thing you press. */
    min-block-size: 44px;
    padding: 0 var(--s-3);
    background: var(--navy);
    color: var(--on-navy);
    border-radius: var(--r-pill);
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
}

.menu-head::-webkit-details-marker { display: none; }

.menu-head:hover { background: var(--navy-2); }

.menu-card[open] .menu-head { background: var(--navy-2); }

/* Where you are, in the brand's accent. */
.menu-card.is-here .menu-head { background: var(--navy-2); box-shadow: inset 0 0 0 2px var(--yellow); }

.menu-you { margin-inline-start: auto; }
.menu-you .menu-head { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.menu-you .menu-head:hover { background: var(--stage); }
.menu-you[open] .menu-head { background: var(--stage); }

.menu-chev {
    inline-size: 15px;
    block-size: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 120ms ease;
}

@media (prefers-reduced-motion: reduce) { .menu-chev { transition: none; } }

.menu-card[open] .menu-chev { transform: rotate(180deg); }

.menu-panel {
    position: absolute;
    inset-block-start: calc(100% + var(--s-1));
    inset-inline-start: 0;
    z-index: 30;
    min-inline-size: 100%;
    inline-size: max-content;
    max-inline-size: 15rem;
    display: flex;
    flex-direction: column;
    padding: var(--s-1);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: 0 10px 24px -12px var(--ink);
}

.menu-item {
    display: block;
    padding: var(--s-2) var(--s-3);
    border: 0;
    border-radius: var(--r-sm);
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: var(--t-small);
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}

.menu-item:hover { background: var(--stage); }

.menu-item.is-current {
    font-weight: var(--fw-strong);
    color: var(--navy);
    box-shadow: inset 3px 0 0 var(--yellow);
}

[dir="rtl"] .menu-item.is-current { box-shadow: inset -3px 0 0 var(--yellow); }

.menu-out { color: var(--red); inline-size: 100%; }

/* A form is read down a column, and a column stops being readable long before
   it reaches 1200px. The console's cards are wide because tables and boards
   need the room; a text field for a reference code does not. */
body.is-ops .fields { max-inline-size: 44rem; }

/* The board. Every tile is a door to the screen that acts on it. */
/* The level's detail, folded under the level itself. A partner chases the
   next level on a different visit from the one they make every morning, and
   three tables of scoring on the home screen taxes every morning for it. */
.standing > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    row-gap: 2px;
    cursor: pointer;
    padding-block: var(--s-2);
    text-align: start;
}

.standing > summary > :first-child { font-weight: var(--fw-strong); }
.standing > summary > :nth-child(2) { grid-column: 1; }

/* A caret, so it reads as something that opens rather than as a button that
   goes somewhere. It turns when it does. */
.standing > summary::after {
    content: "";
    grid-column: 2;
    grid-row: 1 / span 2;
    inline-size: 9px;
    block-size: 9px;
    border-inline-end: 2px solid var(--ink-3);
    border-block-end: 2px solid var(--ink-3);
    transform: rotate(45deg);
    margin-inline-start: var(--s-3);
}

.standing[open] > summary::after { transform: rotate(225deg); }

.standing > summary::-webkit-details-marker { display: none; }
.standing[open] > summary { margin-block-end: var(--s-3); border-block-end: 1px solid var(--line); padding-block-end: var(--s-3); }
.standing-part + .standing-part { margin-block-start: var(--s-5); padding-block-start: var(--s-4); border-block-start: 1px solid var(--line); }
.standing-part > :is(h2, .heads) { margin-block-start: 0; }

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: var(--s-3);
}

.tile {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-4);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    color: inherit;
    text-decoration: none;
}

.tile:hover { border-color: var(--line-strong); }

.tile-label { font-size: var(--t-small); color: var(--ink-2); }

.tile-figure {
    font-size: 26px;
    font-weight: var(--fw-strong);
    line-height: 1.1;
    letter-spacing: var(--track-tight);
    font-variant-numeric: tabular-nums lining-nums;
}

.tile-note { font-size: 11.5px; color: var(--ink-3); }

/* A queue with somebody waiting in it. The stripe is on the inline start edge
   so it reads the same way round in Arabic. */
.tile.is-due { border-inline-start: 3px solid var(--red); }
.tile.is-due .tile-figure { color: var(--red); }

/* An empty queue is still worth a tile — it says what the queues are — but it
   should not compete with the ones that have somebody waiting in them. */
.tile.is-clear .tile-figure { color: var(--ink-3); font-weight: var(--fw-medium); }

/* The two routes a partner can arrive by, offered as a choice rather than a
   dropdown: they are different businesses, and the sentence under each is the
   only place an admin is told which is which. */
.routes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: var(--s-2);
    margin-block: var(--s-2);
}

.route {
    display: flex;
    gap: var(--s-2);
    align-items: flex-start;
    padding-block: var(--s-3);
    padding-inline: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    font-size: 13px;
    cursor: pointer;
}

.route:hover { border-color: var(--line-strong); }

.route:has(input:checked) {
    border-color: var(--navy);
    background: var(--stage);
}

.route input {
    inline-size: auto;
    flex: 0 0 auto;
    margin-block-start: 2px;
    accent-color: var(--navy, currentColor);
}

.route span { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-inline-size: 0; }

/* A heading inside a form, marking where the questions change subject. */
.sub {
    margin-block: var(--s-3) 0;
    font-size: 15px;
}

.trail { margin-block-start: var(--s-2); }
.trail ul { margin-block: var(--s-2) 0; padding-inline-start: var(--s-4); }
.trail li { margin-block-end: var(--s-1); }

/* Where a partner stands, in the colour the state deserves. */
.tag-rung-declined { background: var(--danger); color: var(--white); }
.tag-rung-suspended { background: var(--danger); color: var(--white); }
.tag-rung-accepted { background: var(--success); color: var(--white); }

/* MASApp Partners, as a lockup: the mark, a hairline, the word. The mark is
   never redrawn and never recoloured — the sub-brand is said in type beside
   it, which is also why it costs no new file and stays sharp at any size. */
.brandlock-rule {
    inline-size: 1px;
    block-size: 1.4em;
    background: currentColor;
    opacity: 0.35;
    flex: 0 0 auto;
}

.brandlock-word {
    font-family: var(--font-display);
    font-weight: var(--fw-strong);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.appbar .brandlock-word { color: var(--white); font-size: var(--t-micro); }

/* The laptop's own door. Dashed rather than solid, and labelled, so it never
   reads as a third way to sign in — it is a developer's shortcut and it should
   look like one on the one machine that can see it. */
.dev-door {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
    margin-block-start: var(--s-5);
    padding: var(--s-4);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-lg);
    background: var(--note-bg);
}

.dev-door p { margin: 0; }
.dev-door strong { color: var(--note-ink-strong); }
.dev-door .muted { color: var(--note-ink); }

/* The other door, at the foot of a sign-in page: past a rule, so it reads as
   somewhere else to go rather than as another thing to do here. */
.other-door {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
    margin-block: 0;
    padding-block-start: var(--s-4);
    border-block-start: 1px solid var(--line);
}

.other-door p { margin: 0; }

/* The two ways on from a sign-in page, kept close enough to read as one
   choice rather than as an action and an afterthought. */
.signin-ways {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.signin-ways .small { margin: 0; }

/* "or", with a rule running out of it to either side. */
.or {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    margin: 0;
    color: var(--ink-3);
    font-size: var(--t-small);
}

.or::before,
.or::after {
    content: "";
    flex: 1;
    block-size: 1px;
    background: var(--line);
}

/* Forgotten password and a new account: two small ways on, side by side on a
   wide screen and stacked on a narrow one, never a row of dots to parse. */
.doorway-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2) var(--s-5);
    margin: 0;
}

/* Out of everybody's way: off the page, out of the tab order, and hidden from
   anything that reads the page aloud. Used for the one field on the
   application form that only a robot will ever fill in. */
.offscreen {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* A numbered list that reads as prose, for the three things that happen after
   an application is sent. */
.steps-plain {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin: 0;
    padding-inline-start: var(--s-5);
}

/* A fieldset asking one question, sitting in a column of fields that are all
   labelled the same way. The browser's own frame around it would make it the
   only boxed thing on the form. */
fieldset.field {
    margin: 0;
    padding: 0;
    border: 0;
}

fieldset.field > legend {
    padding: 0;
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    color: var(--ink);
}

/* Countries a company carries, ticked. Two columns where there is room, one
   where there is not, and every box big enough for a thumb. */
.tickbox {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0 var(--s-4);
}

.tickbox .check {
    margin-block: 0;
    min-block-size: var(--touch-min);
}

/* A card of questions a partner answers once.

   Three things kept going wrong here by hand, so they are said once:
   a box's label sitting level with the box when it wraps to two lines, the
   answer that cancels a whole list standing apart from the list, and a
   disclosure that must not be mistakable for something to type in. */
.tickbox .check { align-items: flex-start; }

/* Half the difference between the line a label sits on and the box beside it,
   so the two share a middle whether the label runs to one line or three. */
.check input[type="checkbox"],
.check input[type="radio"] { margin-block-start: calc((1lh - 1.1rem) / 2); }

/* "It contains none of these" is not a fifteenth allergen. It answers the
   other fourteen, so it is not drawn as though it were one of them. */
.check.apart {
    margin-block-start: var(--s-4);
    padding-block-start: var(--s-4);
    border-block-start: 1px solid var(--line);
}

/* A second set of boxes, folded until it is wanted.

   It used to borrow .tap, which draws a bordered white rectangle — on a form
   that is the shape of something you type in, and a partner reading quickly
   saw an empty field where a question was. A marker and a hand are what say
   "this opens". */
.unfold {
    margin-block: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--white);
}

.unfold > summary {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    min-block-size: var(--touch-min);
    padding: var(--s-2) var(--s-3);
    cursor: pointer;
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    color: var(--navy);
}

.unfold > summary::-webkit-details-marker { display: none; }

.unfold > summary::before {
    content: "";
    flex: 0 0 auto;
    inline-size: 0;
    block-size: 0;
    border-block-start: 5px solid transparent;
    border-block-end: 5px solid transparent;
    border-inline-start: 7px solid currentColor;
    transition: transform 120ms ease;
}

.unfold[open] > summary::before { transform: rotate(90deg); }
.unfold > summary:hover { border-color: var(--navy); }
.unfold-said { padding: 0 var(--s-3) var(--s-3); }

@media (prefers-reduced-motion: reduce) {
    .unfold > summary::before { transition: none; }
}

/* Two forms in one card, each with its own Save.

   The declaration saves on its own, because it is the one answer that can be
   refused and a refusal must not throw away everything under it. But two
   identical Save buttons down one card is a partner filling in the second
   half and pressing the first one, so the declaration is drawn as its own
   block: everything inside the frame is what the button inside the frame
   saves, which needs no sentence to explain. */
.own-block {
    padding: var(--s-4);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    background: var(--white);
}

.card .fields + .fields { margin-block-start: var(--s-5); }

/* A tick box is a tick box, not a text field wearing one's clothes.

   It sits inside .field, so it was being handed both of the rules that size a
   text box: full width, and the 44-pixel minimum that makes a control big
   enough for a thumb. The result was a square the size of a button with its
   label stranded at the far end of the card, and rows so tall that a box
   looked as though it belonged to the line above it.

   The thumb still gets its 44 pixels — the whole label row is the target, and
   that is what .check sizes. The box itself is the size of a box, and sits on
   the first line of its label however many lines the label runs to. */
.check input[type="checkbox"],
.check input[type="radio"] {
    flex: 0 0 auto;
    inline-size: 1.1rem;
    block-size: 1.1rem;
    min-block-size: 0;
    accent-color: var(--navy, currentColor);
}

/* A number with its unit welded to it.

   A bare box asking for a price does not say AED, and a bare box asking for a
   weight does not say grams: the partner supplies the unit from memory and is
   wrong about it once. The unit sits inside the frame instead, so the field
   cannot be read without it. */
.with-unit {
    display: flex;
    align-items: stretch;
}

.with-unit > .unit-affix {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    padding-inline: var(--s-3);
    border: 1px solid var(--line-strong);
    border-inline-end: 0;
    border-start-start-radius: var(--r-md);
    border-end-start-radius: var(--r-md);
    background: var(--stage);
    color: var(--ink-2);
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    white-space: nowrap;
}

.with-unit > .unit-affix.after {
    border-inline-end: 1px solid var(--line-strong);
    border-inline-start: 0;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
    border-start-end-radius: var(--r-md);
    border-end-end-radius: var(--r-md);
}

.with-unit > input {
    flex: 1;
    min-inline-size: 0;
}

.with-unit > .unit-affix:first-child + input {
    border-start-start-radius: 0;
    border-end-start-radius: 0;
}

.with-unit > input:has(+ .unit-affix) {
    border-start-end-radius: 0;
    border-end-end-radius: 0;
}

/* The doorway: the sign-in page, and the one screen that has to feel like
   somewhere worth going in.

   Solid colour and type, no gradient and no photograph. A picture of goods on
   a sign-in page is a picture of somebody else's catalogue, and a second
   wordmark under the one already in the bar is how a page stops feeling
   designed. The symbol is set as a glyph instead — one flat colour through a
   mask, oversized, cropped by the edge — so it reads as a letterform in the
   brand's own alphabet. */

/* The shop reads in a 48rem column, which is right for a product page and too
   narrow for two things side by side: the headline broke into four lines and
   the links under the form wrapped mid-word. */
.page:has(.doorway) { max-width: 62rem; }

.doorway {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-5);
    align-items: stretch;
    margin-block: var(--s-4);
}

.doorway-mark {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-block-size: 22rem;
    background: var(--navy);
    color: var(--on-navy);
    border-radius: var(--r-xl);
    padding: var(--s-6);
}

/* Whole, and inside its own room. The bag is the friendliest thing MASApp
   owns and half a bag is not friendly — it reads as a picture that did not
   quite fit. */
.doorway-sym {
    position: absolute;
    inset-block-start: var(--s-5);
    inset-inline-end: var(--s-5);
    block-size: 8.5rem;
    inline-size: auto;
    object-fit: contain;
    rotate: 6deg;
}

.doorway-say {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.doorway-rule {
    inline-size: 52px;
    block-size: 5px;
    border-radius: 3px;
    background: var(--yellow);
}

.doorway-eyebrow {
    font-family: var(--font-display);
    font-weight: var(--fw-strong);
    font-size: var(--t-micro);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--yellow);
}

.doorway-line {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(27px, 3.4vw, 37px);
    line-height: 1.08;
    letter-spacing: var(--track-tight);
    text-wrap: balance;
    display: flex;
    flex-direction: column;
}

.doorway-line em { font-style: normal; color: var(--yellow); }

/* The partner's door, in the other brand colour.

   Colour is doing the work a heading would otherwise have to: a partner who
   lands on the other door, or the other way round, sees it before reading a
   word. (The wording here is deliberate — this file is inlined into every
   page, so a comment is part of what a partner's panel serves, and their
   panel says buyers.) Everything else about the panel is identical, so the two read as one
   system rather than two products. */
.doorway-mark.is-partner {
    background: var(--partner-ground);
    color: var(--on-partner);
}

.doorway-mark.is-partner .doorway-eyebrow { color: var(--on-partner); }
.doorway-mark.is-partner .doorway-line em { color: var(--partner-accent); }
.doorway-mark.is-partner .doorway-sub { color: var(--on-partner-soft); }

.doorway-sub {
    font-size: 14px;
    line-height: 1.55;
    color: var(--on-navy-soft);
    max-inline-size: 34ch;
}

.doorway-form {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.doorway-form > h1,
.doorway-form > p { margin: 0; }

/* .card is a box with padding and nothing else, so the button sat flush
   against the password field: the fields carry their own gap and the button
   was not part of it. */
.signin-form {
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
    padding: var(--s-5);
}

/* The one button on the page that should look like a welcome. The tokens have
   always called yellow the hero button's colour; nothing used it. */
.btn-hero {
    background: var(--yellow);
    color: var(--navy);
    font-weight: 800;
}

.btn-hero:hover { background: color-mix(in srgb, var(--yellow) 88%, var(--white)); }
.btn-hero:active { translate: 0 1px; }

/* On a phone the panel is a header, not half the page: the form is what
   somebody came for and it should not sit below the fold. */
@media (max-width: 52rem) {
    .doorway { grid-template-columns: 1fr; gap: var(--s-4); }
    .doorway-mark { min-block-size: 0; padding: var(--s-5); }
    .doorway-say { gap: var(--s-2); }
    .doorway-line { font-size: 24px; }
    .doorway-sub { font-size: 13px; }
    /* On a phone the panel is short and the words fill it, so the bag joins
       the column instead of floating over it. Nothing can collide with text
       it is stacked above. */
    .doorway-sym {
        position: static;
        align-self: flex-start;
        block-size: 4.5rem;
        rotate: 0deg;
        margin-block-end: var(--s-3);
    }
    /* The bag takes the top corner, so the sentence stops before it rather
       than running underneath it. */
    .doorway-sub { max-inline-size: 26ch; }
}

/* A page that stopped. Centred, brief, and carrying the mark — it is the page
   a stranger is most likely to meet first. */
.stop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-3);
    text-align: center;
    padding-block: var(--s-8);
}

.stop-sym { block-size: 6rem; inline-size: auto; object-fit: contain; }

.stop h1 { margin: 0; }

.stop p { margin: 0; max-inline-size: 36ch; }

.stop-go { inline-size: auto; margin-block-start: var(--s-3); }

/* The optional half of the product form, folded. Everything inside is worth
   having and none of it is required, so it is opened by choice rather than
   scrolled past — a form that looks long is a form that gets abandoned. */
.tell-more {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding-block: var(--s-3);
    padding-inline: var(--s-3);
    margin-block: var(--s-2);
}

.tell-more > summary {
    cursor: pointer;
    margin-block: 0;
}

.tell-more[open] > summary { margin-block-end: var(--s-2); }

/* A list typed one line at a time, with spare lines at the end so there is
   always somewhere to type without pressing anything first. */
.one-by-one { display: flex; flex-direction: column; gap: var(--s-1); }

/* A question's title, its necessity and its explanation, on one line.
   The help sits where the partner is still deciding, not after they have
   answered — and the panel it opens drops below the whole row. */
.ask {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
}

.ask > label,
.ask > .ask-text {
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    color: var(--ink);
}

.ask > .tip { margin-block-start: 0; }

/* The open note took itself out of the flow so it could span the whole row,
   and so it reserved no height — which meant it was drawn straight over the
   box it was explaining. Press the help on "UAE trade licence number" and the
   field you were about to fill in disappeared behind the sentence telling you
   what to put in it.
   It stays in the flow instead. Open, the whole disclosure claims a row of
   its own in the wrap, so the circle keeps its place beside the title until
   it is pressed and the note arrives under the title rather than on top of
   the answer. */
.ask > .tip[open] {
    flex-basis: 100%;
    display: flex;
    align-items: flex-start;
    gap: var(--s-2);
}

.ask > .tip[open] > .tip-said { flex: 1; margin-block-start: 0; min-inline-size: 0; }

.ask-need {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: var(--r-pill);
}

.ask-need.is-required { background: var(--note-bg); color: var(--note-ink-strong); }
.ask-need.is-optional { background: var(--stage); color: var(--ink-3); }

/* A list the partner is building, line by line. */
.listed {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.listed > li {
    display: flex;
    align-items: baseline;
    gap: var(--s-3);
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-md);
    background: var(--stage);
}

.listed > li > span { flex: 1; min-inline-size: 0; }
.listed > li form { margin: 0; }
.listed > li .linkish { font-size: var(--t-small); color: var(--ink-3); }
.listed > li .linkish:hover { color: var(--danger); }

.listed.numbered > li::before {
    counter-increment: step;
    content: counter(step);
    flex: none;
    inline-size: 1.5rem;
    block-size: 1.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
}

/* The partner panel's navigation: everything visible, nothing to discover.

   It began as one scrolling row, and Faizal asked the right question about it:
   on a phone, how does anybody know there is more off the edge? They do not.
   An edge fade or a half-cut button only tells them something is hidden —
   it still makes them find it.

   So nothing is hidden. Eight destinations, four across on a phone and two
   rows deep, every one on screen the moment the page is. What made that
   possible was not the layout but the words: the labels were page headings
   ("Reviews of your products"), and a heading on a button is what forced the
   row off the edge in the first place. A nav label is a word.

   The icon sits above the label, which is the shape the shop's own tab bar
   already uses — so a partner who also buys on MASApp meets one idea, not
   two. On a wide screen it settles into a single row.

   (This file is inlined into every page, so a partner's panel serves these
   words too, and their panel says buyers.) */
.rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s-2);
    margin-block-end: var(--s-5);
}

.rail-tap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s-1);
    min-block-size: 4.25rem;
    padding: var(--s-2);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--white);
    color: var(--ink-3);
    font-size: 11px;
    font-weight: var(--fw-strong);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.rail-tap > span {
    display: block;
    inline-size: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail-tap:hover { border-color: var(--line-strong); color: var(--ink); }

.rail-tap.is-here {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--on-navy);
}

.rail-tap.is-here .ic { stroke-width: 2.1; }

.rail-tap:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

@media (min-width: 40rem) {
    .rail { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .shelf-rail { grid-auto-columns: 23%; }
}

/* One language's list, as its own group.

   The two sat as bare siblings, and a card has padding but no gap — so the
   Arabic title landed flush under the English Add button and read as part of
   it, while its own list sat a clear space below. A title belongs to what
   follows it; a rule and some air say which. */
.lang-group {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    max-inline-size: 44rem;
}

.lang-group + .lang-group {
    margin-block-start: var(--s-5);
    padding-block-start: var(--s-5);
    border-block-start: 1px solid var(--line);
}

/* One input and the button that commits it. */
/* One line of a list, and the button that adds it. Held to the same column
   as every other form on the page: a card where one row runs the full width
   and the next stops two thirds across reads as a mistake. */
.add-row {
    display: flex;
    gap: var(--s-2);
    align-items: stretch;
    max-inline-size: 44rem;
}

.add-row input { flex: 1; min-inline-size: 0; }
.add-row .btn { inline-size: auto; flex: none; }

/* The four sides of a pack, side by side. Each one is its own small job: a
   label, whatever is there, and a way to take it again. */
.sides {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: var(--s-3);
    margin-block: var(--s-3);
}

/* On a phone the four go one above the other. Two columns leaves about 140
   pixels a slot, and the browser's own file control needs nearer 200 — so
   "No file chosen" came out as "No ...en", which reads as something broken
   rather than something empty. */
@media (max-width: 30rem) {
    .sides { grid-template-columns: 1fr; }

    /* Four empty slots one above the other is a lot of grey to scroll past
       before the card ends, so an empty one is shorter than a filled one. */
    .side-empty { block-size: 4.5rem; }
}

.side input[type="file"] { max-inline-size: 100%; }

.side {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.side-shot {
    inline-size: 100%;
    block-size: 7rem;
    object-fit: contain;
    background: var(--stage);
    border-radius: var(--r-sm);
}

.side-empty {
    display: grid;
    place-items: center;
    block-size: 7rem;
    background: var(--stage);
    border-radius: var(--r-sm);
    text-align: center;
}

.side input[type="file"] { inline-size: 100%; font-size: var(--t-small); }

.problem-line { color: var(--danger); margin: 0; }

/* What is being asked for, behind one small press. Always-open help is not
   help by the third field; it is grey somebody has learned to skip. */
/* A heading with its explanation folded up beside it.

   The button sits on the heading's line, where somebody is already looking
   when they are deciding whether they need it. Open, the panel drops to its
   own full-width row underneath rather than squeezing in beside the words —
   an explanation reads as a paragraph or it does not get read. */
.heads {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex-wrap: wrap;
    margin-block: var(--s-4) var(--s-2);
}

.heads > :is(h1, h2, h3) { margin-block: 0; }
.heads > .tip { margin-block-start: 0; }
.heads > .tip[open] { flex-basis: 100%; display: flex; gap: var(--s-2); align-items: flex-start; }
.heads > .tip[open] > .tip-said { flex: 1; margin-block-start: 0; min-inline-size: 0; }

.tip { display: inline-block; margin-block-start: 2px; }

.tip > summary {
    display: inline-grid;
    place-items: center;
    inline-size: 1.25rem;
    block-size: 1.25rem;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    color: var(--ink-2);
    font-size: 11px;
    font-weight: var(--fw-strong);
    font-style: italic;
    cursor: pointer;
    list-style: none;
}

.tip > summary::-webkit-details-marker { display: none; }
.tip > summary:hover { border-color: var(--navy); color: var(--navy); }

/* A 20-pixel circle is the right size to read and the wrong size to hit with
   a thumb. The circle keeps its size and grows an invisible margin around
   itself, so the target is a finger's width without the line it sits on
   moving at all. */
.tip > summary { position: relative; }

.tip > summary::before {
    content: "";
    position: absolute;
    inset: -11px;
    border-radius: 50%;
}

.tip-said {
    margin-block-start: var(--s-2);
    padding: var(--s-2) var(--s-3);
    border-inline-start: 3px solid var(--yellow);
    background: var(--note-bg);
    border-radius: var(--r-sm);
}

.tip-said p { margin: 0 0 var(--s-1); color: var(--note-ink); }
.tip-said p:last-child { margin-block-end: 0; }
.tip-eg { font-style: italic; }

/* Combination prices on the admin's catalogue screen, and the payout on the
   partner's product page — a list of deductions ending in one figure that
   matters, so the last line is the one that reads. */
.tiers { margin-block: var(--s-3); }

.payout-out {
    padding-block-start: var(--s-2);
    border-block-start: 1px solid var(--line);
}

/* A line that costs money if it is ignored. Not an error — nothing has gone
   wrong yet — but not grey either. */
.note-line {
    margin-block-start: var(--s-3);
    padding: var(--s-2) var(--s-3);
    border-inline-start: 3px solid var(--yellow);
    background: var(--note-bg);
    color: var(--note-ink);
    border-radius: var(--r-sm);
}

/* A carton label, printed before the forwarding agent collects.

   Read across a warehouse floor by somebody holding a scanner in the other
   hand, so the reference is the only thing on it that is big. */
.label-card { text-align: center; }

.label-mark {
    margin: 0;
    font-size: 2.4rem;
    font-weight: var(--fw-strong);
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
}

.label-count { margin: var(--s-1) 0 var(--s-2); font-size: var(--t-body); color: var(--ink-2); }

/* An admin wearing somebody else's name.

   Not the colour of the panel, because the whole job of this bar is to be the
   thing that does not look like it belongs. It is sticky, so scrolling down a
   long form never leaves somebody believing they are themselves. */
.wearing {
    position: sticky;
    inset-block-start: 0;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-2) var(--s-4);
    background: var(--note-bg);
    border-block-end: 2px solid var(--yellow);
    color: var(--note-ink);
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
}

.wearing form { margin: 0; }

/* The laptop door: three ways in, and nothing else on the page. */
.dev-doors { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* A shop's own mark: square, small, and never stretched. */
.store-logo {
    inline-size: 5rem;
    block-size: 5rem;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--white);
}

/* The mark on the shop's own hero: on the navy, so it keeps a white tile
   under it — most logos are drawn for white and vanish on dark. */
.store-mark {
    display: block;
    inline-size: 4.5rem;
    block-size: 4.5rem;
    object-fit: contain;
    margin-block-end: var(--s-3);
    padding: var(--s-2);
    background: var(--white);
    border-radius: var(--r-md);
}

/* The way to the shop: a button first, the address under it for anybody who
   wants to copy or send it rather than press it. */
.shop-door {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
    margin-block: var(--s-4);
}

/* Arranging a shelf by hand.

   The numbers stay visible and keep working: dragging writes into them, so a
   browser that will not drag leaves a partner exactly where they were. The
   grip only appears once the script has said it can be dragged. */
.arrange { margin: 0; padding: 0; list-style: none; }
.arrange > li { gap: var(--s-3); }
.arrange .grip { display: none; }

.arrange.can-drag > li { cursor: grab; }

.arrange.can-drag .grip {
    display: inline-block;
    color: var(--ink-3);
    letter-spacing: -2px;
    user-select: none;
}

.arrange > li.is-lifted { opacity: .5; }

/* The shop drawn inside the panel, with every part of it a way in.

   Scaled down rather than cropped, so what a partner presses is where it
   actually sits — a preview that rearranges itself teaches the wrong map. */
.preview { margin-block: var(--s-5); }
.preview-note { margin-block-end: var(--s-2); }

.preview-glass {
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    background: var(--surface);
}

.preview-glass .storefront { margin: 0; }
.preview-glass .grid { padding: var(--s-3); }
.preview-glass .shead { padding-inline: var(--s-4); }

/* Each part of the shop carries one button stretched over it.

   The button is the only interactive thing in the region, so the markup under
   it stays a heading, a picture, a card — and pressing anywhere on that part
   opens the box that changes it. */
.dressable { position: relative; display: block; }

.dressable-hit {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    inline-size: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    outline-offset: -3px;
}

/* The mark sits inside the banner, so its own button has to be above the
   banner's. */
/* The hero is a column flex, so a plain inline-block child would stretch the
   whole way across and take the mark's own button with it. */
.dress-mark { position: relative; z-index: 4; display: inline-block; align-self: flex-start; }
.dress-mark .dressable-hit { z-index: 5; }

.dressable-say {
    position: absolute;
    inset-block-end: var(--s-2);
    inset-inline-end: var(--s-2);
    padding: 2px var(--s-2);
    border-radius: var(--r-pill);
    background: var(--navy);
    color: var(--on-navy);
    font-size: var(--t-micro);
    font-weight: var(--fw-strong);
    transition: opacity 120ms ease;
}

.dressable-hit:hover { box-shadow: inset 0 0 0 2px var(--navy); }

/* On something as small as the mark, a sentence would cover the thing it is
   about, so it is one glyph in the corner. The button itself still says the
   whole sentence to a screen reader. */
.dressable-say-tight {
    display: grid;
    place-items: center;
    inline-size: 1.5rem;
    block-size: 1.5rem;
    padding: 0;
    inset-block-end: calc(-1 * var(--s-1));
    inset-inline-end: calc(-1 * var(--s-1));
    font-size: var(--t-small);
}

/* On a phone there is no hovering, so the labels are simply there: a part
   nobody can discover is a part nobody changes. */
@media (hover: hover) {
    .dressable-say { opacity: 0; }
    .dressable-say-tight { opacity: 1; }

    .dressable-hit:hover .dressable-say,
    .dressable-hit:focus-visible .dressable-say { opacity: 1; }
}

/* Changed, and nobody outside this screen has seen it. It sits where the
   label for pressing does not, so the two never cover each other. */
.dress-new {
    position: absolute;
    inset-block-start: var(--s-2);
    inset-inline-end: var(--s-2);
    z-index: 6;
    padding: 2px var(--s-2);
    border-radius: var(--r-pill);
    background: var(--yellow);
    color: var(--navy);
    font-size: var(--t-micro);
    font-weight: var(--fw-strong);
}

/* The mark's own, under the mark rather than across the shop: a chip in the
   corner of the hero would be marking the picture, not the logo. */
.dress-new-logo {
    inset-block-start: auto;
    inset-block-end: calc(-1 * var(--s-2));
    inset-inline-start: 0;
    inset-inline-end: auto;
}


/* Where a picture is not there yet, the space says so rather than collapsing:
   a shop with a hole in it is the point of looking. */
.preview-gap {
    display: grid;
    place-items: center;
    block-size: 6rem;
    background: var(--stage);
    color: var(--ink-3);
    font-size: var(--t-small);
}

.store-mark-empty {
    display: grid;
    place-items: center;
    padding: var(--s-2);
    color: var(--ink-3);
    font-size: 10.5px;
    text-align: center;
}

/* Asking for a picture to be drawn, beside the field it lands in. */
.draw-art {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    align-items: center;
    margin-block-start: var(--s-2);
}

.draw-art input { flex: 1 1 12rem; min-inline-size: 0; }

/* A year of campaign design: the list, and one season beside the shop it
   changes. */
.seasons { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s-2); }

.season-row {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

/* The colour a season is printed in, shown as the colour it is printed in. */
.season-swatch {
    flex: none;
    display: grid;
    place-items: center;
    inline-size: 3rem;
    block-size: 3rem;
    border-radius: var(--r-md);
    background: var(--stage);
}

.season-swatch > img { inline-size: 100%; block-size: 100%; object-fit: contain; }
.season-swatch-yellow { background: var(--yellow); }
.season-swatch-red { background: var(--red); }
.season-swatch-navy { background: var(--navy); }
.season-swatch-green { background: var(--success); }

.season-said { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-inline-size: 0; }
.season-name { font-family: var(--font-display); font-weight: var(--fw-strong); color: var(--navy); text-decoration: none; }
.season-state { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); flex: none; }

/* The form and the shop it changes, side by side where there is room: a design
   approved on another page is a design nobody compared. */
.season-work { display: grid; gap: var(--s-4); align-items: start; }
.season-look { display: flex; flex-direction: column; gap: var(--s-3); }
.season-look > h2 { margin: 0; }

@media (min-width: 60rem) {
    .season-work { grid-template-columns: minmax(22rem, 2fr) 3fr; }
    .season-form { position: sticky; inset-block-start: var(--s-4); }
}

/* A season's own page, under its own picture.

   The name sits on the quiet half of the art with a solid wash behind it, so
   it reads whatever the photograph turns out to be. */
.season-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    min-block-size: 13rem;
    margin-block-end: var(--s-4);
    border-radius: var(--r-lg);
    background: var(--navy);
    box-shadow: var(--shadow-card);
}

.season-hero-art {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

.season-hero-said {
    position: relative;
    z-index: 2;
    inline-size: 100%;
    padding: var(--s-6) var(--s-4) var(--s-4);
    /* Only the foot of the picture is washed, and not heavily: the season's
       art is the reason somebody stopped, and a title can be read over a
       sixth of it. */
    background: color-mix(in srgb, var(--navy) 55%, transparent);
    color: var(--on-navy);
}

.season-hero-said h1 { margin: 0; color: var(--white); }
.season-hero-said .small { margin: var(--s-1) 0 0; color: var(--on-navy-soft); }

/* A season across the top of a shop.

   Typography first: one line on a solid ground, which is what a greeting is.
   A picture behind it is allowed and washed, so the line stays the message
   whatever somebody uploads. */
.dress-strip {
    position: relative;
    overflow: hidden;
    margin-block-end: var(--s-3);
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-lg);
    background: var(--partner-ground);
    color: var(--on-partner);
}

.dress-strip-shot {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

.dress-strip-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--navy) 62%, transparent);
}

.dress-strip-said {
    position: relative;
    z-index: 2;
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-strong);
    font-size: var(--t-title);
    text-wrap: balance;
}

.dress-strip-art .dress-strip-said { color: var(--on-navy); }

/* Whose it is, said where the partner is looking at their own shop. */
.dress-whose {
    position: relative;
    z-index: 2;
    margin-block-start: var(--s-1);
    margin-block-end: 0;
    font-size: var(--t-micro);
    color: var(--on-partner-soft);
}

.dress-strip-art .dress-whose { color: var(--on-navy-muted); }

/* ── The boxes that change a shop, and the bar that publishes them ────────

   A box opens with no script: the button says which one, the browser does the
   rest. A browser too old for that ignores the attribute and renders the box
   in the page, which is the screen this replaced — so the worst case is last
   month's screen rather than a locked door. */
.pop {
    inline-size: min(36rem, calc(100vw - 2 * var(--s-4)));
    max-block-size: 85dvh;
    overflow-y: auto;
    padding: var(--s-5);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-card);
}

.pop::backdrop { background: color-mix(in srgb, var(--navy) 45%, transparent); }
.pop > h2 { margin-block-start: 0; }
.pop .store-banner, .pop .store-logo { margin-block-end: var(--s-3); }

.pop-foot {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    margin-block-start: var(--s-4);
}

/* What is changed and unseen, with the only Publish on the screen. It is not
   drawn at all when there is nothing waiting, so the button never means
   "I think I changed something". */
.unseen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-3);
    margin-block: var(--s-4);
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--yellow);
    border-radius: var(--r-lg);
    background: var(--note-bg);
}

.unseen-said { flex: 1 1 14rem; margin: 0; }
.unseen form { margin: 0; }

/* The card you just arrived at, marked for a moment so the eye finds it. */
.card.is-arrived { box-shadow: inset 0 0 0 2px var(--navy); }

@media (prefers-reduced-motion: reduce) {
    .dressable-say { transition: none; }
}

/* A product tile with the front of the pack on it.

   The photograph fills the frame and keeps its shape; the weight sits on top
   with a ground under it, because white type on an unknown photograph is type
   nobody can read. */
.pv.has-shot {
    position: relative;
    display: block;
    /* A square well, so the photograph fills it instead of floating in a tall
       grey box waiting for a jar that is already there. */
    aspect-ratio: 1 / 1;
    min-block-size: 0;
    overflow: hidden;
}

.pv.has-shot > img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    display: block;
}

/* A product's photographs: the first one large, the rest a strip under it
   that slides sideways. No script — a row that scrolls is a row that works
   with a thumb, a trackpad and a keyboard alike. */
.shots {
    position: relative;
    display: flex;
    gap: var(--s-2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* The same pale ground most packshots are taken on, so the photograph's
       own sweep joins the stage instead of sitting in a white hole. */
    background: var(--stage);
}

.shots > .shot {
    flex: 0 0 100%;
    inline-size: 100%;
    block-size: 18rem;
    object-fit: contain;
    scroll-snap-align: center;
}

/* The gallery scrolls; what is printed on it does not.

   A packshot is shown whole, never cropped, so it needs a stage rather than a
   bleed: a pale ground, a hairline and a rounded edge, which is what makes a
   photograph read as a product rather than as a hole in the page. */
.pdp-art {
    position: relative;
    overflow: hidden;
    margin-block-end: var(--s-4);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

/* The offer beside the price, where it is being weighed up. */
.deal-line {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    margin-block: var(--s-3) 0;
    font-size: var(--t-small);
    color: var(--ink-2);
}

.deal-chip {
    padding: 3px 9px;
    border-radius: var(--r-pill);
    background: var(--red);
    color: var(--white);
    font-family: var(--font-display);
    font-size: var(--t-micro);
    font-weight: var(--fw-strong);
}

/* On the one picture a buyer stops at, the strips are read rather than
   glanced at, so they are given a little more room. */
.pdp-art .promo-top,
.pdp-art .promo-foot {
    padding: 9px var(--s-3);
    font-size: var(--t-small);
}
/* The season's name, set large enough to be the campaign rather than a label
   on it: this is the one picture somebody came to look at. */
.pdp-art .promo-drawn {
    padding-block: 11px;
    font-size: var(--t-title);
    letter-spacing: 0.1em;
}

/* And the line around the stage, in the season's colour. The card's own
   shadow is written again beside it: one shadow property, two jobs. */
.pdp-art:has(.promo-yellow) { box-shadow: inset 0 0 0 2px var(--yellow), var(--shadow-card); }
.pdp-art:has(.promo-red) { box-shadow: inset 0 0 0 2px var(--red), var(--shadow-card); }
.pdp-art:has(.promo-navy) { box-shadow: inset 0 0 0 2px var(--navy), var(--shadow-card); }
.pdp-art:has(.promo-green) { box-shadow: inset 0 0 0 2px var(--success), var(--shadow-card); }
.pdp-art:has(.promo-offer):not(:has(.promo-top)) { box-shadow: inset 0 0 0 2px var(--red), var(--shadow-card); }
.pdp-art:has(.promo-free):not(:has(.promo-top)) { box-shadow: inset 0 0 0 2px var(--success), var(--shadow-card); }


/* ── The shop on a desktop ─────────────────────────────────────────────

   Faizal, 17 October 2026: *app kita tak responsive pada desktop view ...
   banyak sangat ruang kosong bila buka melalui desktop.*

   He was exactly right and it was measurable: on a 1680px monitor the whole
   shop was locked to 768px and centred, so 456px of empty white sat on each
   side — more than half the screen — while the product grid stayed at three
   columns and the category strip at seven fixed 78px tiles.

   This is a phone-first theme and stays one; what was missing was the other
   end of the scale. Four steps, each one widening the page and giving the
   shelves the columns the extra width pays for. Nothing below 64rem changes,
   so the phone this was designed on is untouched.

   The steps are sized so that thirteen aisles fit on one row at every one of
   them: the first attempt widened the page but not enough, and the thirteenth
   tile hung off the edge. */

@media (min-width: 64rem) {
    :root { --page-max: 60rem; }

    .grid { grid-template-columns: repeat(4, 1fr); }

    /* Every aisle on one row, sharing the width, instead of seven fixed
       tiles and a second ragged row. The minimum keeps the sideways scroll
       for the day there are more aisles than a row can hold. */
    .cat-tiles {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(60px, 1fr);
    }

    /* The navigation comes off the floor.

       Faizal, 17 October 2026: *tukar navigasi bawah kepada navigasi atas
       untuk desktop.* A bar fixed to the bottom of a monitor is a thumb
       pattern with no thumb near it; up here it is where a shop's
       navigation has always been.

       Same element, same five links, same current-page marking — it simply
       stops being fixed. Nothing is duplicated, so nothing can drift. */
    .tabbar-bar {
        background: var(--white);
        border-block-end: 1px solid var(--line);
    }

    .tabbar {
        position: static;
        justify-content: flex-start;
        gap: var(--s-6);
        max-width: var(--page-max);
        margin-inline: auto;
        padding: var(--s-2) var(--s-4);
        box-shadow: none;
        border-block-start: 0;
    }

    .tabbar a {
        flex: 0 0 auto;
        max-width: none;
        flex-direction: row;
        gap: var(--s-2);
        min-height: 0;
        padding: var(--s-2) 0;
        font-size: var(--t-small);
    }

    .tabbar .ic { inline-size: 18px; block-size: 18px; }

    /* The bar is in the flow now, so the room kept for a floating one is
       room nobody is standing in. */
    body.is-shop { padding-block-end: 0; }

    /* Two banners read at once rather than one and a sliver of the next. */
    .banners { grid-auto-columns: 49%; }
    .banner { min-block-size: 196px; }
    .banner-title { font-size: 21px; }
    .banner-art { inline-size: 136px; block-size: 136px; }

    .shelf-rail { grid-auto-columns: 23%; }

    /* The offers stop being a row you push. A desktop has the width to show
       every one of them at once, and two tickets at a quarter of 1,344 pixels
       were two tickets and a thousand pixels of nothing. They wrap instead,
       at a size a ticket should be. */
    .coupons {
        grid-auto-flow: row;
        grid-template-columns: repeat(auto-fit, minmax(17rem, 21rem));
        overflow-x: visible;
    }
}

@media (min-width: 75rem) {
    :root { --page-max: 71rem; }

    .grid { grid-template-columns: repeat(5, 1fr); }
    .banners { grid-auto-columns: 32.4%; }
    .shelf-rail { grid-auto-columns: 18.5%; }
}

@media (min-width: 90rem) {
    :root { --page-max: 84rem; }

    .grid { grid-template-columns: repeat(6, 1fr); }
    .shelf-rail { grid-auto-columns: 15.6%; }
}

@media (min-width: 105rem) {
    :root { --page-max: 96rem; }
}

/* ── Motion on the things that are meant to catch an eye ───────────────

   Faizal, 17 October 2026: *deal and something attraction kena macam format
   gif atau something so app nampak lebih dynamic.*

   Drawn rather than filmed. An animated GIF of a banner is one to three
   megabytes, and the same afternoon that asked for this took a page from
   1.9MB to about 100KB — a GIF strip would hand most of that back. These cost
   no bytes at all, stay sharp at any size, animate in the season's own colour
   whatever that turns out to be, and stop dead for anyone who has asked their
   device for less movement.

   Restraint is the point. One slow pass each, nothing blinking, nothing that
   competes with the price. */

@keyframes masapp-sheen {
    0% { transform: translateX(-120%) skewX(-18deg); }
    /* Most of the cycle is the wait, not the sweep. */
    55%, 100% { transform: translateX(320%) skewX(-18deg); }
}

@keyframes masapp-drift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* The deals band: one slow sheen across the navy. */
.deal-band { position: relative; overflow: hidden; }

.deal-band::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    inline-size: 28%;
    pointer-events: none;
    background: linear-gradient(100deg, transparent, var(--sheen), transparent);
    animation: masapp-sheen 7s ease-in-out infinite;
}

/* The saving on a tile — but only on the shelves that exist to sell a
   deal, never on all seventy of them.

   The first version put a looping sheen on every tile on the page: seventy-six
   animations running at once, for ever, on a phone. Dynamic is a few things
   moving where the eye is meant to go; everything moving is a fairground.
   So it runs inside the deals band and on a coupon, and nowhere else. */
/* Not the coupon: its own ::before and ::after are the two notches punched
   out of the ticket's sides, and they sit outside its box. Clipping it to
   add a sheen would clip those off, and a ticket without its notches is a
   rectangle. */
.shelf-rail .promo-offer {
    position: relative;
    overflow: hidden;
}

.shelf-rail .promo-offer::after {
    pointer-events: none;
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    inline-size: 36%;
    background: linear-gradient(100deg, transparent, var(--sheen), transparent);
    animation: masapp-sheen 6s ease-in-out infinite;
}

/* A stagger, so a row does not flash in unison like a sign. */
.shelf-rail > *:nth-child(2n) .promo-offer::after { animation-delay: 1.1s; }
.shelf-rail > *:nth-child(3n) .promo-offer::after { animation-delay: 2.3s; }

/* The banner's own object, breathing. Two or three of these, not seventy. */
.banner-art { animation: masapp-drift 6s ease-in-out infinite; }
.banner:nth-child(2n) .banner-art { animation-delay: 1.5s; }

@media (prefers-reduced-motion: reduce) {
    .deal-band::after,
    .shelf-rail .promo-offer::after { animation: none; opacity: 0; }

    .banner-art { animation: none; }
}

/* ── The shop's small marks ────────────────────────────────────────────

   Faizal, 18 October 2026: *design mereka juga adalah mix antara animation
   dan static, real image and svg.* Measured, the gap was wider than it
   looked — noon carries 725 vector files and 247 drawn inline against about
   a thousand photographs; MASApp carried seven marks, all navigation, and no
   vector files at all. A saving, a delivery promise and a sold-out notice
   all arrived as the same grey sentence.

   Sized in ems so a mark grows with its line, and coloured by currentColor
   so it is always the colour of the words beside it. */
.mk {
    inline-size: 1em;
    block-size: 1em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.12em;
}

/* The lines a mark now leads become rows rather than sentences. */
.deal-tag,
.pc .ship,
.pc .tag-ended {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── While a picture is still on its way ───────────────────────────────

   159 photographs on the front page arrive lazily, and until they did every
   one of their wells was a still grey rectangle. That is most of what made
   the shop feel static beside noon, whose 180 running animations are almost
   entirely shimmer standing in for content not yet loaded.

   Drawn here rather than scripted, because the shop's browsing pages carry
   no JavaScript at all and that is a property worth keeping — it is part of
   why they answer in a second.

   The shimmer runs a fixed eight passes and then stops for good. A picture
   that has arrived is painted over it anyway, so the only thing a longer
   loop would buy is a permanent animation under every tile on the page —
   sixty of them, for ever, on somebody's phone battery. Eight passes is
   about eleven seconds, which is far longer than these take. */
@keyframes masapp-waiting {
    from { background-position: 180% 0; }
    to { background-position: -80% 0; }
}

.pv.has-shot {
    background-image: linear-gradient(100deg, transparent 38%, var(--sheen) 50%, transparent 62%);
    background-size: 220% 100%;
    background-repeat: no-repeat;
    animation: masapp-waiting 1.4s ease-in-out 8;
}

/* ── Something happens when you touch it ───────────────────────────────

   The tile had a hover lift and nothing else, and a phone has no hover: a
   shopper tapping a product got no answer at all until the next page
   arrived. noon gives nearly everything a pressed state — 779 elements with
   transitions against our 72.

   Hover is kept for a mouse, behind a query, so a touch does not get stuck
   in a hover it cannot leave. */
@media (hover: hover) {
    .agent-send:hover { background: var(--navy-2); }

    .cat-tile:hover .cat-photo { transform: translateY(-2px); }

    /* It is a door now, so it answers like one. */
    a.coupon:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
}

.cat-tile,
.cat-photo,
.coupon,
.banner,
.tabbar a,
.btn,
.shead a {
    transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.pc:active { transform: scale(.985); box-shadow: var(--shadow-card); }
.cat-tile:active .cat-photo { transform: scale(.94); }
.banner:active,
.coupon:active { transform: scale(.99); }
.tabbar a:active .ic { transform: scale(.9); }
.btn:active { transform: scale(.97); }
.shead a:active { opacity: .6; }

.tabbar .ic { transition: transform 120ms ease; }

@media (prefers-reduced-motion: reduce) {
    .pv.has-shot { animation: none; background-image: none; }

    /* One name, held still. */
    .search-turns > span { animation: none; opacity: 0; }
    .search-turns > span:first-child { opacity: 1; }

    .cat-tile, .cat-photo, .coupon, .banner, .tabbar a, .btn, .shead a, .tabbar .ic, .agent-send { transition: none; }

    .pc:active,
    .cat-tile:active .cat-photo,
    .banner:active,
    .coupon:active,
    .tabbar a:active .ic,
    .agent-send:active,
    .btn:active { transform: none; }
}

/* ── The language choice, in the bar ───────────────────────────────────

   It used to be a strip of its own under the header: 44 pixels of the best
   row a phone has, spent on a choice most people make once, and carrying a
   second "UAE" a centimetre under "Deliver to the UAE". The choice is now in
   a row that already existed, and the strip is gone. */
.appbar-langs {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    margin-inline-start: auto;
    margin-inline-end: var(--s-3);
    font-size: 12px;
}

.appbar-langs a {
    padding: 4px 6px;
    border-radius: var(--r-sm);
    color: var(--on-navy-muted);
    text-decoration: none;
    white-space: nowrap;
}

.appbar-langs a.on {
    color: var(--on-navy);
    font-weight: var(--fw-strong);
}

.appbar.is-partner .appbar-langs a { color: var(--note-ink); }
.appbar.is-partner .appbar-langs a.on { color: var(--note-ink-strong); }

/* ── The aisles, across the top of a desktop ───────────────────────────

   Hidden on a phone on purpose: there the aisles are photographs on the home
   page and a Categories tab, which is what a thumb wants. A row of twelve
   text links is not. */
.aisles { display: none; }

@media (min-width: 64rem) {
    .aisles {
        display: flex;
        flex-wrap: wrap;
        gap: var(--s-1) var(--s-5);
        max-width: var(--page-max);
        margin-inline: auto;
        padding: 0 var(--s-4) var(--s-3);
    }

    .aisles a {
        padding: var(--s-1) 0;
        color: var(--ink-2);
        font-size: var(--t-small);
        text-decoration: none;
        white-space: nowrap;
        border-block-end: 2px solid transparent;
        transition: color 120ms ease, border-color 120ms ease;
    }

    .aisles a.on {
        color: var(--navy);
        font-weight: var(--fw-strong);
        border-block-end-color: var(--navy);
    }

    .aisles a:active { opacity: .6; }
}

@media (hover: hover) and (min-width: 64rem) {
    .aisles a:hover { color: var(--navy); border-block-end-color: var(--line-strong); }
}

@media (prefers-reduced-motion: reduce) {
    .aisles a { transition: none; }
    .aisles a:active { opacity: 1; }
}

/* ── A row that says it keeps going ────────────────────────────────────

   Faizal, 18 October 2026, next to noon's home: *home page mereka lebih
   lively ... kita punya statics.* Part of that is motion, and part of it is
   this: four rows on our home page can be pushed sideways — the aisles, the
   banners, the coupons, the deals — and not one of them said so. A row of
   products that ends flush with the edge of the screen has ended, as far as
   anybody reading it is concerned, and the rest of the deals were never
   seen.

   Three things, none of them a script. The browsing pages of this shop carry
   no JavaScript at all and that is worth more than any affordance.

   1. The trailing edge fades, so the row visibly runs under the edge of the
      screen rather than stopping at it.
   2. The fade is driven by the row's own scroll position, which is the whole
      point of doing it this way: a row with nothing more to show never fades,
      and a row pushed to its end stops fading. A hint that is still there
      when the thing it hints at is gone is just decoration.
   3. A push lands on a card rather than halfway through one, and it stops at
      the row instead of running on into the browser's back gesture — which on
      a phone took you off the page you were shopping.

   Where scroll-linked animation is not available the fade simply never
   appears, which is exactly what the page did yesterday. */
@property --rail-more {
    syntax: '<length>';
    inherits: false;
    initial-value: 0px;
}

.cat-tiles,
.banners,
.coupons,
.shelf-rail {
    /* The push belongs to the row. Carrying on past its end to turn the
       page's own scroll, or the browser's back swipe, is never what somebody
       pushing a shelf of products meant. */
    overscroll-behavior-inline: contain;
}

.coupons,
.shelf-rail {
    scroll-snap-type: inline proximity;
    scroll-padding-inline: var(--s-4);
}

.coupons > *,
.shelf-rail > * { scroll-snap-align: start; }

/* The stacked variant is a column; there is nothing to push and nothing to
   hint at. */
.coupons-stack { scroll-snap-type: none; }

@supports (animation-timeline: scroll()) {
    .cat-tiles,
    .banners,
    .coupons:not(.coupons-stack),
    .shelf-rail {
        /* black and transparent here are not colours on the page — a mask
           reads only the alpha, and the row keeps whatever ground it sits
           on. */
        mask-image: linear-gradient(to right, black calc(100% - var(--rail-more)), transparent);
        animation: rail-more linear both;
        animation-timeline: scroll(self inline);
        /* Full fade until the last stretch of the push, then down to nothing
           as the end of the row arrives. */
        animation-range: calc(100% - 56px) 100%;
    }

    [dir="rtl"] .cat-tiles,
    [dir="rtl"] .banners,
    [dir="rtl"] .coupons:not(.coupons-stack),
    [dir="rtl"] .shelf-rail {
        mask-image: linear-gradient(to left, black calc(100% - var(--rail-more)), transparent);
    }

    @keyframes rail-more {
        from { --rail-more: 56px; }
        to { --rail-more: 0px; }
    }
}

/* Nothing here moves on its own — the fade only ever follows the reader's own
   finger — but a reader who has asked for stillness gets the row whole. */
@media (prefers-reduced-motion: reduce) {
    .cat-tiles,
    .banners,
    .coupons,
    .shelf-rail {
        animation: none;
        mask-image: none;
    }
}

/* ── One thing held up ─────────────────────────────────────────────────

   Faizal, 18 October 2026, with noon's home page open beside ours: theirs
   gives one thing the room to be looked at, and ours gave sixty-eight the
   same hundred and ninety pixels each. A shelf where everything is the same
   size is a shelf nobody stops at.

   So one product gets a window — the pack shot at four times a tile's area,
   the brand, the name, the words the seller wrote, the price, and the way in.
   On a phone it stacks; from the first desktop step the picture sits beside
   the words, which is where the extra width is worth spending.

   Nothing here claims anything. It is one of the shelf, turned over by the
   day. */
.window {
    margin-block-start: var(--s-2);
    padding: var(--s-4);
    border-radius: var(--r-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.window-of {
    display: grid;
    gap: var(--s-4);
    color: var(--ink);
    text-decoration: none;
}

.window-shot {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--r-lg);
    background: var(--stage);
}

.window-shot > img {
    display: block;
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.window-said { display: flex; flex-direction: column; gap: var(--s-2); }
.window-said h3 { margin: 0; font-size: 19px; line-height: 1.25; text-wrap: balance; max-inline-size: 28ch; }
/* Held to a line somebody can read across. A desktop gives this column nine
   hundred pixels and a sentence run across all of them is a sentence the eye
   loses its place in on the way back. */
.window-said p { margin: 0; font-size: var(--t-small); line-height: 1.6; color: var(--ink-2); max-inline-size: 58ch; }

.window-price {
    font-family: var(--font-display);
    font-size: var(--t-price);
    font-weight: var(--fw-strong);
    letter-spacing: var(--track-tight);
}

/* Not a button: the whole window is the link, and a second thing to press
   inside it is a second thing to miss. This says where it goes. */
.window-go {
    align-self: flex-start;
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    color: var(--navy);
    border-block-end: 2px solid var(--yellow);
}

.window-more { margin-block-start: var(--s-4); }
.shead-sub {
    display: block;
    margin-block-end: var(--s-2);
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    color: var(--ink-2);
}

@media (min-width: 64rem) {
    .window-of { grid-template-columns: 22rem 1fr; align-items: center; }
    .window-said h3 { font-size: 23px; }
}

@media (hover: hover) {
    .window-of:hover .window-go { border-block-end-color: var(--navy); }
}

/* ── Two things a shelf lets you do ────────────────────────────────────

   Faizal, 19 October 2026, after we weighed it: build both, completely, so
   neither has to be thought about again. Keep it, and put it in the basket,
   without leaving the row you are reading.

   The tile is still the link it always was; these are siblings beside it
   inside a wrapper, because a form inside an anchor is not something a
   browser will draw and because a thumb aiming at a heart must not open a
   product instead. Everything the stylesheet matches inside the tile is
   untouched — a wrapper over this card has broken the whole shop once
   already. */
.pc-wrap { position: relative; display: flex; flex-direction: column; }
.pc-wrap > .pc { flex: 1; }

/* The heart sits on the photograph; the basket sits under the card, where a
   thumb reaches last and nothing it covers is being read. */
.pc-keep {
    position: absolute;
    inset-block-start: var(--s-2);
    inset-inline-end: var(--s-2);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 34px;
    block-size: 34px;
    padding: 0;
    border: 0;
    border-radius: var(--r-pill);
    background: var(--white);
    color: var(--ink-3);
    box-shadow: var(--shadow-chip);
    cursor: pointer;
    transition: color 120ms ease, transform 120ms ease;
}
.pc-keep .mk { inline-size: 1.15em; block-size: 1.15em; fill: none; }
.pc-keep.is-kept { color: var(--red); }
.pc-keep.is-kept .mk { fill: currentColor; }
/* Clear of the campaign strip, where there is one. Straddling its lower edge
   put a white disc half on the season's artwork and half on the photograph,
   which reads as a thing that has slipped rather than a thing that was
   placed. */
.pc-wrap:has(.promo-top) .pc-keep { inset-block-start: calc(24px + var(--s-2)); }

.pc-keep:active { transform: scale(.9); }
.pc-keep:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Both boxes step out of the way so the buttons themselves are what the
   wrapper lays out: the heart out of flow over the photograph, the basket as
   the last row of the card. A form's display has nothing to do with whether
   it submits. */
.pc-acts, .pc-act { display: contents; }

.pc-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-1);
    inline-size: 100%;
    min-block-size: var(--touch-min);
    margin-block-start: 6px;
    padding: 0 var(--s-2);
    border: 1px solid var(--navy);
    border-radius: var(--r-md);
    background: var(--navy);
    color: var(--on-navy);
    font: inherit;
    font-size: var(--t-small);
    font-weight: var(--fw-strong);
    cursor: pointer;
    transition: background-color 120ms ease, transform 120ms ease;
}
.pc-add .mk { flex: none; inline-size: 1.1em; block-size: 1.1em; }
.pc-add:active { transform: scale(.98); }
.pc-add:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* Nothing to add, so the quieter of the two: tell me when it is back. It was
   built already and lived on the product page alone, which is one page
   further than most people get. */
.pc-tell { background: var(--white); color: var(--navy); }
.pc-tell.is-asked { background: var(--tint-navy); color: var(--ink-2); border-color: var(--line-strong); }

@media (hover: hover) {
    .pc-keep:hover { color: var(--red); }
    .pc-add:hover { background: var(--navy-2); border-color: var(--navy-2); }
    .pc-tell:hover { background: var(--tint-navy); }
}

@media (prefers-reduced-motion: reduce) {
    .pc-keep, .pc-add { transition: none; }
    .pc-keep:active, .pc-add:active { transform: none; }
}

/* What the shop says back when the page did not come back with it.

   It cannot live where the posted-page notice lives, at the top of the
   document: a press on a tile two screens down would be answered somewhere
   nobody is looking. So it sits above the thumb, clear of the tab bar, and
   takes itself away. */
.notice-said {
    position: fixed;
    inset-inline: var(--s-4);
    inset-block-end: calc(72px + env(safe-area-inset-bottom));
    z-index: 40;
    max-inline-size: 26rem;
    margin-inline: auto;
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-lift);
}

@media (min-width: 64rem) {
    /* The bar is not on the floor up here, so neither is this. */
    .notice-said { inset-block-end: var(--s-5); }
}

/* ── Where you are, while you are in the demonstration ─────────────────

   Faizal, 27 October 2026. The invented catalogue moved behind a door, and a
   door nobody can see they walked through is a trap. This sits above
   everything on every page, in the house's warning colour, and the way out is
   one press. */
.demobar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--s-2) var(--s-4);
    padding: var(--s-3) var(--s-4);
    background: var(--note-bg);
    border-block-end: 1px solid var(--note-line);
    color: var(--note-ink);
    font-size: var(--t-small);
    line-height: 1.4;
    text-align: center;
}

.demobar b { color: var(--note-ink-strong); }
.demobar form { margin: 0; flex: none; }
.demobar .btn { min-block-size: 36px; padding-inline: var(--s-4); font-size: var(--t-small); }
