/* ==========================================================================
   Homepage animated sections: "How it works" steps and the mobile app.
   Animations only run once the section is on screen (.is-playing, home-motion.js).
   Prefix: hm-
   ========================================================================== */

/* --------------------------------------------------------------------------
   How it works — three cards, each with a small moving scene
   -------------------------------------------------------------------------- */

.hm-steps-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Dashed line joining the cards, drawn from left to right */
.hm-steps-grid::before {
    content: '';
    position: absolute;
    top: 96px;
    left: 8%;
    right: 8%;
    border-top: 2px dashed rgba(19, 86, 103, .2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.6s var(--site-ease);
}
.is-playing .hm-steps-grid::before { transform: scaleX(1); }

.hm-step {
    position: relative;
    padding: 16px 16px 26px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-lg);
    background: #fff;
    transition: transform .3s var(--site-ease), box-shadow .3s var(--site-ease);
}
.hm-step:hover { transform: translateY(-6px); box-shadow: var(--site-shadow); }
.hm-step h3 { margin: 0 10px 6px; font-size: 1.12rem; font-weight: 700; color: var(--site-ink); }
.hm-step p { margin: 0 10px; font-size: .92rem; line-height: 1.6; color: var(--site-muted); }
.hm-step-num { display: block; margin: 20px 10px 6px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; color: var(--site-accent); }

.hm-scene {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    height: 168px;
    padding: 20px;
    border-radius: 14px;
    background:
        radial-gradient(rgba(19, 86, 103, .12) 1px, transparent 1px) 0 0 / 16px 16px,
        var(--site-soft);
    overflow: hidden;
}

/* Step 1: email types itself, button pulses */
.hm-field {
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--site-line);
    border-radius: 9px;
    background: #fff;
    font-size: .85rem;
    line-height: 32px;
    color: var(--site-ink);
}
.hm-field-short { width: 60%; }
.hm-typed {
    display: inline-block;
    width: 0;
    max-width: 15ch;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: top;
    border-right: 2px solid var(--site-primary);
}
.is-playing .hm-typed { animation: hm-type 4s steps(15) infinite, hm-caret .8s step-end infinite; }
@keyframes hm-type { 0%, 10% { width: 0; } 55%, 100% { width: 15ch; } }
@keyframes hm-caret { 50% { border-color: transparent; } }

.hm-fake-btn {
    align-self: flex-start;
    padding: 7px 16px;
    border-radius: 9px;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--site-primary), var(--site-primary-400));
}
.is-playing .hm-fake-btn { animation: hm-press 4s infinite; }
@keyframes hm-press {
    0%, 60%, 100% { transform: none; box-shadow: none; }
    66% { transform: scale(.94); }
    72% { transform: none; box-shadow: 0 0 0 8px rgba(43, 179, 192, .18); }
}

/* Step 2: plans slide in, the picked one gets selected */
.hm-plans { display: grid; gap: 7px; }
.hm-plan {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--site-line);
    border-radius: 10px;
    font-size: .8rem;
    background: #fff;
}
.hm-plan strong { color: var(--site-ink); }
.hm-plan span { margin-left: auto; font-weight: 700; color: var(--site-ink); white-space: nowrap; }
.hm-plan small { font-weight: 400; color: var(--site-muted); }
.hm-radio { flex: none; width: 15px; height: 15px; border: 1.5px solid #cbd5e1; border-radius: 50%; }
.is-playing .hm-plan { animation: hm-plan-in 6s calc(var(--i) * .15s) infinite; }
.is-playing .hm-plan.is-picked { animation: hm-plan-in 6s calc(var(--i) * .15s) infinite, hm-plan-pick 6s infinite; }
.is-playing .hm-plan.is-picked .hm-radio { animation: hm-radio 6s infinite; }
@keyframes hm-plan-in { 0% { opacity: 0; transform: translateX(-12px); } 8%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes hm-plan-pick {
    0%, 30% { border-color: var(--site-line); box-shadow: none; }
    38%, 90% { border-color: var(--site-primary); box-shadow: 0 0 0 3px rgba(19, 86, 103, .12); }
}
@keyframes hm-radio {
    0%, 30% { border-color: #cbd5e1; box-shadow: none; }
    38%, 90% { border-color: var(--site-primary); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px var(--site-primary); }
}

/* Step 3: payment bar fills, then "successful" */
.hm-pay { padding: 14px; border: 1px solid var(--site-line); border-radius: 12px; background: #fff; }
.hm-pay-head { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--site-muted); }
.hm-pay-head i { margin-right: 4px; color: var(--site-primary); }
.hm-pay-head b { font-size: 1.05rem; color: var(--site-ink); }
.hm-pay-bar { height: 6px; margin: 12px 0; border-radius: 999px; background: var(--site-soft); overflow: hidden; }
.hm-pay-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--site-primary), var(--site-accent)); transform: scaleX(0); transform-origin: left; }
.hm-pay-state { display: grid; font-size: .8rem; font-weight: 600; }
.hm-pay-state span { grid-area: 1 / 1; display: flex; align-items: center; gap: 7px; }
.hm-pay-state .is-wait { color: var(--site-muted); }
.hm-pay-state .is-wait i { color: var(--site-primary); }
.hm-pay-state .is-done { color: var(--site-primary); opacity: 0; }
.hm-pay-state .is-done i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: .55rem; color: #fff; background: var(--site-primary); }
.is-playing .hm-pay-bar i { animation: hm-pay-fill 5s infinite; }
.is-playing .hm-pay-state .is-wait { animation: hm-pay-wait 5s infinite; }
.is-playing .hm-pay-state .is-wait i { animation: e2-spin .9s linear infinite; }
.is-playing .hm-pay-state .is-done { animation: hm-pay-done 5s infinite; }
@keyframes hm-pay-fill { 0%, 8% { transform: scaleX(0); } 55%, 92% { transform: none; } 100% { transform: scaleX(0); } }
@keyframes hm-pay-wait { 0%, 55% { opacity: 1; } 60%, 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes hm-pay-done { 0%, 56% { opacity: 0; transform: scale(.8); } 62%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Step 4: a small dashboard — KPI tiles fade in, the sales line draws itself */
.hm-dash {
    display: grid;
    grid-template-columns: 26px 1fr;
    flex: 1;
    min-height: 0;
    border: 1px solid var(--site-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px -16px rgba(11, 42, 51, .35);
    overflow: hidden;
}
.hm-scene:has(.hm-dash) { padding: 14px; }
.hm-dash-side { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px 0; background: linear-gradient(180deg, var(--site-primary), var(--site-dark)); }
.hm-dash-side b { width: 12px; height: 12px; margin-bottom: 4px; border-radius: 4px; background: var(--site-accent); }
.hm-dash-side i { width: 12px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.hm-dash-side i.is-on { background: #fff; }

.hm-dash-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 7px 9px; }
.hm-dash-top { display: flex; align-items: center; justify-content: space-between; }
.hm-dash-top strong { font-size: .7rem; color: var(--site-ink); }
.hm-live { display: inline-flex; align-items: center; gap: 4px; font-size: .58rem; font-weight: 600; color: var(--site-primary); }
.hm-live::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--site-accent); }

.hm-dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.hm-dash-kpis div { min-width: 0; padding: 4px 6px; border-radius: 6px; background: var(--site-soft); }
.hm-dash-kpis div:first-child { color: #fff; background: linear-gradient(135deg, var(--site-primary), var(--site-primary-400)); }
.hm-dash-kpis small { display: block; font-size: .5rem; opacity: .75; }
.hm-dash-kpis b { display: block; font-size: .72rem; line-height: 1.2; white-space: nowrap; }
.hm-dash-kpis em { font-size: .48rem; font-style: normal; font-weight: 600; color: #10b981; }
.hm-dash-kpis div:first-child em { color: #a7f3d0; }

.hm-dash-chart { flex: 1; width: 100%; min-height: 0; }
.hm-dash-line { fill: none; stroke: var(--site-primary); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

.is-playing .hm-dash-kpis div { animation: e2-once-in .5s calc(var(--i) * .15s) var(--site-ease) both; }
.is-playing .hm-dash-line { stroke-dasharray: 100; animation: e2-once-draw 1.4s .4s ease-out both; }
.is-playing .hm-dash-area { animation: e2-once-fade .8s 1.2s both; }
/* Play-once animations (they stay at the end, no blinking) */
@keyframes e2-once-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes e2-once-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes e2-once-fade { from { opacity: 0; } }
@keyframes e2-once-bar { from { transform: scaleX(0); } }
@keyframes hm-kpi { 0% { opacity: 0; transform: translateY(6px); } 10%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes hm-draw { 0%, 15% { stroke-dashoffset: 100; } 55%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 100; } }
@keyframes hm-area { 0%, 40% { opacity: 0; } 60%, 92% { opacity: 1; } 100% { opacity: 0; } }

/* Shared: fade up into place, and a line that fills from left to right */
@keyframes hm-in { to { opacity: 1; transform: none; } }
@keyframes hm-progress { to { transform: scaleX(1); } }

/* --------------------------------------------------------------------------
   Mobile app — step list on the left, two phones on the right
   -------------------------------------------------------------------------- */

.ma-steps { margin: 32px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--site-line); }
.ma-steps button {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 22px;
    width: 100%;
    padding: 16px 0;
    border: 0;
    border-bottom: 1px solid var(--site-line);
    background: none;
    text-align: left;
    color: var(--site-muted);
}
.ma-num { padding-top: 3px; font-size: .78rem; font-weight: 600; letter-spacing: .06em; color: #94a3b8; font-variant-numeric: tabular-nums; }
.ma-steps strong { display: block; font-size: 1.1rem; font-weight: 600; color: #94a3b8; transition: color .25s; }
.ma-steps small { display: block; max-height: 0; overflow: hidden; font-size: .92rem; line-height: 1.55; color: var(--site-muted); transition: max-height .4s var(--site-ease), margin .4s; }
.ma-steps button:hover strong { color: var(--site-text); }
.ma-steps .is-active strong, .ma-steps .is-active .ma-num { color: var(--site-ink); }
.ma-steps .is-active small { max-height: 4.8em; margin-top: 6px; }

/* Progress line on top of the active step */
.ma-bar { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--site-primary); transform: scaleX(0); transform-origin: left; }
.ma-steps .is-active .ma-bar { animation: hm-progress var(--app-time, 4.5s) linear forwards; }
.ma.is-paused .ma-bar { animation-play-state: paused; }

.ma-get { display: flex; align-items: center; gap: 14px; margin-top: 28px; font-size: .92rem; color: var(--site-muted); }

/* Stage */
.ma-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 28px 40px;
    border-radius: 28px;
    background:
        radial-gradient(rgba(19, 86, 103, .1) 1px, transparent 1px) 0 0 / 18px 18px,
        linear-gradient(160deg, #eaf4f7, #f6f9fb);
    overflow: hidden;
    isolation: isolate;
}

/* Soft teal glow and two slowly turning rings behind the phone */
.ma-glow { position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(43, 179, 192, .35), transparent 65%); filter: blur(10px); }
.ma-ring-deco { position: absolute; z-index: -1; width: 78%; aspect-ratio: 1; border: 1.5px dashed rgba(19, 86, 103, .22); border-radius: 50%; animation: e2-spin-slow 50s linear infinite; }
.ma-ring-deco.is-big { width: 112%; border-style: solid; border-color: rgba(19, 86, 103, .1); animation-duration: 80s; animation-direction: reverse; }

/* Feature badges floating around the phone */
.ma-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px 7px 7px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--site-muted);
    background: rgba(255, 255, 255, .85);
    box-shadow: var(--site-shadow-sm);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: ma-float 6s ease-in-out infinite;
    transition: color .3s, background .3s, box-shadow .3s, scale .3s;
}
.ma-chip i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .7rem; color: var(--site-primary); background: var(--site-primary-50); transition: inherit; }
.ma-chip.is-on { scale: 1.08; color: var(--site-ink); background: #fff; box-shadow: 0 14px 30px -12px rgba(19, 86, 103, .55); }
.ma-chip.is-on i { color: #fff; background: linear-gradient(135deg, var(--site-primary), var(--site-accent)); }
.ma-chip-1 { top: 12%; left: 4%; }
.ma-chip-2 { top: 30%; right: 3%; animation-delay: -1.5s; }
.ma-chip-3 { top: 52%; left: 2%; animation-delay: -3s; }
.ma-chip-4 { top: 70%; right: 5%; animation-delay: -4.5s; }
.ma-chip-5 { bottom: 7%; left: 8%; animation-delay: -2s; }
@keyframes ma-float { 50% { translate: 0 -8px; } }

/* Device: tilts towards the mouse (home-motion.js sets --rx / --ry) and bobs gently */
.ma-device {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 52%;
    max-width: 270px;
    transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .4s var(--site-ease);
}
.ma-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--site-text);
    background: #fff;
}
.ma-tag i { color: var(--site-primary); }

/* Metal frame */
.ma-shell {
    position: relative;
    width: 100%;
    padding: 9px;
    border-radius: 46px;
    background: linear-gradient(145deg, #3c4a54, #12191e 45%, #2b363e);
    box-shadow:
        inset 0 0 0 1.5px rgba(255, 255, 255, .18),
        0 50px 80px -40px rgba(11, 42, 51, .65),
        0 20px 40px -24px rgba(19, 86, 103, .5);
    animation: ma-bob 7s ease-in-out infinite;
}
@keyframes ma-bob { 50% { transform: translateY(-10px); } }

/* Shadow on the floor, shrinks as the phone lifts */
.ma-shadow { width: 70%; height: 16px; margin-top: -2px; border-radius: 50%; background: radial-gradient(closest-side, rgba(11, 42, 51, .3), transparent); animation: ma-shadow 7s ease-in-out infinite; }
@keyframes ma-shadow { 50% { transform: scaleX(.82); opacity: .6; } }

/* Phone — drawn like the real ERP2ALL HR app: teal bar, grey-blue page, white cards.
   Everything inside uses em, so the whole screen scales with the phone. */
.ma-phone {
    --app: #00687f;
    --app-bg: #cdd9df;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    aspect-ratio: 9 / 18.5;
    border-radius: 37px;
    font-family: 'Ubuntu Condensed', 'Ubuntu', sans-serif;
    font-size: 15px;
    color: #37474f;
    background: var(--app-bg);
    overflow: hidden;
}
.ma-status { display: flex; align-items: center; justify-content: space-between; padding: .7em 1.2em .3em; font-family: 'Ubuntu', sans-serif; font-size: .72em; color: #fff; background: var(--app); }
.ma-status i { width: 6em; height: 1.6em; border-radius: 999px; background: #0b2a33; }
.ma-status em { width: 1.6em; height: .8em; border: 1.5px solid #fff; border-radius: 3px; }

.ma-screen { display: flex; flex-direction: column; flex: 1; min-height: 0; animation: ma-screen .45s var(--site-ease); }
.ma-screen[hidden] { display: none; }
@keyframes ma-screen { from { opacity: 0; transform: translateX(14px); } }
.ma-appbar { position: relative; display: flex; align-items: center; justify-content: center; padding: .7em 1em .9em; color: #fff; background: var(--app); }
.ma-appbar i { position: absolute; left: 1em; font-size: .9em; }
.ma-appbar b { font-size: .95em; font-weight: 400; white-space: nowrap; }
.ma-body { flex: 1; padding: .9em .7em 6em; overflow: hidden; }

/* Dashboard: greeting and leave cards with rings */
.ma-hello { display: block; font-size: .78em; color: #546e7a; }
.ma-name { display: block; margin-bottom: .7em; font-size: 1.1em; font-weight: 700; color: var(--app); }
.ma-leaves { display: grid; grid-template-columns: 1fr 1fr; gap: .45em; }
.ma-leave {
    display: flex;
    align-items: center;
    gap: .45em;
    padding: .55em .45em;
    border-radius: .8em;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
    opacity: 0;
    animation: hm-in .4s calc(.15s + var(--i) * .15s) var(--site-ease) forwards;
}
.ma-leave svg { flex: none; width: 2.1em; height: 2.1em; transform: rotate(-90deg); }
.ma-leave circle { fill: none; stroke-width: 3.2; }
.ma-ring-bg { stroke: #eceff1; }
.ma-ring { stroke: var(--c); stroke-dasharray: 0 100; animation: ma-ring 1s calc(.4s + var(--i) * .15s) var(--site-ease) forwards; }
@keyframes ma-ring { to { stroke-dasharray: var(--p) 100; } }
.ma-leave b { display: block; font-size: .62em; font-weight: 400; line-height: 1.2; color: #263238; }
.ma-leave small { display: block; font-size: .5em; line-height: 1.45; color: #607d8b; }
.ma-leave em { font-style: normal; font-weight: 700; color: #37474f; }

/* Leave form: fields fill in, then Submit is tapped */
.ma-form { display: grid; gap: .5em; padding: .8em; border-radius: .8em; background: #fff; }
.ma-form label { display: block; margin: 0; opacity: 0; animation: hm-in .35s calc(.2s + var(--i) * .3s) forwards; }
.ma-form small { display: block; font-size: .6em; color: #78909c; }
.ma-form label span { display: flex; justify-content: space-between; padding: .25em 0 .3em; border-bottom: 1.5px solid #cfd8dc; font-size: .78em; color: #263238; }
.ma-typed { display: block; width: 0; overflow: hidden; white-space: nowrap; animation: ma-type 1s 1.4s steps(14) forwards; }
@keyframes ma-type { to { width: 100%; } }
.ma-days { padding: .45em .6em; border-radius: .5em; font-size: .62em; color: var(--app); background: #e0f2f5; opacity: 0; animation: hm-in .35s 1.7s forwards; }
.ma-submit { margin-top: .2em; padding: .55em 0; border-radius: .5em; font-size: .78em; text-align: center; color: #fff; background: var(--app); animation: ma-tap .8s 2.6s both; }

/* Lists: attendance, payslips, team */
.ma-list { display: grid; gap: .4em; margin: 0; padding: 0; list-style: none; }
.ma-list li {
    display: flex;
    align-items: center;
    gap: .5em;
    padding: .55em .6em;
    border-radius: .7em;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .06);
    opacity: 0;
    animation: hm-in .4s calc(.2s + var(--i) * .25s) var(--site-ease) forwards;
}
.ma-list li > span { min-width: 0; }
.ma-list b { display: block; font-size: .72em; font-weight: 400; color: #263238; }
.ma-list small { display: block; font-size: .56em; color: #78909c; white-space: nowrap; }
.ma-list em { margin-left: auto; padding: .2em .5em; border-radius: 999px; font-size: .52em; font-style: normal; white-space: nowrap; }
.is-green { color: #2e7d32; background: #e8f5e9; }
.is-blue { color: #00687f; background: #e0f2f5; }
.is-amber { color: #b45309; background: #fef3c7; }
.ma-flip { display: grid; padding: 0; background: none; }
.ma-flip span { grid-area: 1 / 1; padding: .2em .5em; border-radius: 999px; }
.ma-flip span:first-child { color: #b45309; background: #fef3c7; animation: ma-out .3s 1.6s forwards; }
.ma-flip span:last-child { color: #2e7d32; background: #e8f5e9; opacity: 0; transform: scale(.6); animation: ma-pop .4s 1.7s var(--site-ease) forwards; }
@keyframes ma-out { to { opacity: 0; } }
@keyframes ma-pop { to { opacity: 1; transform: none; } }
.ma-dl { margin-left: auto; font-size: .7em; color: var(--app); }
.ma-list li:first-child .ma-dl { animation: ma-bounce 1s 1.4s 2; }
@keyframes ma-bounce { 50% { transform: translateY(3px); } }

/* Tap effect (Submit button) */
@keyframes ma-tap {
    0% { transform: none; }
    30% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(0, 104, 127, .5); }
    60%, 100% { transform: none; box-shadow: 0 0 0 10px rgba(0, 104, 127, 0); }
}

/* Bottom bar with the round menu button */
.ma-nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 3.4em;
    padding-bottom: .3em;
    background: #fff;
    font-size: 1em;
    color: var(--app);
}
.ma-nav > i { font-size: 1.05em; }
.ma-fab { display: grid; place-items: center; width: 2.6em; height: 2.6em; margin-top: -1.6em; border: .25em solid var(--app-bg); border-radius: 50%; font-size: .9em; color: #fff; background: var(--app); box-shadow: 0 3px 6px rgba(0, 0, 0, .25); }

/* --------------------------------------------------------------------------
   Feature split — two phones in place of the old pictures (reuses the ma- phone)
   -------------------------------------------------------------------------- */

/* No glow circle or dots behind these phones */
.e2-showcase:has(.fx-device)::before,
.e2-showcase:has(.fx-device)::after { display: none; }
.fx-device { position: relative; z-index: 1; width: 260px; max-width: 100%; margin: 0 auto; }
.fx-device .ma-shell { animation: ma-bob 7s ease-in-out infinite; }
.fx-device .ma-body { padding-bottom: .9em; }

/* Small badge on the side of the phone */
.fx-badge {
    position: absolute;
    z-index: 2;
    top: 16%;
    left: calc(50% + 100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px 9px 9px;
    border: 1px solid var(--site-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 36px -18px rgba(11, 42, 51, .35);
    animation: ma-float 6s ease-in-out infinite;
}
.fx-badge > i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: .85rem; color: #fff; background: var(--site-primary); }
.fx-badge b { display: block; font-size: .82rem; line-height: 1.2; color: var(--site-ink); white-space: nowrap; }
.fx-badge small { display: flex; align-items: center; gap: 5px; font-size: .7rem; color: var(--site-muted); white-space: nowrap; }
.fx-badge em { width: 6px; height: 6px; border-radius: 50%; background: var(--site-accent); }
@media (max-width: 575.98px) {
    .fx-badge { top: 0; left: 50%; translate: -50% 0; animation: none; }
}

/* Connected modules phone (same clean cards as the Reports phone) */
.cn-status { display: flex; align-items: center; gap: .6em; }
.cn-check { display: grid; place-items: center; flex: none; width: 2.1em; height: 2.1em; border-radius: 50%; font-size: .7em; color: #fff; background: var(--app); }
.cn-status b { display: block; font-size: .7em; font-weight: 400; color: #263238; }
.cn-status small { display: block; font-size: .52em; color: #78909c; }
.cn-live { width: .5em; height: .5em; margin-left: auto; border-radius: 50%; background: #2bb3c0; }

.cn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4em; margin: .45em 0; }
.cn-grid .rp-card { padding: .55em .2em; text-align: center; transition: none; }
.cn-ic { position: relative; display: grid; place-items: center; width: 2.4em; height: 2.4em; margin: 0 auto .35em; border-radius: .6em; font-size: .62em; color: var(--app); background: rgba(0, 104, 127, .1); overflow: hidden; }
.cn-ic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: .25em; background: #fff; }
.cn-grid small { display: -webkit-box; font-size: .5em; line-height: 1.25; color: #546e7a; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes cn-glow { 0%, 14%, 100% { box-shadow: 0 2px 4px rgba(0, 0, 0, .06); } 4%, 10% { box-shadow: 0 0 0 1.5px var(--app); } }

.cn-row { display: flex; align-items: center; gap: .55em; }
.cn-row + .cn-row { margin-top: .5em; padding-top: .5em; border-top: 1px solid #eef2f4; }
.cn-row > i { display: grid; place-items: center; flex: none; width: 2em; height: 2em; border-radius: .5em; font-size: .58em; color: var(--app); background: rgba(0, 104, 127, .1); }
.cn-row b { display: block; font-size: .6em; font-weight: 400; color: #263238; }
.cn-row small { display: block; font-size: .5em; color: #78909c; }
.cn-row em { margin-left: auto; font-size: .48em; font-style: normal; color: #90a4ae; }
.is-playing .cn-row { animation: e2-once-in .5s calc(var(--i) * .2s) var(--site-ease) both; }
@keyframes cn-in { 0% { opacity: 0; transform: translateY(.4em); } 10%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Reports phone: period switch, sales chart, small numbers, top products */
.fx-device .ma-body.rp { padding-bottom: 4.2em; }
.ma-appbar .rp-filter { left: auto; right: 1em; font-size: .75em; }
.rp-card { padding: .6em .7em; border-radius: .8em; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .06); }
.rp-tabs { display: flex; gap: .25em; margin-bottom: .55em; padding: .2em; border-radius: 999px; background: rgba(255, 255, 255, .6); }
.rp-tabs span { flex: 1; padding: .3em 0; border-radius: 999px; font-size: .6em; text-align: center; color: #607d8b; }
.rp-tabs .is-on { color: #fff; background: var(--app); }

.rp-sales-top { display: flex; align-items: flex-start; justify-content: space-between; }
.rp-sales-top small, .rp-label { display: block; font-size: .56em; color: #78909c; }
.rp-sales-top b { display: block; font-size: 1.15em; line-height: 1.25; color: #263238; }
.rp-sales-top em { padding: .25em .5em; border-radius: 999px; font-size: .52em; font-style: normal; color: var(--app); background: rgba(0, 104, 127, .1); }
.rp-sales-top em i { font-size: .85em; }
.rp-chart { display: block; width: 100%; height: 3.6em; margin-top: .4em; }
.rp-area { fill: url(#rpFill); }
.rp-path { fill: none; stroke: var(--app); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 100; }
.is-playing .rp-path { animation: e2-once-draw 1.4s .2s ease-out both; }
.is-playing .rp-area { animation: e2-once-fade .8s .9s both; }
@keyframes rp-fade { 0%, 10% { opacity: 0; } 30%, 92% { opacity: 1; } 100% { opacity: 0; } }
.rp-hours { display: flex; justify-content: space-between; margin-top: .2em; font-size: .48em; color: #90a4ae; }

.rp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4em; margin: .45em 0; }
.rp-stats .rp-card { padding: .5em .3em; text-align: center; }
.rp-stats i { display: grid; place-items: center; width: 2em; height: 2em; margin: 0 auto .3em; border-radius: 50%; font-size: .6em; color: var(--app); background: rgba(0, 104, 127, .1); }
.rp-stats b { display: block; font-size: .74em; color: #263238; }
.rp-stats small { display: block; font-size: .5em; color: #78909c; }

.rp-label { margin-bottom: .45em; }
.rp-item + .rp-item { margin-top: .5em; }
.rp-item span { display: flex; justify-content: space-between; font-size: .58em; }
.rp-item b { font-weight: 400; color: #37474f; }
.rp-item em { font-style: normal; color: #263238; }
.rp-item i { display: block; height: .24em; margin-top: .3em; border-radius: 999px; background: linear-gradient(90deg, var(--app) var(--w), #e3ebee var(--w)); transform-origin: left; }
.is-playing .rp-item i { animation: e2-once-bar .8s calc(.3s + var(--i) * .15s) var(--site-ease) both; }
@keyframes fx-bar { 0% { transform: scaleX(0); } 15%, 92% { transform: none; } 100% { transform: scaleX(0); } }

/* --------------------------------------------------------------------------
   Module map — logo in the middle, modules around it on curved lines
   -------------------------------------------------------------------------- */

.mx-map { position: relative; aspect-ratio: 1000 / 620; max-width: 1080px; margin: 0 auto; }
.mx-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mx-line { fill: none; stroke: rgba(19, 86, 103, .16); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
/* A short dash that travels from the logo out to the module */
.mx-pulse { fill: none; stroke: rgba(19, 86, 103, .35); stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 4 96; stroke-dashoffset: 4; opacity: 0; }
.is-playing .mx-pulse:not(.mx-pulse-back) { animation: mx-run 7s calc(var(--i) * .5s) linear infinite; }
@keyframes mx-run { 0% { stroke-dashoffset: 4; opacity: 0; } 10%, 85% { opacity: 1; } 100% { stroke-dashoffset: -96; opacity: 0; } }

.mx-core {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 168px;
    height: 104px;
    padding: 18px;
    border: 1px solid var(--site-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 0 0 10px rgba(43, 179, 192, .06), 0 24px 48px -24px rgba(11, 42, 51, .4);
    transform: translate(-50%, -50%);
    transition: transform .3s var(--site-ease);
}
.mx-core:hover { transform: translate(-50%, -50%) scale(1.04); }
.mx-core img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mx-core strong { font-size: 1.3rem; color: var(--site-primary); }
/* soft rings breathing out of the logo */
.mx-core::before,
.mx-core::after { content: ''; position: absolute; inset: -1px; border: 1px solid rgba(43, 179, 192, .35); border-radius: inherit; opacity: 0; pointer-events: none; }
@keyframes mx-wave { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.45, 1.7); } }

.mx-node {
    position: absolute;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 140px;
    text-decoration: none;
    transform: translate(-50%, -30px);
}
.mx-tile {
    position: relative;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border: 1px solid var(--site-line);
    border-radius: 14px;
    font-size: 1.1rem;
    color: var(--site-primary);
    background: #fff;
    box-shadow: 0 10px 20px -14px rgba(11, 42, 51, .45);
    overflow: hidden;
    transition: transform .3s var(--site-ease), box-shadow .3s, border-color .3s;
}
.mx-tile img { position: absolute; inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); object-fit: contain; background: #fff; }
.mx-name { font-size: .82rem; font-weight: 600; line-height: 1.3; text-align: center; color: var(--site-ink); }
.mx-node:hover .mx-tile { transform: translateY(-4px); border-color: rgba(19, 86, 103, .35); box-shadow: 0 16px 28px -14px rgba(19, 86, 103, .55); }
.mx-node:hover .mx-name { color: var(--site-primary); }

/* Modules pop in one after another */
.mx-node { opacity: 0; }
.is-playing .mx-node { animation: mx-pop .5s calc(.1s + var(--i) * .06s) var(--site-ease) forwards; }
@keyframes mx-pop { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }

/* ---- Extra life for the map ---- */

/* soft glow and a dotted floor that fades out from the middle */
.mx-map::before {
    content: '';
    position: absolute;
    inset: -4% -6%;
    background:
        radial-gradient(closest-side, rgba(43, 179, 192, .14), transparent 70%) center / 60% 70% no-repeat,
        radial-gradient(rgba(19, 86, 103, .16) 1px, transparent 1.4px) 0 0 / 22px 22px;
    -webkit-mask: radial-gradient(ellipse at center, #000 30%, transparent 72%);
    mask: radial-gradient(ellipse at center, #000 30%, transparent 72%);
    pointer-events: none;
}

/* two still dashed rings around the logo, kept inside the map */
.mx-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px dashed rgba(19, 86, 103, .16);
    border-radius: 50%;
    translate: -50% -50%;
    pointer-events: none;
}
.mx-orbit-1 { width: 36%; height: 58%; }
.mx-orbit-2 { width: 66%; height: 96%; border-color: rgba(19, 86, 103, .1); }

/* soft dashes; the second one comes back from the module to the logo */
.mx-pulse-back { stroke: rgba(43, 179, 192, .35); }
@keyframes mx-back { 0% { stroke-dashoffset: -96; opacity: 0; } 10%, 85% { opacity: 1; } 100% { stroke-dashoffset: 4; opacity: 0; } }

/* turning gradient border around the logo */
@property --mx-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.mx-core-ring {
    position: absolute;
    inset: -2px;
    padding: 2px;
    border-radius: 23px;
    background: conic-gradient(from var(--mx-a), transparent 0 55%, var(--site-accent) 75%, var(--site-primary) 90%, transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
}
.is-playing .mx-core-ring { animation: mx-ring 10s linear infinite; }
@keyframes mx-ring { to { --mx-a: 360deg; } }

.mx-count {
    position: absolute;
    top: -11px;
    right: -14px;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
    box-shadow: 0 6px 14px -6px rgba(19, 86, 103, .7);
    white-space: nowrap;
}

/* modules float up and down a little, each at its own time */
@keyframes mx-bob { 50% { translate: 0 -5px; } }

/* hover a module: its line lights up, the others fade */
.mx-line { transition: stroke .3s, stroke-width .3s, opacity .3s; }
.mx-map.is-focus .mx-line { opacity: .35; }
.mx-map.is-focus .mx-line.is-on { opacity: 1; stroke: var(--site-primary); stroke-width: 2.2; }
.mx-map.is-focus .mx-node:not(:hover) { filter: saturate(.6); opacity: .7; }
.mx-node:hover .mx-tile { border-color: transparent; box-shadow: 0 0 0 2px var(--site-accent), 0 16px 28px -14px rgba(19, 86, 103, .55); }

/* small "live" pill under the logo */
.mx-live {
    position: absolute;
    left: 50%;
    top: 63%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--site-line);
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--site-primary);
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--site-shadow-sm);
    translate: -50% 0;
    white-space: nowrap;
}
.mx-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--site-accent); }

/* --------------------------------------------------------------------------
   Company references — tabs with counts and a grid of logo cards
   -------------------------------------------------------------------------- */

.cr { position: relative; }
.cr-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.cr-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px 9px 16px;
    border: 1px solid var(--site-line);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--site-text);
    background: #fff;
    transition: color .25s, background .25s, border-color .25s, box-shadow .25s;
}
.cr-tab i { font-size: .85rem; color: var(--site-primary); transition: color .25s; }
.cr-tab b { min-width: 26px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; color: var(--site-primary); background: var(--site-primary-50); }
.cr-tab:hover { border-color: rgba(19, 86, 103, .35); }
.cr-tab.is-on { color: #fff; border-color: var(--site-primary); background: var(--site-primary); box-shadow: 0 10px 22px -12px rgba(19, 86, 103, .8); }
.cr-tab.is-on i { color: #fff; }
.cr-tab.is-on b { color: var(--site-primary); background: #fff; }

.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.cr-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 22px 14px 16px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-lg, 18px);
    text-align: center;
    text-decoration: none;
    background: #fff;
    overflow: hidden;
    transition: transform .3s var(--site-ease), box-shadow .3s, border-color .3s;
    animation: cr-in .45s var(--site-ease) both;
}
.cr-card[hidden] { display: none; }
/* teal line that grows along the top on hover */
.cr-card::before { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--site-primary), var(--site-accent)); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--site-ease); }
.cr-card:hover { transform: translateY(-5px); border-color: rgba(19, 86, 103, .25); box-shadow: 0 22px 40px -24px rgba(11, 42, 51, .45); }
.cr-card:hover::before { transform: scaleX(1); }
@keyframes cr-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }

.cr-logo { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 16px; background: var(--site-soft); }
.cr-initial { font-size: 1.5rem; font-weight: 800; color: var(--site-primary); }
.cr-logo img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 8px; border-radius: inherit; object-fit: contain; background: #fff; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.cr-card:hover .cr-logo img { filter: none; opacity: 1; }
.cr-card strong { font-size: .95rem; line-height: 1.3; color: var(--site-ink); }
.cr-card small { font-size: .75rem; color: var(--site-muted); }
.cr-card small i { color: var(--site-accent); }

@media (max-width: 575.98px) {
    .cr-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .cr-card { padding: 12px 6px 10px; gap: 4px; border-radius: 14px; }
    .cr-logo { width: 44px; height: 44px; margin-bottom: 2px; border-radius: 12px; }
    .cr-initial { font-size: 1.1rem; }
    .cr-card strong { font-size: .78rem; }
    .cr-card small { display: none; }
    .cr-tab { padding: 7px 8px 7px 12px; font-size: .82rem; }
}

/* --------------------------------------------------------------------------
   News — one big story with the headline on the picture, a short list beside it
   -------------------------------------------------------------------------- */

.nw { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; }
.nw:not(:has(.nw-item)) { grid-template-columns: 1fr; }

.nw-lead {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 360px;
    border-radius: var(--site-radius-lg, 20px);
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, var(--site-dark), var(--site-primary) 60%, var(--site-accent));
}
/* pattern + icon shown when there is no picture */
.nw-art { position: absolute; inset: 0; z-index: -2; display: grid; place-items: center; font-size: 5rem; color: rgba(255, 255, 255, .12); background: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1.5px) 0 0 / 18px 18px; }
.nw-lead img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--site-ease); }
.nw-lead::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 42, 51, 0) 30%, rgba(11, 42, 51, .88)); }
.nw-lead:hover img { transform: scale(1.06); }
.nw-lead-body { display: grid; gap: 12px; padding: 28px; color: #fff; }
.nw-lead strong { font-size: 1.6rem; line-height: 1.25; color: #fff; }
.nw-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.nw-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--site-dark); background: #fff; }
.nw-badge i { color: var(--site-accent); }
.nw-lead .nw-date { padding: 5px 12px; border-radius: 999px; color: #fff; background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.nw-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.nw-more i { transition: transform .3s var(--site-ease); }
.nw-lead:hover .nw-more i { transform: translateX(5px); }

.nw-date { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--site-muted); }

.nw-list { display: grid; grid-auto-rows: 1fr; gap: 14px; }
.nw-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--site-line);
    border-radius: var(--site-radius-lg, 18px);
    text-decoration: none;
    background: #fff;
    overflow: hidden;
    transition: transform .3s var(--site-ease), box-shadow .3s, border-color .3s;
}
/* teal bar sliding in on the left when hovered */
.nw-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--site-primary), var(--site-accent)); transform: scaleY(0); transition: transform .35s var(--site-ease); }
.nw-item:hover { transform: translateX(4px); border-color: rgba(19, 86, 103, .25); box-shadow: 0 18px 34px -22px rgba(11, 42, 51, .45); }
.nw-item:hover::before { transform: scaleY(1); }
.nw-thumb { position: relative; display: grid; place-items: center; flex: none; width: 120px; height: 96px; border-radius: 12px; font-size: 1.5rem; color: rgba(19, 86, 103, .35); background: var(--site-primary-50); overflow: hidden; }
.nw-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--site-ease); }
.nw-item:hover .nw-thumb img { transform: scale(1.08); }
.nw-item-body { display: grid; gap: 6px; min-width: 0; }
.nw-item strong { display: -webkit-box; font-size: 1rem; line-height: 1.35; color: var(--site-ink); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nw-go { display: grid; place-items: center; flex: none; width: 36px; height: 36px; margin-left: auto; border-radius: 50%; font-size: .8rem; color: var(--site-primary); background: var(--site-primary-50); transition: color .3s, background .3s, transform .3s; }
.nw-item:hover .nw-go { color: #fff; background: var(--site-primary); transform: rotate(-45deg); }

@media (max-width: 991.98px) {
    .nw { grid-template-columns: 1fr; }
    .nw-lead { min-height: 320px; }
}
@media (max-width: 575.98px) {
    .nw-lead { min-height: 280px; }
    .nw-lead-body { padding: 20px; }
    .nw-lead strong { font-size: 1.25rem; }
    .nw-thumb { width: 80px; height: 68px; }
    .nw-go { display: none; }
}

/* --------------------------------------------------------------------------
   Hero extras — benefit checks, live cards around the dashboard, module logos in the strip
   -------------------------------------------------------------------------- */

.e2-hero-text { margin-bottom: 18px; }
.hx-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 30px; padding: 0; list-style: none; }
.hx-checks li { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 600; color: var(--site-text); }
.hx-checks i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .6rem; color: #fff; background: linear-gradient(135deg, var(--site-primary), var(--site-accent)); }

/* glass bar along the bottom edge of the dashboard window */
.hx-dock {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 9%;
    display: flex;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 18px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 26px 50px -24px rgba(11, 42, 51, .5);
    translate: -50% 0;
    transform: translate(var(--px, 0), var(--py, 0));   /* follows the mouse a little */
    transition: transform .4s ease-out;
    white-space: nowrap;
    animation: hx-up .7s .4s var(--site-ease) both;
}
.hx-dock-item { display: flex; align-items: center; gap: 10px; padding: 6px 16px; }
.hx-dock-item + .hx-dock-item { border-left: 1px solid var(--site-line); }
.hx-dock-item i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: .85rem; color: var(--site-primary); background: var(--site-primary-50); transition: color .3s, background .3s; }
.hx-dock-item:hover i { color: #fff; background: var(--site-primary); }
.hx-dock-item b { display: block; font-size: .95rem; line-height: 1.2; color: var(--site-ink); }
.hx-dock-item small { display: block; font-size: .72rem; color: var(--site-muted); }
@keyframes hx-up { from { opacity: 0; translate: -50% 18px; } }

/* Laptop screens (e.g. MacBook Air): keep the whole hero and the module strip on the first screen */
@media (min-width: 992px) and (max-height: 960px) {
    .e2-hero { padding-top: 36px; }
    .e2-hero-title { font-size: clamp(2.4rem, 4.2vw, 3.7rem); }
    .e2-hero-actions { margin-bottom: 30px; }
    .hx-checks { margin-bottom: 24px; }
    .e2-stage { width: 100%; max-width: 540px; margin: 0 auto; }
    .e2-strip { margin-top: 28px; }
}

/* real module logos in the strip */
.hx-pill { text-decoration: none; transition: border-color .25s, color .25s; }
.hx-pill:hover { color: var(--site-primary); border-color: rgba(19, 86, 103, .35); }
.hx-pill-icon { position: relative; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: .7rem; color: var(--site-primary); background: var(--site-primary-50); overflow: hidden; }
.hx-pill-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.e2-pill .hx-pill-icon i { margin: 0; }

@media (max-width: 575.98px) {
    .hx-dock { bottom: 2%; padding: 5px; border-radius: 14px; }
    .hx-dock-item { gap: 6px; padding: 4px 8px; }
    .hx-dock-item i { width: 26px; height: 26px; font-size: .7rem; border-radius: 8px; }
    .hx-dock-item b { font-size: .8rem; }
    .hx-dock-item small { display: none; }
}

/* Wide screens: title and text of the module map on one line each */
@media (min-width: 992px) {
    .mx .e2-head { max-width: 880px; }
    .mx .e2-title { white-space: nowrap; }
}

/* Laptop screens (e.g. MacBook Air): a wider, shorter map so the title and the whole map fit on one screen */
@media (min-width: 992px) and (max-height: 960px) {
    .mx { padding-top: 40px; padding-bottom: 40px; }
    .mx .e2-head { margin-bottom: 20px; }
    .mx-map { aspect-ratio: 1000 / 500; }
    .mx-core { width: 148px; height: 88px; padding: 14px; }
    .mx-tile { width: 52px; height: 52px; }
    .mx-tile img { inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); }
    .mx-node { gap: 6px; transform: translate(-50%, -26px); }
    .mx-name { font-size: .78rem; }
    .mx-live { top: 62%; }
}

/* Small screens: logo on top, modules in a grid, no lines */
@media (max-width: 991.98px) {
    .mx-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 8px; aspect-ratio: auto; }
    .mx-lines { display: none; }
    .mx-core { position: relative; left: auto; top: auto; grid-column: 1 / -1; justify-self: center; margin-bottom: 12px; transform: none; }
    .mx-core:hover { transform: scale(1.04); }
    .mx-node { position: static; width: auto; transform: none; }
    .mx-orbit, .mx-map::before { display: none; }
    .mx-live { position: relative; left: auto; top: auto; grid-column: 1 / -1; justify-self: center; order: 1; translate: none; white-space: normal; text-align: center; }
}
@media (max-width: 575.98px) {
    .mx-map { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------------
   Small screens and reduced motion
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .hm-steps-grid { grid-template-columns: 1fr 1fr; }
    .hm-steps-grid::before { display: none; }
}

@media (max-width: 575.98px) {
    .hm-steps-grid { grid-template-columns: 1fr; }
    .ma-stage { gap: 12px; padding: 28px 14px; }
    .ma-device { width: 74%; }
    .ma-shell { padding: 7px; border-radius: 38px; }
    .ma-phone { border-radius: 31px; font-size: 13px; }
    .ma-chip { display: none; }
    .ma-tag { font-size: .56rem; padding: 4px 8px; }
    }

@media (prefers-reduced-motion: reduce) {
    .hm-steps * { animation: none !important; }
    .hm-typed { width: 15ch; }
    .hm-plan.is-picked { border-color: var(--site-primary); }
    .hm-pay-bar i { transform: none; }
    .hm-pay-state .is-wait { opacity: 0; }
    .hm-pay-state .is-done { opacity: 1; }
    .ma *, .ma-screen, [class*="fx-"], .fx-device *, .mx *, .mx-core::before, .mx-core::after, .mx-orbit, .hx-dock { animation: none !important; }
    .mx-node { opacity: 1; }
    .rp-path { stroke-dasharray: none; }
    .ma-device { transform: none; }
    .ma-leave, .ma-form label, .ma-days, .ma-list li { opacity: 1; }
    .ma-ring { stroke-dasharray: var(--p) 100; }
    .ma-typed { width: 100%; }
}
