/* ==========================================================================
   Roxyon · مساعد — one-page design system
   Palette only: palm / deepest / limestone / sand / ink / muted ink / copper
   Type: IBM Plex Sans Arabic (ar) · IBM Plex Sans (lat) · IBM Plex Mono (labels)
   Rules: hairlines instead of cards, no shadows, logical properties throughout.
   ========================================================================== */

:root {
    --palm: #0E3B2E;
    --deepest: #08251C;
    --limestone: #F4EFE6;
    --sand: #E4DACA;
    --ink: #14140F;
    --muted: #4A4A40;
    --copper: #B6733F;

    --maxw: 1180px;
    --gut: clamp(20px, 5vw, 40px);
    --pad-sec: clamp(64px, 9vw, 128px);
    --gap: clamp(16px, 2vw, 24px);

    --f-ar: 'IBM Plex Sans Arabic', Tahoma, 'Segoe UI', system-ui, sans-serif;
    --f-lat: 'IBM Plex Sans', Tahoma, 'Segoe UI', system-ui, sans-serif;
    --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --rule: 1px solid var(--sand);
    --rule-palm: 1px solid rgba(244, 239, 230, .18);
    --rule-palm-strong: 1px solid rgba(244, 239, 230, .30);

    --ease: cubic-bezier(.2, .6, .35, 1);
    --t: 250ms;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

html body {
    margin: 0;
    background: var(--limestone);
    color: var(--ink);
    font-size: clamp(15.5px, .55vw + 14px, 17px);
    line-height: 1.9;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
    overflow-wrap: break-word;
}

html[lang="ar-SA"] body,
html[lang="ar-SA"] button,
html[lang="ar-SA"] input,
html[lang="ar-SA"] .btn {
    font-family: var(--f-ar);
}

html[lang="en"] body,
html[lang="en"] button,
html[lang="en"] input,
html[lang="en"] .btn {
    font-family: var(--f-lat);
}

html[lang="en"] body {
    line-height: 1.7;
}

h1,
h2,
h3,
p,
figure {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
    font-size: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

input {
    font-size: inherit;
    color: inherit;
}

[hidden] {
    display: none !important;
}

::selection {
    background: var(--copper);
    color: var(--limestone);
}

/* language pairs ---------------------------------------------------------- */

html[lang="ar-SA"] .i-en {
    display: none !important;
}

html[lang="en"] .i-ar {
    display: none !important;
}

/* Each twin carries its own direction and isolates itself, so an English
   paragraph is never laid out as Arabic (period jumping to the line start)
   and Arabic is never laid out as English. */
.i-ar,
.i-en {
    unicode-bidi: isolate;
    text-align: start;
}

.i-ar {
    direction: rtl;
}

.i-en {
    direction: ltr;
}

/* isolated Latin tokens inside Arabic (/ Roxyon, GMT+3, .ics, 8:00 PM) ---- */

.tok {
    unicode-bidi: isolate;
}

/* focus ------------------------------------------------------------------- */

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

.stage-band :focus-visible,
.stage-band input:focus-visible {
    outline-color: var(--copper);
}

.result :focus-visible {
    outline-color: var(--copper);
}

/* --------------------------------------------------------------------------
   Type helpers
   -------------------------------------------------------------------------- */

.mono {
    font-family: var(--f-mono);
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: .06em;
}

.track {
    text-transform: uppercase;
}

.lbl {
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.5;
}

html[lang="en"] .lbl {
    font-family: var(--f-mono);
    font-weight: 400;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.idx {
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

html[lang="en"] .idx {
    font-family: var(--f-mono);
    letter-spacing: .06em;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gut);
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.topbar {
    position: sticky;
    inset-block-start: 0;
    z-index: 60;
    background: transparent;
    border-block-end: 1px solid transparent;
    transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}

.topbar.is-stuck {
    background: var(--limestone);
    border-block-end-color: var(--sand);
}

.topbar-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
}

.brand-mark {
    font-family: var(--f-lat);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1;
    color: var(--ink);
}

.brand-rule {
    width: 1px;
    height: 15px;
    background: var(--sand);
}

.brand-lock {
    font-family: var(--f-ar);
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1;
    color: var(--muted);
}

html[lang="en"] .brand-lock {
    font-family: var(--f-lat);
    letter-spacing: .02em;
}

.topbar-end {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.6vw, 32px);
}

.lang {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    font-size: .75rem;
    line-height: 1;
}

.lang-active-ar,
.lang-active-en {
    font-weight: 600;
    color: var(--ink);
    padding-inline: 2px;
}

.lang-btn {
    font-size: .75rem;
    color: var(--muted);
    padding-inline: 2px;
    min-height: 44px;
    transition: color var(--t) var(--ease);
}

.lang-btn:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--copper);
}

.lang-dot {
    color: var(--sand);
    font-size: .75rem;
}

.lang-active-en,
.lang-btn-ar {
    display: none;
}

html[lang="en"] .lang-active-en {
    display: inline;
}

html[lang="en"] .lang-btn-ar {
    display: inline;
}

html[lang="en"] .lang-active-ar,
html[lang="en"] .lang-btn-en {
    display: none;
}

.signin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-size: .8125rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--muted);
    transition: color var(--t) var(--ease);
}

.signin:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--copper);
}

.dir-ico {
    flex: none;
}

html[dir="ltr"] .dir-ico {
    transform: scaleX(-1);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

/* He stands on the page itself. Nothing is painted behind him but a warm
   room light and the bit of floor he stands on: no card, plate, frame,
   circle, halo or tinted block. The cut-out's own alpha is the only edge,
   and it is already dissolving into this flat limestone. */
.hero {
    position: relative;
    isolation: isolate;
    background: var(--limestone);
    /* the last 44vh belong to him: the copy keeps a 24px gap above his head
       and he stands on the section's own bottom edge */
    padding-block: clamp(6px, 1.4vw, 12px) calc(44vh + 24px);
    margin-block-end: clamp(20px, 4vw, 36px);
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hero-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
}

/* the figure is a stage, not a frame: the box itself draws nothing at all */
.hero-figure {
    position: absolute;
    z-index: 1;
    inset-block-end: 0;
    inset-inline: 0;
    width: 92vw;
    height: 44vh;
    margin-inline: auto;
    padding: 0;
    border: 0;
    background: none;
    pointer-events: none;
}

/* the room light: one soft copper radial behind him, blurred, reaching zero
   long before any edge of its box — so no rectangle can ever show */
.hero-glow {
    position: absolute;
    z-index: 0;
    inset-inline: -14%;
    inset-block: -6% -10%;
    pointer-events: none;
    background: radial-gradient(56% 44% at 50% 40%,
            rgba(198, 124, 78, .20) 0%,
            rgba(198, 124, 78, .12) 42%,
            rgba(198, 124, 78, .04) 68%,
            rgba(198, 124, 78, 0) 86%);
    filter: blur(38px);
}

/* the floor: a wide, soft patch of shade under his body — it fades out
   before it can ever meet an edge */
.hero-floor {
    position: absolute;
    z-index: 1;
    inset-block-end: 0;
    inset-inline-start: 50%;
    width: 62%;
    height: 46px;
    margin-inline-start: -31%;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(92, 70, 48, .16);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 44%, transparent 96%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 44%, transparent 96%);
    filter: blur(22px);
}

/* the warm rim: the same cut-out again, warmer and softer, 6px behind him */
.hero-rim {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: block;
    pointer-events: none;
    opacity: .22;
    filter: blur(16px) sepia(1) saturate(2.4) hue-rotate(-10deg) brightness(1.04);
    transform: translate(6px, 0);
}

/* it must land exactly over the portrait, whatever the box does */
.hero-rim img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center top;
}

/* the portrait itself: contained and never cropped — the face and the
   raised hand stay whole at every width */
.hero-portrait {
    position: relative;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center top;
    border-radius: 0;
    background: none;
    transform-origin: 50% 100%;
    will-change: transform;
}

/* life: one 900ms arrival, then a slow breath — only for visitors who have
   not asked for less motion */
@media (prefers-reduced-motion: no-preference) {
    /* `both`, so he is already waiting at opacity 0 during the 120ms delay —
       no flash of him before the arrival starts */
    .hero-figure {
        opacity: 0;
        animation: hero-enter 900ms cubic-bezier(.2, .7, .2, 1) 120ms both;
    }

    .hero-portrait {
        animation: hero-breathe 9s ease-in-out 1.1s infinite;
    }
}

@keyframes hero-enter {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    50% {
        transform: scale(1.006);
    }
}

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.2;
}

/* the kicker opens the hero: no rule, no dot, just the words */
.hero-kicker .tok {
    color: var(--ink);
}

html[lang="en"] .hero-kicker {
    letter-spacing: .02em;
}

.hero-h1 {
    font-size: clamp(1.875rem, 5.4vw, 2.75rem);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0;
    color: var(--ink);
    text-wrap: balance;
    margin: 0 0 clamp(14px, 1.6vw, 22px);
    /* the headline arrives 80ms behind him, on the same curve */
    animation: hero-rise 700ms cubic-bezier(.2, .7, .2, 1) 80ms both;
}

html[lang="en"] .hero-h1 {
    line-height: 1.18;
    font-weight: 500;
    letter-spacing: -.015em;
}

.hero-ask {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--palm);
    margin: 0 0 clamp(12px, 1.4vw, 18px);
}

html[lang="en"] .hero-ask {
    line-height: 1.35;
}

.hero-lede {
    max-width: 46ch;
    font-size: 1.0625rem;
    line-height: 1.9;
    color: var(--muted);
    margin: 0 0 clamp(24px, 3vw, 34px);
}

html[lang="en"] .hero-lede {
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

/* buttons ----------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6em;
    min-height: 48px;
    padding: 10px 1.5rem;
    border: 1px solid transparent;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.btn-primary {
    background: var(--palm);
    border-color: var(--palm);
    color: var(--limestone);
}

.btn-primary:hover {
    background: var(--deepest);
    border-color: var(--deepest);
}

.btn-ghost {
    background: transparent;
    border-color: rgba(20, 20, 15, .26);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--ink);
}

.btn-ghost[aria-disabled="true"] {
    color: var(--muted);
    border-color: var(--sand);
    cursor: not-allowed;
}

.btn-ghost[aria-disabled="true"]:hover {
    border-color: var(--sand);
}

.btn-light {
    background: var(--limestone);
    border-color: var(--limestone);
    color: var(--palm);
}

.btn-light:hover {
    background: var(--sand);
    border-color: var(--sand);
}

.btn-outline-lime {
    background: transparent;
    border-color: rgba(244, 239, 230, .42);
    color: var(--limestone);
}

.btn-outline-lime:hover {
    border-color: var(--limestone);
}

.btn-outline-lime:disabled {
    color: rgba(244, 239, 230, .40);
    border-color: rgba(244, 239, 230, .18);
    cursor: not-allowed;
}

/* header account call-to-action — same squared stamp as the buttons, small --- */

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 18px;
    background: var(--palm);
    border: 1px solid var(--palm);
    color: var(--limestone);
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.nav-cta:hover {
    background: var(--deepest);
    border-color: var(--deepest);
}

/* in the bar the register action carries the copper accent */
.topbar .nav-cta {
    background: var(--copper);
    border-color: var(--copper);
    color: #fff;
    font-weight: 600;
}

.topbar .nav-cta:hover {
    background: var(--palm);
    border-color: var(--palm);
    color: var(--limestone);
}

/* the register pill shortens on phones, and so do the language labels */
.cta-short,
.lg-mini {
    display: none;
}

/* --------------------------------------------------------------------------
   Top bar on phones — brand · ع/EN · sign in · copper register, one clean row
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
    .topbar-in {
        gap: 8px;
        min-height: 56px;
        flex-wrap: nowrap;
    }

    .brand {
        flex: 0 1 auto;
        min-width: 0;
    }

    .brand-lock,
    .brand-rule {
        display: none;
    }

    .topbar-end {
        flex: none;
        gap: 8px;
    }

    .cta-long {
        display: none;
    }

    .cta-short {
        display: inline;
    }

    /* the language switch folds into a compact two-segment control */
    .lang {
        gap: 2px;
        min-height: 0;
        padding: 2px;
        border: 1px solid var(--sand);
        border-radius: 999px;
    }

    .lang-dot {
        display: none;
    }

    .lg-full {
        display: none;
    }

    .lg-mini {
        display: inline;
    }

    html[lang="ar-SA"] .lang-active-ar,
    html[lang="en"] .lang-active-en,
    html[lang="ar-SA"] .lang-btn-en,
    html[lang="en"] .lang-btn-ar {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding-inline: 8px;
        border-radius: 999px;
        font-size: .75rem;
        font-weight: 600;
        line-height: 1;
    }

    /* the language you are reading is the filled segment */
    html[lang="ar-SA"] .lang-active-ar,
    html[lang="en"] .lang-active-en {
        background: var(--palm);
        color: var(--limestone);
    }

    html[lang="ar-SA"] .lang-btn-en:hover,
    html[lang="en"] .lang-btn-ar:hover {
        background: rgba(182, 115, 63, .12);
        color: var(--ink);
        text-decoration: none;
    }

    .signin {
        gap: 0;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        font-size: .8125rem;
    }

    .signin .dir-ico {
        display: none;
    }

    .topbar .nav-cta {
        min-height: 44px;
        padding: 8px 14px;
        font-size: .8125rem;
    }
}

/* --------------------------------------------------------------------------
   Examples — what Musaed gets done, the bridge into the live panel
   -------------------------------------------------------------------------- */

.examples {
    background: var(--limestone);
    padding-block: 0 clamp(44px, 5.6vw, 76px);
}

.ex-head {
    max-width: 620px;
    margin-inline: auto;
    text-align: center;
}

.ex-kicker {
    margin: 0 0 10px;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--copper);
}

html[lang="en"] .ex-kicker {
    font-family: var(--f-mono);
    font-weight: 400;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.ex-title {
    margin: 0;
    font-size: clamp(1.5rem, 4.2vw, 2.5rem);
    font-weight: 600;
    line-height: 1.45;
    color: var(--palm);
    text-wrap: balance;
}

html[lang="en"] .ex-title {
    line-height: 1.12;
}

.ex-sub {
    max-width: 52ch;
    margin: 12px auto 0;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--muted);
    text-wrap: pretty;
}

html[lang="en"] .ex-sub {
    line-height: 1.65;
}

.ex-grid {
    list-style: none;
    margin: clamp(28px, 3.6vw, 44px) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(16px, 1.4vw, 20px);
}

.ex-cell {
    display: flex;
    min-width: 0;
}

/* the card itself is the button: one tap target, keyboard first-class */
.ex-card {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: clamp(18px, 1.8vw, 22px);
    background: #fff;
    border: 1px solid var(--sand);
    border-radius: 18px;
    font-family: inherit;
    color: inherit;
    text-align: start;
    cursor: pointer;
    transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}

@media (hover: hover) {
    .ex-card:hover {
        border-color: var(--copper);
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(8, 37, 28, .12);
    }

    /* the copper pill flips to deep green as the card lifts */
    .ex-card:hover .ex-btn {
        background: var(--palm);
        border-color: var(--palm);
        color: var(--limestone);
    }

    .ex-card:hover .ex-go {
        transform: translateX(2px);
    }

    .ex-card:hover .ex-plate {
        background: rgba(182, 115, 63, .20);
    }

    .ex-card.is-live:hover {
        box-shadow: 0 0 0 1px var(--copper), 0 14px 28px rgba(8, 37, 28, .12);
    }

    html[dir="rtl"] .ex-card:hover .ex-go {
        transform: scaleX(-1) translateX(2px);
    }
}

.ex-card:active {
    transform: translateY(0) scale(.995);
    box-shadow: 0 4px 10px rgba(8, 37, 28, .10);
}

.ex-card:focus-visible {
    outline: 2px solid var(--copper);
    outline-offset: 3px;
    border-color: var(--copper);
}

.ex-card:focus-visible .ex-btn {
    background: var(--palm);
    border-color: var(--palm);
    color: var(--limestone);
}

.ex-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* the number is filled copper: it reads at a glance and never shifts */
.ex-idx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--copper);
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.35;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

html[lang="en"] .ex-idx {
    font-family: var(--f-mono);
    font-weight: 700;
    letter-spacing: .04em;
}

/* the icon sits on a soft copper plate in the card's top corner */
.ex-plate {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(182, 115, 63, .12);
}

.ex-ico {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--copper);
    stroke-width: 1.75;
}

/* the copper tick: this is the example loaded in the player right now */
.ex-tick {
    display: none;
    position: absolute;
    inset-block-start: -4px;
    inset-inline-end: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--copper);
    box-shadow: 0 0 0 2px #fff;
    align-items: center;
    justify-content: center;
}

.ex-tick::before {
    content: "";
    width: 7px;
    height: 4px;
    margin-block-start: -1px;
    border-left: 2px solid var(--limestone);
    border-bottom: 2px solid var(--limestone);
    transform: rotate(-45deg);
}

.ex-card.is-live .ex-tick {
    display: flex;
}

/* the playing card keeps a 2px copper edge, drawn without moving the layout */
.ex-card.is-live {
    border-color: rgba(182, 115, 63, .55);
    box-shadow: 0 0 0 1px rgba(182, 115, 63, .55);
}

.ex-name {
    font-size: clamp(1.0625rem, 1.1vw, 1.125rem);
    font-weight: 600;
    line-height: 1.5;
    color: var(--ink);
    text-wrap: balance;
}

html[lang="en"] .ex-name {
    line-height: 1.35;
}

/* one short line under the title: what this card actually hands back */
.ex-teas {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-block-start: -6px;
    font-size: .8125rem;
    line-height: 1.55;
    color: var(--muted);
}

.ex-teas::before {
    content: "";
    flex: none;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--copper);
}

/* the eye lands here first: the example most people come for */
.ex-ribbon {
    position: absolute;
    inset-block-start: -12px;
    inset-inline-start: clamp(18px, 1.8vw, 22px);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 3px 11px;
    border-radius: 999px;
    background: var(--copper);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.5;
    box-shadow: 0 0 0 2px var(--limestone);
}

html[lang="en"] .ex-ribbon {
    font-size: .6875rem;
    letter-spacing: .02em;
}

/* the request, quoted back as a soft message */
.ex-bubble {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 11px 12px 12px;
    background: var(--limestone);
    border-radius: 14px;
}

.ex-quote {
    flex: none;
    font-family: var(--f-lat);
    font-size: .875rem;
    line-height: 1.9;
    color: var(--copper);
}

.ex-req {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    margin: 0;
    font-size: .9375rem;
    line-height: 1.75;
    color: var(--muted);
}

html[lang="en"] .ex-req {
    line-height: 1.6;
}

/* the action is a real pill: solid copper, 44px of tap height, full width
   on phones and a stamp of a button once there is room */
.ex-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin-block-start: auto;
    padding: 10px 18px;
    background: var(--copper);
    border: 1px solid var(--copper);
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    color: #fff;
    transition: background-color 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease), transform 220ms var(--ease);
}

.ex-btn-lbl {
    text-align: center;
}

.ex-go {
    flex: none;
    transition: transform 220ms var(--ease);
}

/* the arrow points the way the page reads: left in Arabic, right in English */
html[dir="rtl"] .ex-go {
    transform: scaleX(-1);
}

@media (min-width: 640px) {
    .ex-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ex-btn {
        width: auto;
        align-self: flex-start;
        padding-inline: 22px;
    }
}

@media (min-width: 1024px) {
    .ex-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* --------------------------------------------------------------------------
   Conversation stage — the single dark moment
   -------------------------------------------------------------------------- */

.stage {
    padding-block: 0 var(--pad-sec);
    background: var(--limestone);
}

#conversation {
    scroll-margin-block-start: 72px;
}

#examples {
    scroll-margin-block-start: 72px;
}

.stage-band {
    position: relative;
    max-width: var(--maxw);
    margin-inline: auto;
    background: var(--palm);
    color: var(--limestone);
    border-block: 1px solid var(--deepest);
}

/* a brief copper hairline on the panel's top edge when an example card
   sends us here: one 250ms breath, never a glow */
@keyframes stage-cue {
    0% {
        opacity: 0;
    }

    14% {
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.stage-band::before {
    content: "";
    position: absolute;
    inset-block-start: -1px;
    inset-inline: 0;
    height: 2px;
    background: var(--copper);
    opacity: 0;
    pointer-events: none;
}

.stage-band.is-cued::before {
    animation: stage-cue 250ms var(--ease) 1;
}

.stage-in {
    padding: clamp(20px, 3vw, 34px) clamp(20px, 3.6vw, 44px) clamp(24px, 3.4vw, 40px);
}

.stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding-block-end: clamp(16px, 2vw, 22px);
}

.stage-id {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.stage-id .idx {
    color: var(--copper);
}

.stage-title {
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--limestone);
    letter-spacing: 0;
}

html[lang="en"] .stage-title {
    font-family: var(--f-mono);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 400;
}

.state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(244, 239, 230, .78);
}

html[lang="en"] .state {
    font-family: var(--f-mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 400;
}

.state-dot {
    width: 6px;
    height: 6px;
    flex: none;
    background: transparent;
    border: 1px solid rgba(244, 239, 230, .45);
    transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.state[data-state="writing"] .state-dot,
.state[data-state="result"] .state-dot {
    background: var(--copper);
    border-color: var(--copper);
}

.state-word {
    display: none;
}

[data-state="ready"] .state-word[data-word="ready"],
[data-state="writing"] .state-word[data-word="writing"],
[data-state="result"] .state-word[data-word="result"] {
    display: inline;
}

/* tabs -------------------------------------------------------------------- */

/* pills on the dark band: one row that scrolls on a phone instead of
   breaking into a second line */
.tabs {
    --tabs-pad: clamp(20px, 3.6vw, 44px);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-inline: calc(-1 * var(--tabs-pad));
    padding: 4px var(--tabs-pad) 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* the cut edge fades instead of ending on a hard line */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--tabs-pad), #000 calc(100% - var(--tabs-pad)), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 var(--tabs-pad), #000 calc(100% - var(--tabs-pad)), transparent 100%);
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 9px 15px;
    border: 1px solid rgba(244, 239, 230, .30);
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    color: rgba(244, 239, 230, .72);
    scroll-snap-align: start;
    transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}

.tab:hover {
    color: var(--limestone);
    border-color: rgba(244, 239, 230, .55);
}

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

.tab .idx {
    color: rgba(244, 239, 230, .48);
    transition: color var(--t) var(--ease);
}

/* the chosen example: the one copper chip on the dark band */
.tab[aria-selected="true"] {
    background: var(--copper);
    border-color: var(--copper);
    font-weight: 600;
    color: var(--limestone);
}

.tab[aria-selected="true"] .idx {
    color: rgba(244, 239, 230, .78);
}

/* from 900px up the six chips wrap into a tidy block: no scroll, no fade */
@media (min-width: 900px) {
    .tabs {
        flex-wrap: wrap;
        margin-inline: 0;
        padding-inline: 0;
        overflow: visible;
        scroll-snap-type: none;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

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

.stage-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(20px, 2.6vw, 28px);
    padding-block: clamp(20px, 3vw, 32px) clamp(4px, .6vw, 8px);
}

.stage-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.stage-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.presence {
    display: flex;
    align-items: center;
    gap: 14px;
}

.presence-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    /* he sits straight on the dark panel: no white plate, no glow behind him */
    background: none;
    transform-origin: 50% 50%;
}

/* the copper ring rides on the photograph itself */
.presence-avatar::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px var(--copper);
    pointer-events: none;
}

/* while «مساعد يكتب…» shows, the ring breathes 3px — nothing else moves */
.site.is-writing .presence-avatar {
    animation: presence-pulse 1.5s ease-in-out infinite;
}

@keyframes presence-pulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.034);
    }
}

/* a square portrait filled into the circle: cover keeps the face whole, and
   the 30% anchor keeps his eyes on the circle's centre line */
.presence-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}

.presence-txt {
    min-width: 0;
}

.presence-name {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--limestone);
}

.presence-desc {
    font-size: .8125rem;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0;
    color: rgba(244, 239, 230, .62);
    margin-block-start: 2px;
    margin-inline: 0;
}

/* the line that names the example loaded in the player, above the log */
.now-line {
    margin: 0;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: .04em;
    color: rgba(244, 239, 230, .72);
}

html[lang="en"] .now-line {
    font-family: var(--f-mono);
    font-size: .6875rem;
    font-weight: 400;
}

/* transcript -------------------------------------------------------------- */

.transcript {
    min-height: 172px;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    border: var(--rule-palm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 239, 230, .32) transparent;
    overscroll-behavior-y: contain;
}

.transcript::-webkit-scrollbar {
    width: 6px;
}

.transcript::-webkit-scrollbar-thumb {
    background: rgba(244, 239, 230, .28);
}

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

.turns {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.linkbtn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--limestone);
    border-block-end: 1px solid rgba(244, 239, 230, .42);
    padding: 0 1px;
    transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}

.linkbtn:hover {
    border-block-end-color: var(--copper);
    color: #fff;
}

.turn {
    max-width: 86%;
    padding: 11px 14px;
    border: 1px solid transparent;
}

.turn-you {
    align-self: flex-start;
    background: rgba(182, 115, 63, .16);
    border-color: rgba(182, 115, 63, .42);
    color: var(--limestone);
}

.turn-musaed {
    align-self: flex-end;
    background: rgba(244, 239, 230, .055);
    border-color: rgba(244, 239, 230, .16);
    color: var(--limestone);
}

/* typing: three dots while Musaed answers, gone as soon as the reply lands */
.turn-typing {
    padding-block: 14px;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 10px;
}

.typing-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(244, 239, 230, .72);
    animation: typing-dot 1.1s var(--ease) infinite;
}

.typing-dots i:nth-child(2) {
    animation-delay: .16s;
}

.typing-dots i:nth-child(3) {
    animation-delay: .32s;
}

@keyframes typing-dot {

    0%,
    62%,
    100% {
        opacity: .30;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.turn-body {
    font-size: .9375rem;
    line-height: 1.85;
    letter-spacing: 0;
    overflow-wrap: break-word;
}

html[lang="en"] .turn-body {
    line-height: 1.65;
}

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

.chips-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chips-lbl {
    color: rgba(244, 239, 230, .58);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(244, 239, 230, .28);
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.55;
    text-align: start;
    color: var(--limestone);
    transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}

.chip:hover {
    background: rgba(244, 239, 230, .08);
    border-color: var(--limestone);
}

.chip:disabled {
    color: rgba(244, 239, 230, .40);
    border-color: rgba(244, 239, 230, .16);
    cursor: default;
}

.restart {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: .8125rem;
    font-weight: 500;
    color: rgba(244, 239, 230, .68);
    border-block-end: 1px solid transparent;
    transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.restart:hover {
    color: var(--limestone);
    border-block-end-color: rgba(244, 239, 230, .40);
}

/* result card ------------------------------------------------------------- */

.result {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 22px);
    padding: clamp(20px, 2.6vw, 30px);
    background: var(--limestone);
    color: var(--ink);
}

.result-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-block-end: 12px;
    border-block-end: var(--rule);
}

.result-lbl {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: var(--muted);
    margin: 0;
}

/* CV + cover letter ------------------------------------------------------- */

.cv {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.cv-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -.01em;
    color: var(--ink);
}

.cv-role {
    margin: 0;
    font-size: .875rem;
    line-height: 1.6;
    color: var(--muted);
}

.cv-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding-block-start: 14px;
    border-block-start: var(--rule);
}

.cv-row {
    display: grid;
    grid-template-columns: minmax(84px, auto) minmax(0, 1fr);
    gap: 2px 14px;
    align-items: baseline;
}

.cv-row dt {
    margin: 0;
    font-family: var(--f-mono);
    font-size: .6875rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

html[lang="ar-SA"] .cv-row dt {
    font-family: var(--f-ar);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--palm);
}

.cv-row dd {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.65;
    color: var(--ink);
    overflow-wrap: break-word;
}

.letter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-block-start: 14px;
    border-block-start: var(--rule);
}

.letter-lbl {
    margin: 0 0 2px;
    color: var(--muted);
}

.letter-p {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.8;
    color: var(--ink);
    text-wrap: pretty;
}

html[lang="en"] .letter-p {
    line-height: 1.65;
}

/* the quiet copper way into the product, at the foot of every result */
.result-cta {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    min-height: 44px;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.5;
    color: #8E5730;
    border-block-end: 1px solid transparent;
    transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.result-cta:hover {
    color: #6F4423;
    border-block-end-color: rgba(182, 115, 63, .45);
}

.result-cta .cta-ico {
    flex: none;
    transition: transform var(--t) var(--ease);
}

/* the arrow points the way the page reads */
html[dir="rtl"] .cta-ico {
    transform: scaleX(-1);
}

.result-cta:hover .cta-ico {
    transform: translateX(2px);
}

html[dir="rtl"] .result-cta:hover .cta-ico {
    transform: scaleX(-1) translateX(2px);
}

.result-meta {
    color: var(--muted);
    margin: 0;
}

/* every card says, in small letters, that it is an example */
.result-tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 1px 9px;
    border: 1px solid rgba(182, 115, 63, .38);
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    color: var(--copper);
    white-space: nowrap;
}

html[lang="en"] .result-tag {
    font-family: var(--f-mono);
    font-size: .625rem;
    font-weight: 400;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* the card that just arrived fades in, the way the page reveals */
@keyframes result-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.result.is-in {
    animation: result-in 240ms var(--ease) both;
}

/* money: the title, three figures, then where the saving comes from ------ */

.lead-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.result-lead {
    margin: 0;
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    font-weight: 600;
    line-height: 1.5;
    color: var(--ink);
    text-wrap: balance;
}

html[lang="en"] .result-lead {
    line-height: 1.35;
}

.cv-row dd.money {
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--palm);
}

.save {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-block-start: 14px;
    border-block-start: var(--rule);
}

.save-lbl {
    margin: 0;
    color: var(--muted);
}

.save-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.save-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 12px;
    padding-block: 10px;
    border-block-start: 1px solid var(--sand);
}

.save-row:first-child {
    border-block-start: 0;
    padding-block-start: 4px;
}

.save-name {
    flex: 1 1 auto;
    font-size: .9375rem;
    line-height: 1.6;
    color: var(--ink);
}

.save-flow {
    font-size: .875rem;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    white-space: nowrap;
}

.save-amt {
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
    color: var(--copper);
    white-space: nowrap;
}

.save-total {
    margin: 0;
    padding-block-start: 10px;
    border-block-start: var(--rule);
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.65;
    color: var(--copper);
    text-wrap: pretty;
}

/* an idea, weighed ------------------------------------------------------- */

.verdict {
    margin: 0;
    padding-block-start: 14px;
    border-block-start: var(--rule);
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.75;
    color: var(--copper);
    text-wrap: pretty;
}

/* the invitation: a printed card, sand with a copper rule ----------------- */

.invite {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(20px, 3vw, 28px) clamp(18px, 3vw, 26px) clamp(22px, 3vw, 30px);
    background: var(--sand);
    border-block-start: 3px solid var(--copper);
    border-radius: 0 0 14px 14px;
    text-align: center;
}

.invite-title {
    margin: 0;
    font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
    font-weight: 600;
    line-height: 1.5;
    color: var(--palm);
}

.invite-body {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.85;
    color: var(--ink);
    text-wrap: pretty;
}

html[lang="en"] .invite-body {
    line-height: 1.7;
}

.invite-small {
    margin: 4px 0 0;
    padding-block-start: 10px;
    border-block-start: 1px solid rgba(182, 115, 63, .28);
    font-size: .8125rem;
    line-height: 1.7;
    color: var(--muted);
}

/* study plan -------------------------------------------------------------- */

.plan {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.plan-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 6px 14px;
    padding-block: 12px;
    border-block-start: var(--rule);
}

.plan-row:first-child {
    border-block-start: 0;
    padding-block-start: 0;
}

.plan-day {
    font-family: var(--f-mono);
    font-size: .75rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

html[lang="ar-SA"] .plan-day {
    font-family: var(--f-ar);
    font-size: .8125rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--palm);
}

.plan-ch {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--ink);
    min-width: 0;
    overflow-wrap: break-word;
}

html[lang="en"] .plan-ch {
    font-weight: 500;
}

.plan-min {
    font-size: .8125rem;
    line-height: 1.6;
    color: var(--muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

html[lang="en"] .plan-min {
    font-family: var(--f-mono);
    font-size: .75rem;
    letter-spacing: .06em;
}

.plan-sub {
    font-style: normal;
    font-size: .8125rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--muted);
}

.plan-note {
    padding-block: 12px;
    border-block-start: var(--rule);
    font-size: .8125rem;
    line-height: 1.7;
    color: var(--muted);
}

.plan .on-light {
    display: none;
}

.plan[data-light="1"] .off-light {
    display: none;
}

.plan[data-light="1"] .on-light {
    display: inline;
}

/* the follow-up chip sits under the plan card, on the dark band */
.followup {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* gift ideas -------------------------------------------------------------- */

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

.idea {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-block: 14px;
    border-block-start: var(--rule);
    cursor: pointer;
}

.idea:first-child {
    border-block-start: 0;
    padding-block-start: 0;
}

.idea input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.idea-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: none;
    border: 1px solid rgba(20, 20, 15, .26);
    font-size: .75rem;
    line-height: 1;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}

.idea:hover .idea-mark {
    border-color: var(--palm);
    color: var(--ink);
}

.idea input:checked ~ .idea-mark {
    background: var(--palm);
    border-color: var(--palm);
    color: var(--limestone);
}

.idea input:focus-visible ~ .idea-mark {
    outline: 2px solid var(--copper);
    outline-offset: 3px;
}

.idea-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.idea-title {
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--ink);
    overflow-wrap: break-word;
}

.idea-desc {
    font-size: .875rem;
    line-height: 1.7;
    color: var(--muted);
    overflow-wrap: break-word;
}

.caption {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-block-start: 16px;
    border-block-start: var(--rule);
}

.caption-lbl {
    color: var(--copper);
    margin: 0;
}

.caption-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.9;
    color: var(--ink);
    text-wrap: pretty;
    overflow-wrap: break-word;
}

html[lang="en"] .caption-text {
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   What Musaed does — light band
   -------------------------------------------------------------------------- */

.how {
    background: var(--limestone);
    border-block-start: 1px solid var(--sand);
    padding-block: var(--pad-sec);
}

.how-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.how-title {
    margin: 0;
    font-size: clamp(1.625rem, 4.6vw, 3rem);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    color: var(--palm);
    max-width: 20ch;
    text-wrap: balance;
}

html[lang="en"] .how-title {
    line-height: 1.15;
    max-width: 22ch;
}

.how-lede {
    margin: 0;
    font-size: clamp(.9375rem, 1.1vw, 1.0625rem);
    line-height: 1.9;
    color: var(--muted);
    max-width: 52ch;
    text-wrap: pretty;
}

html[lang="en"] .how-lede {
    line-height: 1.7;
}

.how-list {
    list-style: none;
    margin: clamp(32px, 4.4vw, 52px) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.how-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-block: 20px;
    border-block-start: 1px solid var(--sand);
}

.how-item .idx {
    color: var(--copper);
}

.how-item-title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--ink);
}

.how-item-txt {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.85;
    color: var(--muted);
    max-width: 34ch;
}

html[lang="en"] .how-item-txt {
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Closing
   -------------------------------------------------------------------------- */

.close {
    background: var(--palm);
    color: var(--limestone);
    padding-block: clamp(72px, 10vw, 128px);
}

.close-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.close-title {
    margin: 0;
    font-size: clamp(1.875rem, 5.4vw, 3.5rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    color: var(--limestone);
    text-wrap: balance;
}

html[lang="en"] .close-title {
    line-height: 1.1;
}

.close-sub {
    margin: 0;
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(244, 239, 230, .72);
    max-width: 40ch;
}

.close-act {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px 22px;
    margin-block-start: 12px;
}

.close .linkbtn,
.close-link {
    color: rgba(244, 239, 230, .74);
    border-block-end-color: transparent;
}

.close .linkbtn:hover,
.close-link:hover {
    color: var(--limestone);
    border-block-end-color: var(--copper);
}

.close-note {
    margin: 2px 0 0;
    font-size: .875rem;
    line-height: 1.7;
    color: rgba(244, 239, 230, .62);
    max-width: 44ch;
    text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.foot {
    background: var(--limestone);
    border-block-start: 1px solid var(--sand);
    padding-block: clamp(28px, 4vw, 44px) clamp(24px, 3.4vw, 34px);
}

.foot-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding-block-end: 18px;
    border-block-end: 1px solid var(--sand);
}

.foot-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.foot-lock {
    font-size: .9375rem;
    font-weight: 500;
    color: var(--ink);
}

.foot-line {
    margin: 0;
    font-size: .8125rem;
    line-height: 1.6;
    color: var(--muted);
}

.foot-actions {
    display: flex;
    align-items: center;
    gap: 10px 16px;
}

.foot-signin {
    min-height: 44px;
    color: var(--ink);
}

.foot-row2 {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-block-start: 16px;
}

.foot-row2 p {
    margin: 0;
    font-size: .75rem;
    line-height: 1.7;
    color: var(--muted);
    max-width: 64ch;
}

html[lang="en"] .foot-row2 p {
    font-size: .8125rem;
}

/* --------------------------------------------------------------------------
   Reveal on scroll — section heads only, once
   -------------------------------------------------------------------------- */

.has-reveal .rv {
    opacity: 0;
    transform: translateY(10px);
}

.has-reveal .rv.rv-in {
    opacity: 1;
    transform: none;
    transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 559px) {
    .hero-kicker {
        margin-block-end: 10px;
        font-size: .6875rem;
    }

    .hero-h1 {
        line-height: 1.4;
        margin-block-end: 12px;
    }

    .hero-ask {
        font-size: 1.25rem;
        line-height: 1.5;
        margin-block-end: 8px;
    }

    .hero-lede {
        font-size: 1rem;
        line-height: 1.8;
        margin-block-end: 18px;
    }

    .hero-actions {
        margin-block-end: 0;
    }

    /* the intro and the first card sit close together: no dead air */
    .ex-grid {
        margin-block-start: 16px;
        gap: 14px;
    }

    /* in the footer row the pill keeps a comfortable tap height */
    .foot-actions .nav-cta {
        min-height: 44px;
        padding: 8px 14px;
    }

    .plan-row {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 2px 12px;
    }

    .plan-day {
        grid-column: 1;
        grid-row: 1;
    }

    .plan-min {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .plan-ch {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 379px) {
    /* smallest phones: the same header row, tightened once */
    .topbar-in,
    .topbar-end {
        gap: 6px;
    }

    .brand-mark {
        font-size: 1rem;
    }

    html[lang="ar-SA"] .lang-active-ar,
    html[lang="en"] .lang-active-en,
    html[lang="ar-SA"] .lang-btn-en,
    html[lang="en"] .lang-btn-ar {
        padding-inline: 6px;
        font-size: .6875rem;
    }

    .signin {
        font-size: .75rem;
    }

    .topbar .nav-cta {
        padding: 8px 10px;
        font-size: .75rem;
    }

    .tabs {
        gap: 10px;
    }

    .tab {
        font-size: .8125rem;
    }
}

/* tablets: still stacked — the copy above, his stage below — but taller */
@media (min-width: 768px) and (max-width: 899px) {
    .hero {
        padding-block-end: calc(48vh + 32px);
    }

    .hero-figure {
        width: min(70vw, 500px);
        height: 48vh;
    }
}

@media (min-width: 560px) {
    .hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .close-act {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
}

@media (min-width: 900px) {
    .topbar-in {
        min-height: 66px;
    }

    /* desktop: he owns the inline-start side of the section and stands on its
       floor, his head a little above the headline; the copy takes the other
       side, so the headline, the buttons and the examples stay clear of him */
    .hero {
        display: flex;
        align-items: center;
        min-height: clamp(560px, 61vw, 1000px);
        padding-block: clamp(16px, 2.4vw, 40px) clamp(20px, 3vw, 48px);
        margin-block-end: clamp(24px, 3vw, 56px);
    }

    .hero > .wrap {
        width: 100%;
    }

    .hero-grid {
        display: block;
    }

    .hero-copy {
        max-width: min(580px, 42vw);
        margin-inline-start: auto;
        margin-block-start: 0;
    }

    .hero-figure {
        inset-block-end: 0;
        inset-inline-start: clamp(-48px, -2.5vw, 0px);
        inset-inline-end: auto;
        width: clamp(340px, 46vw, 720px);
        height: auto;
        margin-inline: 0;
    }

    .hero-portrait {
        height: auto;
    }

    .hero-h1 {
        font-size: clamp(2.5rem, 4vw, 3.375rem);
    }

    html[lang="en"] .hero-h1 {
        font-size: clamp(2.25rem, 3.1vw, 2.75rem);
    }

    /* stage */
    .stage-body {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        column-gap: var(--gap);
    }

    .stage-side {
        grid-column: 1 / span 6;
    }

    .stage-main {
        grid-column: 7 / span 6;
    }

    .transcript {
        min-height: 220px;
        max-height: none;
        flex: 1 1 auto;
    }

    /* what Musaed does */
    .how-grid {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        column-gap: var(--gap);
        align-items: start;
    }

    .how-title {
        grid-column: 1 / span 7;
    }

    .how-lede {
        grid-column: 9 / span 4;
    }

    .how-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: var(--gap);
    }

    .how-item {
        padding-block: 20px 4px;
    }

    .foot-row2 {
        flex-direction: row;
        justify-content: space-between;
        gap: 24px;
    }
}

@media (max-width: 430px) {
    .tabs {
        gap: 8px;
    }

    .tab {
        padding-inline: 12px;
        font-size: .8125rem;
    }

    .turn {
        max-width: 94%;
    }

    .cv-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .save-name {
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .has-reveal .rv {
        opacity: 1 !important;
        transform: none !important;
    }

    /* hover keeps its colour change, but nothing moves */
    .ex-card:hover,
    .ex-card:active {
        transform: none;
    }

    .ex-card:hover .ex-go {
        transform: none;
    }

    html[dir="rtl"] .ex-go,
    html[dir="rtl"] .ex-card:hover .ex-go {
        transform: scaleX(-1);
    }
}

@media print {
    .topbar,
    .hero-actions,
    .chips-wrap,
    .restart {
        display: none;
    }
}
