/* ═══════════════════════════════════════════════════════════════════════════
   lane-account.css: the account lane family (desktop fan-out unit ACCOUNT;
   docs/plans/desktop/audit/account-messaging.md, build units 4 and 5). Linked
   by the layout.

   Five pages: the hub (desktop/pages/Account.php, Browse) and the four pages
   its doors open beside it in Focus (Profile, Notification-Settings,
   Linked-Accounts, Referrals). Built from the kit (kit.css, prefix k-); this
   sheet adds the lfa- parts.

   Rules (kit.css): every selector starts .desktop-surface; no font-weight for
   emphasis (swap the family); fills are full background shorthands; no
   viewport media queries (a part changes form because ITS LANE is narrow,
   @container lane); nothing is fixed or floats over anything: the phone's
   confirm sheet, the change-number card and the language suggestions are
   in-place expansions that push what is under them.

   Contents
     1  Shared: page heads, notes, avatars, people rows
     2  The hub: greeting, alerts, door groups, the Keeper side, foot
     3  Signed out: the door and the code box
     4  Profile
     5  Notifications
     6  Linked accounts
     7  Referrals
     8  Reduced motion
   ═══════════════════════════════════════════════════════════════════════════ */


/* ─── 1. SHARED ────────────────────────────────────────────────────────────── */

.desktop-surface .lfa-page {
    display: grid;
    gap: var(--space-lg);
    align-content: start;
    min-width: 0;
}

.desktop-surface .lfa-head { display: grid; gap: 0.3rem; min-width: 0; }
.desktop-surface .lfa-title { color: var(--ink-blue); }
.desktop-surface .lfa-head .k-meta { max-width: 60ch; }

/* What a panel says back (saved, an error), in place, never a toast */
.desktop-surface .lfa-note {
    margin: 0;
    min-height: 1.4em;
    font-family: var(--font-text);
    font-size: var(--type-meta);
    line-height: 1.4;
    color: var(--text-soft);
}
.desktop-surface .lfa-note:empty { min-height: 0; }
.desktop-surface .lfa-note[data-tone="ok"] { color: var(--ink-green); font-family: var(--font-head); }
.desktop-surface .lfa-note[data-tone="ok"]::before { content: "\2713\00a0"; }
.desktop-surface .lfa-note[data-tone="error"] { color: var(--rt-crimson); font-family: var(--font-head); }

.desktop-surface .lfa-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.desktop-surface .lfa-avatar { --k-size: 2.75rem; display: grid; place-items: center; }
.desktop-surface .lfa-avatar--lg { --k-size: clamp(3.25rem, 2.5rem + 2.4cqi, 4.5rem); }
.desktop-surface .lfa-avatar--blank {
    background: linear-gradient(160deg, var(--rt-blue-slt), #fff);
    color: var(--rt-blue);
    font-size: 1.1rem;
}

.desktop-surface .lfa-person { display: flex; align-items: center; gap: var(--space-md); min-width: 0; }
.desktop-surface .lfa-person-text { display: grid; gap: 0.15rem; min-width: 0; flex: 1 1 auto; }
.desktop-surface .lfa-person-text > p { margin: 0; }
.desktop-surface .lfa-person-name {
    margin: 0;
    font-family: var(--font-head);
    font-size: var(--type-body);
    line-height: 1.25;
    color: var(--text);
    overflow-wrap: anywhere;
}

/* A state page: signed out, nothing to show */
.desktop-surface .lfa-state { min-height: 60%; align-content: center; }
.desktop-surface .lfa-state .k-state { justify-items: center; text-align: center; }

/* A lock on a switch that cannot be changed from here */
.desktop-surface .lfa-lock { color: var(--text-faint); font-size: 0.85em; }


/* ─── 2. THE HUB ───────────────────────────────────────────────────────────── */

.desktop-surface .lfa-hub {
    display: grid;
    gap: var(--space-md);
    align-content: start;
    min-width: 0;
}

/* The greeting: the phone's wave behind the person, glad to see them */
.desktop-surface .lfa-hello {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-md) var(--space-lg);
    padding: clamp(1.1rem, 0.7rem + 2cqi, 2.25rem) clamp(1.1rem, 0.7rem + 2.4cqi, 2.5rem);
    border-radius: var(--r-feature);
    background: var(--wave-mesh);
    box-shadow: var(--shadow-cont);
    color: #fff;
    overflow: hidden;
}

/* A slow drift in the mesh: the greeting is alive, not a banner */
.desktop-surface .lfa-hello::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -30% -10%;
    background:
        radial-gradient(40% 55% at 82% 18%, rgba(235, 93, 143, 0.45) 0%, rgba(235, 93, 143, 0) 70%),
        radial-gradient(38% 50% at 18% 90%, rgba(105, 226, 225, 0.35) 0%, rgba(105, 226, 225, 0) 70%);
    animation: lfa-drift 14s var(--ease-house, ease-in-out) infinite alternate;
    pointer-events: none;
}

@keyframes lfa-drift {
    from { transform: translate3d(-3%, -2%, 0) scale(1); }
    to   { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

.desktop-surface .lfa-hello-photo {
    --k-size: clamp(4.75rem, 3.4rem + 4.6cqi, 8.5rem);
    outline: 4px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 1rem 2rem -0.75rem rgba(10, 20, 40, 0.55);
}

.desktop-surface .lfa-hello-text { display: grid; gap: 0.35rem; min-width: 0; }
.desktop-surface .lfa-hello-hi {
    color: #fff;
    font-size: clamp(2.2rem, 1.2rem + 3.4cqi, calc(4.75rem + 6 * var(--up)));
    text-shadow: var(--shadow-text);
}
.desktop-surface .lfa-hello-name {
    margin: 0;
    font-family: var(--font-head);
    font-size: var(--type-lead);
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.95);
}
.desktop-surface .lfa-hello-since { color: rgba(255, 255, 255, 0.85); }
.desktop-surface .lfa-hello-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.desktop-surface .lfa-badge-link { text-decoration: none; }
.desktop-surface .lfa-badge-link:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* The two sides of one person */
.desktop-surface .lfa-sides { display: grid; gap: 0.5rem; min-width: 0; }
.desktop-surface .lfa-side {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 1rem 0.55rem 0.8rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4);
    color: #fff;
    text-decoration: none;
    transition: transform var(--dur-base) var(--ease-spring), background var(--dur-fast) var(--ease-out);
}
.desktop-surface .lfa-side > i {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1rem;
}
.desktop-surface .lfa-side > span { display: grid; line-height: 1.15; }
.desktop-surface .lfa-side-word { font-family: var(--font-head); font-size: var(--type-body); }
.desktop-surface .lfa-side-say { font-size: var(--type-meta); opacity: 0.85; }
.desktop-surface .lfa-side.is-on { background: rgba(255, 255, 255, 0.94); box-shadow: 0 0.5rem 1.2rem -0.5rem rgba(10, 20, 40, 0.45); color: var(--tone-ink, var(--ink-blue)); }
.desktop-surface .lfa-side.is-on > i { background: var(--tone-fill, var(--fill-blue)); color: #fff; }
.desktop-surface a.lfa-side { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.desktop-surface a.lfa-side:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
    .desktop-surface a.lfa-side:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.22); }
}

/* Alerts under the greeting: a support reply, the ID check */
.desktop-surface .lfa-alert { text-decoration: none; color: var(--text); }
/* A payment due: the hub's loudest fact, with its way to act (fixer L, account item 1) */
.desktop-surface .lfa-alert--due { align-items: center; }
.desktop-surface .lfa-alert--due > div { flex: 1 1 auto; min-width: 0; }
.desktop-surface .lfa-alert-go { flex: none; color: var(--ink-green); }
.desktop-surface .lfa-door-fact--act { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0.25rem 0.6rem -0.25rem rgba(15, 42, 71, 0.45); }
.desktop-surface .lfa-alert:focus-visible { outline: 3px solid var(--rt-blue); outline-offset: 2px; }

/* The door groups: three stacks at a wide Stage (you and help; the Seeker side
   and sharing; the Keeper side), two when the lane is narrower, one at List.
   At one column the stacks dissolve (display: contents) and the groups take
   the order a person reads them in: you, Seeker, Keeper, share, help. */
.desktop-surface .lfa-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
    gap: var(--space-md);
    align-items: start;
}
.desktop-surface .lfa-stack { display: grid; gap: var(--space-md); min-width: 0; align-content: start; }
/* A Keeper's Keeper side is the second stack, so it is never the one that wraps below the fold */
.desktop-surface .lfa-hub[data-keeper="1"] .lfa-stack:nth-child(1) { order: 1; }
.desktop-surface .lfa-hub[data-keeper="1"] .lfa-stack:nth-child(2) { order: 3; }
.desktop-surface .lfa-hub[data-keeper="1"] .lfa-stack:nth-child(3) { order: 2; }
.desktop-surface .lfa-group { min-width: 0; }
.desktop-surface .lfa-doors { padding: 0 0 0.35rem; }
.desktop-surface .lfa-doors > .lfa-door:first-child { border-top: 0; }

@container lane (width < 44rem) {
    .desktop-surface .lfa-groups { grid-template-columns: minmax(0, 1fr); }
    .desktop-surface .lfa-stack { display: contents; }
    .desktop-surface .lfa-group[data-order="1"] { order: 1; }
    .desktop-surface .lfa-group[data-order="2"] { order: 2; }
    .desktop-surface .lfa-group[data-order="3"] { order: 3; }
    .desktop-surface .lfa-group[data-order="4"] { order: 4; }
    .desktop-surface .lfa-group[data-order="5"] { order: 5; }
}

/* A door grows with its panel (the panel is a size container): a wide screen
   gives each door more air and bigger type rather than a half-empty stage. */
.desktop-surface .lfa-door { padding-block: clamp(0.85rem, 0.3rem + 2.2cqi, 1.5rem); align-items: flex-start; }
.desktop-surface .lfa-door .k-row-title { font-size: clamp(1rem, 0.72rem + 1.2cqi, 1.3rem); }
.desktop-surface .lfa-door .k-row-sub { font-size: clamp(0.8125rem, 0.65rem + 0.6cqi, 1rem); }
.desktop-surface .lfa-door > .k-row-chev { align-self: center; }
.desktop-surface .lfa-door-icon {
    width: clamp(2.4rem, 1.7rem + 2.4cqi, 3.1rem);
    height: clamp(2.4rem, 1.7rem + 2.4cqi, 3.1rem);
    border-radius: 0.8rem;
    background: var(--tone-slt, var(--rt-blue-slt));
    color: var(--tone-deep, var(--rt-blue));
    font-size: 1rem;
}
.desktop-surface .lfa-door .k-row-title { color: var(--text); }
.desktop-surface .lfa-door-sub { overflow-wrap: anywhere; }
.desktop-surface .lfa-door-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.3rem;
}
.desktop-surface .lfa-door-fact { white-space: nowrap; }
.desktop-surface .lfa-door[aria-current="true"] .lfa-door-icon { background: var(--fill-blue); color: #fff; }

/* The Keeper side: the dashboard's three tiles, RedTulip Cash, the setup meter */
.desktop-surface .lfa-keeper-body { display: grid; gap: var(--space-md); }
.desktop-surface .lfa-keeper-tilt { max-width: none; padding-inline: 0.4rem; }
.desktop-surface .lfa-keeper-tilt .k-tilt-card { aspect-ratio: auto; min-height: 7.5rem; text-decoration: none; gap: 0.25rem; }
.desktop-surface .lfa-cash {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm) var(--space-md);
    padding: var(--space-md) var(--pad-panel);
    border-radius: var(--r-panel);
    background: var(--fill-navy);
    color: #fff;
}
.desktop-surface .lfa-cash-name { display: grid; gap: 0.1rem; }
.desktop-surface .lfa-cash-name .k-meta { color: rgba(255, 255, 255, 0.82); }
.desktop-surface .lfa-cash-brand { font-family: var(--font-mark); font-size: var(--type-section); letter-spacing: var(--track-snug); }
.desktop-surface .lfa-cash-red { color: var(--rt-pink-lt, #FF9EC0); }
.desktop-surface .lfa-cash-amt { color: #fff; font-size: clamp(2rem, 1.5rem + 1.8cqi, 2.9rem); margin: 0; }
.desktop-surface .lfa-cash-amt > sup { color: #fff; }
.desktop-surface .lfa-setup { display: grid; gap: 0.45rem; }
.desktop-surface .lfa-setup-line { display: flex; justify-content: space-between; gap: var(--space-md); margin: 0; font-size: var(--type-body); }
.desktop-surface .lfa-keeper-note { margin: 0; }
.desktop-surface .lfa-keeper-go { text-decoration: none; }

/* Not a Keeper yet: the phone's "Ready to Earn?" card */
.desktop-surface .lfa-earn-photo {
    height: clamp(8rem, 6rem + 6cqi, 12rem);
    background: var(--rt-pink-slt) center / cover no-repeat;
}
.desktop-surface .lfa-earn-body { display: grid; gap: var(--space-sm); }
.desktop-surface .lfa-earn-title { color: var(--ink-pink); }

.desktop-surface .lfa-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm) var(--space-md);
    padding: var(--space-sm) var(--space-xs) var(--space-lg);
}
.desktop-surface .lfa-signout { text-decoration: none; }

/* The hub beside an open door (List): the greeting folds to a compact row */
@container lane (width < 40rem) {
    .desktop-surface .lfa-hello {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 1rem 1.1rem;
        gap: 0.75rem 1rem;
    }
    .desktop-surface .lfa-hello-photo { --k-size: 4rem; outline-width: 3px; }
    .desktop-surface .lfa-hello-hi { font-size: clamp(1.6rem, 1.1rem + 2.4cqi, 2.2rem); }
    .desktop-surface .lfa-hello-name { font-size: var(--type-body); }
    .desktop-surface .lfa-sides { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
    .desktop-surface .lfa-side { padding: 0.4rem 0.7rem 0.4rem 0.5rem; }
    .desktop-surface .lfa-side > i { width: 1.75rem; height: 1.75rem; font-size: 0.85rem; }
}

@container lane (width < 26rem) {
    .desktop-surface .lfa-hello-since,
    .desktop-surface .lfa-side-say { display: none; }
    .desktop-surface .lfa-door-sub { display: none; }
    /* Info facts fold; a fact that needs action (to pay, unread) never does (fixer L, account item 1) */
    .desktop-surface .lfa-door-facts .lfa-door-fact:not(:first-child):not(.lfa-door-fact--act) { display: none; }
}


/* ─── 3. SIGNED OUT ────────────────────────────────────────────────────────── */

.desktop-surface .lfa-out { gap: var(--space-lg); }
.desktop-surface .lfa-out-hero {
    display: grid;
    gap: var(--space-sm);
    padding: clamp(1.5rem, 1rem + 3cqi, 3.5rem);
    border-radius: var(--r-feature);
    background: var(--wave-mesh);
    box-shadow: var(--shadow-cont);
    color: #fff;
}
.desktop-surface .lfa-out-hero .k-eyebrow,
.desktop-surface .lfa-out-hero .k-lead { color: rgba(255, 255, 255, 0.9); }
.desktop-surface .lfa-out-title { color: #fff; text-shadow: var(--shadow-text); }
.desktop-surface .lfa-out-or { display: block; font-size: 0.55em; letter-spacing: var(--track-snug); }
.desktop-surface .lfa-out-doors { max-width: 36rem; margin-top: var(--space-sm); }
.desktop-surface .lfa-code { max-width: 40rem; }
.desktop-surface .lfa-code-body { display: grid; gap: var(--space-md); justify-items: start; }
.desktop-surface .lfa-code-body > .k-field { width: 100%; }
.desktop-surface .lfa-code-input { font-family: var(--font-head); letter-spacing: 0.08em; text-transform: uppercase; }


/* ─── 4. PROFILE ───────────────────────────────────────────────────────────── */

.desktop-surface .lfa-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: start;
}
.desktop-surface .lfa-sections { display: grid; gap: var(--space-lg); min-width: 0; }

@container lane (width >= 54rem) {
    .desktop-surface .lfa-profile-grid { grid-template-columns: clamp(16rem, 27cqi, 22rem) minmax(0, 1fr); }
    .desktop-surface .lfa-face { position: sticky; top: 0; }
}

/* How others see you. Three forms by the lane's width: a column beside the
   panels (wide), a band across the top (medium), a compact card (narrow). */
.desktop-surface .lfa-face {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: var(--space-md);
    padding: var(--pad-panel) var(--pad-panel) calc(var(--pad-panel) + 0.25rem);
    background: linear-gradient(170deg, rgba(224, 237, 255, 0.96), rgba(255, 255, 255, 0.88) 55%);
    text-align: center;
}
.desktop-surface .lfa-face-id { display: grid; gap: 0.2rem; min-width: 0; }
.desktop-surface .lfa-face-id > p { margin: 0; }
.desktop-surface .lfa-face-name {
    font-family: var(--font-head);
    font-size: var(--type-section);
    line-height: 1.1;
    letter-spacing: var(--track-snug);
    color: var(--text);
    overflow-wrap: anywhere;
}
.desktop-surface .lfa-face-photo {
    position: relative;
    width: clamp(7rem, 5rem + 8cqi, 10.5rem);
    aspect-ratio: 1;
    margin-bottom: 0.6rem;
    border-radius: 50%;
    background: var(--rt-blue-slt) center / cover no-repeat;
    outline: 4px solid #fff;
    box-shadow: var(--shadow-cont-sm);
}
.desktop-surface .lfa-face-photo[aria-busy="true"]::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(30, 40, 53, 0.35);
}
.desktop-surface .lfa-face-edit {
    position: absolute;
    left: 50%;
    bottom: -0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--r-pill);
    background: var(--fill-blue);
    box-shadow: 0 0.35rem 0.8rem var(--glow-blue);
    color: #fff;
    font-family: var(--font-head);
    font-size: var(--type-meta);
    white-space: nowrap;
    transform: translateX(-50%);
    cursor: pointer;
    transition: transform var(--dur-base) var(--ease-spring);
}
.desktop-surface .lfa-face-edit > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.desktop-surface .lfa-face-edit:focus-within { outline: 3px solid var(--rt-blue); outline-offset: 2px; }
.desktop-surface .lfa-face-edit:active { transform: translateX(-50%) scale(0.95); }
.desktop-surface .lfa-face-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
.desktop-surface .lfa-face-langs { display: grid; gap: 0.2rem; }
.desktop-surface .lfa-face-langs > p { margin: 0; }
.desktop-surface .lfa-face-langs-list { font-family: var(--font-head); color: var(--text); }
.desktop-surface .lfa-face-note:empty { display: none; }

/* A band across the top: the photo, who, then badges and languages */
@container lane (width < 54rem) {
    .desktop-surface .lfa-face {
        grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: "photo id langs" "photo badges langs" "note note note";
        justify-items: start;
        align-items: center;
        column-gap: var(--space-lg);
        text-align: left;
    }
    .desktop-surface .lfa-face-photo { grid-area: photo; width: clamp(6rem, 4.5rem + 5cqi, 8rem); }
    .desktop-surface .lfa-face-id { grid-area: id; align-self: end; }
    .desktop-surface .lfa-face-badges { grid-area: badges; justify-content: flex-start; align-self: start; }
    .desktop-surface .lfa-face-langs { grid-area: langs; padding-left: var(--space-lg); border-left: 1px solid var(--glass-rule); }
    .desktop-surface .lfa-face-note { grid-area: note; }
}

/* A compact card: languages under the badges */
@container lane (width < 34rem) {
    .desktop-surface .lfa-face {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas: "photo id" "photo badges" "langs langs" "note note";
    }
    .desktop-surface .lfa-face-photo { width: 5rem; margin-bottom: 0; }
    /* the photo's control becomes a round button on its edge, named for assistive tech */
    .desktop-surface .lfa-face-edit { left: auto; right: -0.35rem; bottom: -0.35rem; width: 2.2rem; height: 2.2rem; padding: 0; justify-content: center; transform: none; }
    .desktop-surface .lfa-face-edit:active { transform: scale(0.95); }
    .desktop-surface .lfa-face-edit > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .desktop-surface .lfa-face-langs { padding-left: 0; border-left: 0; }
}

/* The forms */
.desktop-surface .lfa-form { display: grid; gap: var(--space-md); }
.desktop-surface .lfa-about-grid { grid-template-columns: minmax(0, 1fr); }
@container lane (width >= 34rem) {
    .desktop-surface .lfa-about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.desktop-surface .lfa-save {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm) var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--glass-rule);
}
.desktop-surface .lfa-save > .lfa-note { flex: 1 1 14rem; }
.desktop-surface .lfa-save > .k-btn:disabled { background: var(--ghost-slate, rgba(30, 40, 53, 0.08)), rgba(255, 255, 255, 0.7); box-shadow: inset 0 0 0 2px rgba(30, 40, 53, 0.18); color: var(--text-soft); cursor: default; }

/* Languages: chips, then the field, then the suggestions IN FLOW (they push, never cover) */
.desktop-surface .lfa-lang-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.desktop-surface .lfa-lang-chips:empty { display: none; }
.desktop-surface .lfa-lang-chip { cursor: default; padding-right: 0.45em; }
.desktop-surface .lfa-lang-x {
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 0.15rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    color: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}
.desktop-surface .lfa-lang-x:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.desktop-surface .lfa-lang-add { display: grid; gap: 0.4rem; }
.desktop-surface .lfa-lang-menu { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.desktop-surface .lfa-lang-menu[hidden] { display: none; }
.desktop-surface .lfa-lang-opt {
    padding: 0.35rem 0.8rem;
    border: 0;
    border-radius: var(--r-pill);
    background: #fff;
    box-shadow: inset 0 0 0 1.5px rgba(30, 40, 53, 0.16);
    color: var(--text);
    font-family: var(--font-text);
    font-size: var(--type-meta);
    cursor: pointer;
}
.desktop-surface .lfa-lang-opt[aria-selected="true"] { background: var(--fill-blue); box-shadow: none; color: #fff; }
@media (hover: hover) and (pointer: fine) {
    .desktop-surface .lfa-lang-opt:hover { background: var(--rt-blue-slt); }
}

/* Sign-in and contact: the read-only number with Change, the card under it */
.desktop-surface .lfa-contact { display: grid; gap: var(--space-md); }
.desktop-surface .lfa-phone-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-sm) var(--space-md); }
.desktop-surface .lfa-phone-row > .k-field { flex: 1 1 15rem; }
.desktop-surface .lfa-phone-now,
.desktop-surface .lfa-email-now { position: relative; display: block; }
.desktop-surface .lfa-phone-now > .k-input,
.desktop-surface .lfa-email-now > .k-input { padding-right: 2.6rem; }
.desktop-surface .lfa-phone-now > .k-input[readonly] { background: rgba(240, 243, 246, 0.92); font-family: var(--font-head); letter-spacing: 0.02em; }
.desktop-surface .lfa-verified { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); }
.desktop-surface .lfa-verified.text-success { color: var(--ink-green); }
.desktop-surface .lfa-verified.text-brand { color: var(--ink-pink); }
.desktop-surface .lfa-phone-change[aria-expanded="true"] > i { transform: rotate(180deg); }
.desktop-surface .lfa-phone-change > i { transition: transform var(--dur-base) var(--ease-out); }
.desktop-surface .lfa-step {
    display: grid;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
    padding: var(--pad-panel);
    border-radius: var(--r-panel);
    background: linear-gradient(160deg, rgba(255, 228, 238, 0.85), rgba(255, 255, 255, 0.9));
    box-shadow: inset 4px 0 0 var(--rt-pink);
}
.desktop-surface .lfa-step[hidden] { display: none; }
.desktop-surface .lfa-step > p { margin: 0; }
.desktop-surface .lfa-step-title { color: var(--ink-pink); }
.desktop-surface .lfa-step-alert { margin: 0; }
.desktop-surface .lfa-step-alert[hidden] { display: none; }
.desktop-surface .lfa-step .k-field { max-width: 26rem; }
.desktop-surface .lfa-code-field { font-family: var(--font-head); font-size: var(--type-lead); letter-spacing: 0.3em; }
.desktop-surface .lfa-resend { justify-self: start; }

/* Delete account: quiet, at the foot */
.desktop-surface .lfa-danger { padding: 0.6rem var(--pad-panel); background: rgba(255, 255, 255, 0.55); }
.desktop-surface .lfa-delete > .k-disclosure-sum { color: var(--ink-pink); }
.desktop-surface .lfa-delete .k-disclosure-body > * { margin-block: 0.5rem; }
.desktop-surface .lfa-delete-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
.desktop-surface .lfa-delete-row > .k-input { flex: 1 1 14rem; max-width: 22rem; }


/* ─── 5. NOTIFICATIONS ─────────────────────────────────────────────────────── */

.desktop-surface .lfa-notif-note { min-height: 1.4em; }
.desktop-surface .lfa-notif-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: start;
}
@container lane (width >= 50rem) {
    .desktop-surface .lfa-notif-grid { grid-template-columns: minmax(0, 1fr) clamp(18.5rem, 34cqi, 26rem); }
}
.desktop-surface .lfa-notif-side { display: grid; gap: var(--space-md); min-width: 0; }
.desktop-surface .lfa-push-note { margin: var(--pad-panel) var(--pad-panel) 0; }

.desktop-surface .lfa-matrix {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-sm) 0 0.3rem;
}
.desktop-surface .lfa-matrix th,
.desktop-surface .lfa-matrix td { padding: clamp(0.85rem, 0.4rem + 1.1cqi, 1.5rem) var(--pad-panel); text-align: left; vertical-align: middle; }
.desktop-surface .lfa-matrix thead th { padding-block: 0.4rem; }
.desktop-surface .lfa-matrix thead th:not(:first-child),
.desktop-surface .lfa-matrix td { text-align: center; width: 7.5rem; }
.desktop-surface .lfa-matrix tbody tr { border-top: 1px solid var(--glass-rule); }
.desktop-surface .lfa-matrix-cat { display: flex; align-items: flex-start; gap: var(--space-md); font-weight: normal; }
.desktop-surface .lfa-matrix-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    background: var(--rt-blue-slt);
    color: var(--rt-blue);
}
.desktop-surface .lfa-matrix-text { display: grid; gap: 0.1rem; min-width: 0; }
.desktop-surface .lfa-matrix-name { font-family: var(--font-head); font-size: var(--type-body); color: var(--text); }
.desktop-surface .lfa-matrix-none { color: var(--text-faint); white-space: nowrap; }
.desktop-surface .lfa-matrix .lfa-switch-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.desktop-surface .lfa-switch { gap: 0.5rem; }
.desktop-surface .lfa-switch.is-locked { cursor: not-allowed; }
.desktop-surface .lfa-switch.is-locked > .k-switch-track { opacity: 0.45; }

/* A narrow lane: each category is a card of its own, the switches named */
@container lane (width < 36rem) {
    .desktop-surface .lfa-matrix,
    .desktop-surface .lfa-matrix tbody,
    .desktop-surface .lfa-matrix tr,
    .desktop-surface .lfa-matrix th,
    .desktop-surface .lfa-matrix td { display: block; width: auto; }
    .desktop-surface .lfa-matrix thead { display: none; }
    .desktop-surface .lfa-matrix tbody tr { display: grid; grid-template-columns: 1fr 1fr; padding: 0.4rem 0; }
    .desktop-surface .lfa-matrix tbody th { grid-column: 1 / -1; display: flex; padding-bottom: 0.3rem; }
    .desktop-surface .lfa-matrix td { text-align: left; padding-block: 0.3rem; }
    .desktop-surface .lfa-matrix .lfa-switch-label { position: static; width: auto; height: auto; clip-path: none; }
}

.desktop-surface .lfa-opt-body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); }
.desktop-surface .lfa-opt-text { flex: 1 1 9rem; min-width: 0; display: grid; gap: 0.15rem; }
.desktop-surface .lfa-opt-text > p { margin: 0; }
.desktop-surface .lfa-opt-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    background: var(--rt-purple-slt);
    color: var(--rt-purple-deep);
}
.desktop-surface .lfa-quiet-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: var(--space-sm); padding: 0 var(--pad-panel) var(--pad-panel); }
.desktop-surface .lfa-always { background: rgba(255, 255, 255, 0.55); }
.desktop-surface .lfa-always .lfa-opt-icon { background: rgba(30, 40, 53, 0.08); color: var(--rt-slate); }


/* ─── 6. LINKED ACCOUNTS ───────────────────────────────────────────────────── */

.desktop-surface .lfa-page-alert { margin: 0; }
.desktop-surface .lfa-page-alert[hidden] { display: none; }
.desktop-surface .lfa-linked-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
@container lane (width >= 46rem) {
    .desktop-surface .lfa-linked-grid { grid-template-columns: clamp(18rem, 36cqi, 27rem) minmax(0, 1fr); }
}
.desktop-surface .lfa-linked-side { display: grid; gap: var(--space-lg); min-width: 0; }
.desktop-surface .lfa-me .k-panel-body { display: grid; gap: var(--space-sm); }
.desktop-surface .lfa-me .k-eyebrow { margin: 0; }
.desktop-surface .lfa-switched { margin: 0; }
.desktop-surface .lfa-invite-form { display: grid; gap: var(--space-md); justify-items: start; }
.desktop-surface .lfa-invite-form > .k-field { width: 100%; }
.desktop-surface .lfa-invite-form[hidden],
.desktop-surface .lfa-preview[hidden] { display: none; }
.desktop-surface .lfa-preview { display: grid; gap: var(--space-md); }
.desktop-surface .lfa-person--card { padding: var(--space-md); border-radius: var(--r-panel); background: var(--rt-blue-slt); }

.desktop-surface .lfa-link-list { margin: 0; padding: 0 0 0.4rem; list-style: none; }
.desktop-surface .lfa-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-md);
    padding: var(--space-md) var(--pad-panel);
    border-top: 1px solid var(--glass-rule);
    transition: background var(--dur-fast) var(--ease-out);
}
.desktop-surface .lfa-link-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0; }
.desktop-surface .lfa-link-acts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-left: auto; }
.desktop-surface .lfa-link-acts[hidden] { display: none; }
.desktop-surface .lfa-link.is-asking { background: linear-gradient(90deg, rgba(255, 228, 238, 0.85), rgba(255, 255, 255, 0)); }
.desktop-surface .lfa-ask { flex: 1 1 100%; display: grid; gap: var(--space-sm); padding: var(--space-sm) 0 0; animation: k-unfold var(--dur-base) var(--ease-out) both; }
.desktop-surface .lfa-ask[hidden] { display: none; }
.desktop-surface .lfa-ask-q { margin: 0; }


/* ─── 7. REFERRALS ─────────────────────────────────────────────────────────── */

.desktop-surface .lfa-ref-head { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--space-md); }
.desktop-surface .lfa-ref-head > div { display: grid; gap: 0.25rem; min-width: 0; }
.desktop-surface .lfa-ref-head p { margin: 0; }
.desktop-surface .lfa-ref-who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.desktop-surface .lfa-ref-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
@container lane (width >= 48rem) {
    .desktop-surface .lfa-ref-grid { grid-template-columns: minmax(0, 1fr) clamp(19rem, 40cqi, 30rem); }
}
.desktop-surface .lfa-ref-main { display: grid; gap: var(--space-lg); min-width: 0; }

/* The boost (navy, the phone's KeeperBoost) and the perks trio */
.desktop-surface .lfa-boost-band {
    margin: 0;
    padding: 0.3rem;
    background: linear-gradient(10deg, #FCD34D 25%, #22D3EE 100%);
    color: #0A1428;
    font-family: var(--font-head);
    font-size: var(--type-meta);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
}
.desktop-surface .lfa-boost-body { display: grid; gap: var(--space-md); }
.desktop-surface .lfa-boost-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-md); }
.desktop-surface .lfa-boost-top p { margin: 0; }
.desktop-surface .lfa-boost-brand { font-family: var(--font-head); font-size: var(--type-title); line-height: 1; letter-spacing: var(--track-tight); color: #fff; }
/* The promotion's brand digits ("The 317 Split"): the phone's own mark, ported as is
   (pages/Referrals.php .text-gradient-808, Keeper-Dashboard .kb-brand-gradient). */
.desktop-surface .lfa-boost-digits {
    background: linear-gradient(70deg, #FCD34D 25%, #22D3EE 75%);
    /* impeccable-disable-next-line gradient-text -- Agent: faithful port of the mobile KeeperBoost brand mark (mobile is the component library, direction.md rule 2) */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.desktop-surface .lfa-boost-left { text-align: right; }
.desktop-surface .lfa-boost-amt { color: #fff; }
.desktop-surface .lfa-boost-amt > sup { color: #fff; }
.desktop-surface .lfa-boost-stats { display: flex; flex-wrap: wrap; gap: var(--space-md); margin: 0; color: rgba(255, 255, 255, 0.9); font-size: var(--type-meta); }
.desktop-surface .lfa-boost-stats > span { display: inline-flex; align-items: center; gap: 0.45rem; }
.desktop-surface .lfa-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; }
.desktop-surface .lfa-dot--paid { background: linear-gradient(180deg, #FCD34D, #F59E0B); box-shadow: 0 0 6px rgba(251, 191, 36, 0.6); }
.desktop-surface .lfa-dot--pending { background: linear-gradient(180deg, #67E8F9, #22D3EE); box-shadow: 0 0 6px rgba(34, 211, 238, 0.6); }
.desktop-surface .lfa-boost-say { color: rgba(255, 255, 255, 0.92); }
.desktop-surface .lfa-perks .k-panel-title > i { color: var(--rt-amber, #FCD34D); }
.desktop-surface .lfa-perks-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: var(--space-sm); }
.desktop-surface .lfa-perk {
    display: grid;
    gap: 0.2rem;
    justify-items: center;
    padding: var(--space-md) var(--space-sm);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    text-align: center;
}
.desktop-surface .lfa-perk > p { margin: 0; }
.desktop-surface .lfa-perk-num { font-family: var(--font-head); font-size: clamp(1.6rem, 1.2rem + 1.4cqi, 2.4rem); line-height: 1; color: #fff; letter-spacing: var(--track-tight); }
.desktop-surface .lfa-perk-num > small { font-family: var(--font-text); font-size: 0.45em; opacity: 0.7; letter-spacing: 0; }

/* The code and the link */
.desktop-surface .lfa-code-panel .k-panel-body { display: grid; gap: var(--space-md); justify-items: start; }
.desktop-surface .lfa-code-panel .k-field { width: 100%; max-width: 30rem; }
.desktop-surface .lfa-code-row { position: relative; display: block; }
.desktop-surface .lfa-code-panel .lfa-code-input {
    padding-right: 3rem;
    font-family: var(--font-head);
    font-size: var(--type-section);
    letter-spacing: 0.06em;
    color: var(--ink-blue);
}
.desktop-surface .lfa-code-state { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 1.25rem; }
.desktop-surface .lfa-code-state.is-ok { color: var(--ink-green); }
.desktop-surface .lfa-code-state.is-error { color: var(--rt-crimson); }
.desktop-surface .lfa-share {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md) var(--space-lg);
    align-items: center;
    width: 100%;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--glass-rule);
}
@container (width >= 34rem) {
    .desktop-surface .lfa-share { grid-template-columns: minmax(0, 1fr) auto; }
}
.desktop-surface .lfa-share[hidden] { display: none; }
.desktop-surface .lfa-share-link { display: grid; gap: var(--space-sm); min-width: 0; }
.desktop-surface .lfa-share-link > p { margin: 0; }
.desktop-surface .lfa-share-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.desktop-surface .lfa-share-url { flex: 1 1 14rem; font-family: var(--font-mono); font-size: var(--type-meta); color: var(--text-soft); }
.desktop-surface .lfa-qr-card { display: grid; justify-items: center; gap: 0.4rem; margin: 0; text-align: center; }
.desktop-surface .lfa-qr-card > figcaption { max-width: 13rem; }
.desktop-surface .lfa-qr-img {
    width: clamp(8rem, 6rem + 6cqi, 11rem);
    height: auto;
    aspect-ratio: 1;
    padding: 0.75rem;
    border-radius: var(--r-panel);
    background: #fff;
    box-shadow: var(--shadow-cont-sm-lt);
}

/* My Referrals */
.desktop-surface .lfa-people-list { margin: 0; padding: 0 0 0.4rem; list-style: none; }
.desktop-surface .lfa-person-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--pad-panel);
    border-top: 1px solid var(--glass-rule);
    color: var(--text);
    text-decoration: none;
}
.desktop-surface .lfa-people-list > li:first-child > .lfa-person-row { border-top: 0; }
.desktop-surface .lfa-person-row.is-link { cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.desktop-surface .lfa-person-row.is-link:focus-visible { outline: 3px solid var(--rt-blue); outline-offset: -3px; }
@media (hover: hover) and (pointer: fine) {
    .desktop-surface .lfa-person-row.is-link:hover { background: rgba(224, 237, 255, 0.6); }
}
.desktop-surface .lfa-person-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.desktop-surface .lfa-person-facts { display: block; }
.desktop-surface .lfa-person-since { flex: none; white-space: nowrap; align-self: flex-start; }
.desktop-surface .lfa-person-go { flex: none; color: var(--rt-blue); }
.desktop-surface .lfa-people-empty .k-meta { text-align: center; }

@container lane (width < 26rem) {
    .desktop-surface .lfa-person-since { display: none; }
}


/* ─── 8. REDUCED MOTION ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .desktop-surface .lfa-hello::before { animation: none; }
    .desktop-surface .lfa-ask { animation: none; }
    .desktop-surface .lfa-side,
    .desktop-surface .lfa-face-edit,
    .desktop-surface .lfa-phone-change > i { transition: none; }
}
