/* Flat app illustrations (.mk). Sizes inside .mk__screen are in em, 1em = 1/60 of the frame width. */

.mk {
  container-type: inline-size;
  position: relative;
  z-index: 1;
  width: 100%;
}
.mk__screen {
  font-size: calc(100cqi / 60);
  background: var(--c-surface);
  color: var(--c-ink);
  font-family: var(--f-text);
  line-height: 1.35;
  padding: 2.2em;
  display: grid;
  gap: 1.4em;
  -webkit-hyphens: manual;
  hyphens: manual;
  text-align: left;
}
.mk__screen * { margin: 0; }
.mk__screen svg { display: block; }
.mk__screen .zi, .mk__screen svg[class] { max-width: none; max-height: none; }

.mk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1.2em; }
.mk-title { font-family: var(--f-display); font-weight: 700; font-size: 2.8em; letter-spacing: -0.02em; line-height: 1.05; white-space: nowrap; }
.mk-eyebrow { font-family: var(--f-mono); font-weight: 500; font-size: 1.05em; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); white-space: nowrap; }
.mk-label { font-size: 1.3em; color: var(--c-muted); white-space: nowrap; }
.mk-text { font-size: 1.4em; font-weight: 500; color: var(--c-ink); white-space: nowrap; }
.mk-sub { font-size: 1.15em; color: var(--c-muted); white-space: nowrap; }
.mk-num { font-family: var(--f-mono); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-big { font-family: var(--f-mono); font-weight: 500; font-size: 3.4em; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; }
.mk-amt { font-family: var(--f-mono); font-weight: 500; font-size: 1.35em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--c-ink); }
.mk-pos { color: var(--c-success); }
.mk-wrap { white-space: normal; }
.mk-gr .mk-big { font-size: 2.8em; }

.mk-card { border: 1px solid var(--c-line); border-radius: var(--r-2); padding: 1.6em; display: grid; gap: .8em; align-content: start; }
.mk-card--ink { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-on-ink); }
.mk-card--ink .mk-sub { color: var(--c-on-ink-muted); }
.mk-card--warn { border-color: var(--c-signal); border-left-width: .5em; }

.mk-list { display: grid; }
.mk-row { display: flex; align-items: center; gap: 1.2em; padding: .8em 0; border-top: 1px solid var(--c-line); }
.mk-row:first-child { border-top: 0; padding-top: 0; }
.mk-row:last-child { padding-bottom: 0; }
.mk-row__main { display: grid; gap: .2em; min-width: 0; flex: 1; }
.mk-row > .mk-amt, .mk-row > .mk-arrow { margin-left: auto; }

.mk-ico { flex: none; width: 3em; height: 3em; display: grid; place-items: center; background: var(--c-brand-soft); color: var(--c-brand); border-radius: var(--r-1); }
.mk-ico svg { width: 1.8em; height: 1.8em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.mk-check { flex: none; width: 2.2em; height: 2.2em; display: grid; place-items: center; background: var(--c-brand); color: #fff; border-radius: var(--r-1); }
.mk-check svg { width: 1.4em; height: 1.4em; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: square; stroke-linejoin: miter; }
.mk-check--ok { background: var(--c-success); }
.mk-arrow { width: 1.8em; height: 1.8em; color: var(--c-muted); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }

.mk-bar { height: .7em; background: var(--c-line); display: flex; overflow: hidden; }
.mk-bar > i { display: block; height: 100%; background: var(--c-brand); }
.mk-bar > i.is-signal { background: var(--c-signal); }
.mk-bar > i.is-ink { background: var(--c-ink); }
.mk-bar > i.is-muted { background: var(--c-muted); }
.mk-bar--thick { height: 1.4em; gap: .25em; background: none; }

.mk-legend { display: flex; flex-wrap: wrap; gap: .6em 1.8em; }
.mk-legend span { display: inline-flex; align-items: center; gap: .6em; font-size: 1.15em; color: var(--c-muted); white-space: nowrap; }
.mk-legend span::before { content: ""; width: .8em; height: .8em; background: var(--k, var(--c-brand)); }
.mk-legend b { font-family: var(--f-mono); font-weight: 500; color: var(--c-ink); }

.mk-badge { display: inline-block; font-family: var(--f-mono); font-weight: 500; font-size: 1em; padding: .3em .6em; border-radius: var(--r-1); background: var(--c-brand-soft); color: var(--c-brand); white-space: nowrap; }
.mk-badge--ok { background: #EEF6F1; color: var(--c-success); }
.mk-btn { justify-self: stretch; text-align: center; background: var(--c-brand); color: #fff; font-weight: 500; font-size: 1.3em; padding: .85em 1.2em; border-radius: var(--r-1); white-space: nowrap; }

.mk-av { flex: none; width: 3.2em; height: 3.2em; display: grid; place-items: center; border-radius: var(--r-1); background: var(--c-brand); color: #fff; font-family: var(--f-mono); font-weight: 500; font-size: 1em; }
.mk-av > span { font-size: 1.2em; }
.mk-av--ink { background: var(--c-ink); }
.mk-av--signal { background: var(--c-signal); color: var(--c-ink); }
.mk-av--muted { background: var(--c-muted); }
.mk-avs { display: flex; gap: .5em; }

.mk-ring { position: relative; width: 11em; height: 11em; flex: none; }
.mk-ring svg { width: 100%; height: 100%; }
.mk-ring__val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.mk-ring__val .mk-num { font-size: 2.2em; }

/* ---------- overview (index hero) ---------- */
.mk--overview .mk__screen { font-size: calc(100cqi / 70); gap: 1.4em; }
.mk-ov { display: grid; grid-template-columns: 1.25fr .9fr 1.15fr; grid-template-areas: "chart budget fix" "cat cat fix"; gap: 1.4em; align-items: stretch; }
.mk-ov__chart { grid-area: chart; }
.mk-ov__budget { grid-area: budget; justify-items: center; text-align: center; align-content: center; }
.mk-ov__cat { grid-area: cat; }
.mk-ov__fixcard { grid-area: fix; }
.mk-ov__chart .mk-big { font-size: 2.8em; }
.mk-ov__chart svg { width: 100%; height: auto; }
.mk-ov__months { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 1em; color: var(--c-muted); }
.mk-ov__months b { color: var(--c-ink); font-weight: 500; }
.mk-ov__budget .mk-ring { width: 8em; height: 8em; }
.mk-ov__fixcard .mk-row { padding: .9em 0; }
.mk-ov__fixcard .mk-row:first-child { padding-top: 0; }
.mk-ov__fixcard .mk-text { font-size: 1.3em; }
.mk-delta { font-family: var(--f-mono); font-size: 1.05em; color: var(--c-success); white-space: nowrap; }

/* ---------- transactions (spending hero) ---------- */
.mk--tx .mk__screen, .mk--security .mk__screen { gap: 1.1em; }
.mk--tx .mk-big { font-size: 3em; }
.mk--tx .mk-card, .mk--security .mk-card { padding: 1.3em 1.6em; }
.mk--tx .mk-row, .mk--security .mk-row { padding: .65em 0; }
.mk--tx .mk-row:first-child, .mk--security .mk-row:first-child { padding-top: 0; }
.mk--tx .mk-row:last-child, .mk--security .mk-row:last-child { padding-bottom: 0; }
.mk--tx .mk-day { gap: .6em; }
.mk-tx__top { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4em; }
.mk-tx__flow { font-family: var(--f-mono); font-size: 1.05em; color: var(--c-muted); white-space: nowrap; }
.mk-tx__flow b { font-weight: 500; color: var(--c-ink); }
.mk-tx__flow b.mk-pos { color: var(--c-success); }
.mk-day { display: grid; gap: .8em; }

/* ---------- budget card (index registry) ---------- */
.mk--budget .mk__screen { font-size: calc(100cqi / 56); padding: 0; background: transparent; }
.mk-bc { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.8em; align-items: stretch; }
.mk-bc > .mk-card { align-content: center; }

/* ---------- groups ---------- */
.mk-gr { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.6em; align-items: start; }
.mk-gr__col { display: grid; gap: 1.4em; align-content: start; }

/* ---------- security ---------- */
.mk-sec__status { display: flex; align-items: center; gap: 1.4em; }
.mk-sec__status .mk-ico { background: var(--c-ink-line); color: var(--c-on-ink); width: 4.2em; height: 4.2em; }
.mk-sec__status .mk-ico svg { width: 2.2em; height: 2.2em; }
.mk-sec__status .mk-text { color: var(--c-on-ink); font-family: var(--f-display); font-weight: 700; font-size: 1.9em; }

/* ---------- guide story scenes ---------- */
.zf-story__scene.mk { container-type: size; }
.mk--guide .mk__screen { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; font-size: min(100cqi / 44, 100cqh / 53); overflow: hidden; }
.mk--g3 .mk__screen { font-size: min(100cqi / 48, 100cqh / 58); }
.zf-story__inline .mk { aspect-ratio: 5 / 6; container-type: size; width: 100%; }
.mk-g2__lim { justify-items: center; text-align: center; gap: 1.4em; padding: 2.4em 2em; }
.mk-g2__lim .mk-big { font-size: 4.6em; }
.mk-g2__range { width: 100%; display: grid; gap: 1.2em; }
.mk-big__of { font-size: .4em; }
.mk-g3__week { gap: 1em; }
.mk--g3 .mk-cols { height: 8em; }
.mk--g3 .mk-list .mk-row { padding: .6em 0; }
.mk--g3 .mk-list .mk-row:first-child { padding-top: 0; }

/* ---------- controls used in rendered frames (media/src) ---------- */
.mk-slider { position: relative; height: 1em; display: flex; align-items: center; }
.mk-slider::before { content: ""; position: absolute; left: 0; right: 0; height: .5em; background: var(--c-line); }
.mk-slider > i { position: absolute; left: 0; height: .5em; width: var(--v); background: var(--c-brand); }
.mk-slider > b { position: absolute; left: var(--v); width: 2em; height: 2em; margin-left: -1em; background: var(--c-brand); border: .35em solid var(--c-surface); outline: 1px solid var(--c-brand); }
.mk-scale { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 1em; color: var(--c-muted); }
.mk-switch { flex: none; margin-left: auto; width: 4.4em; height: 2.4em; background: var(--c-brand); border-radius: var(--r-1); position: relative; }
.mk-switch::after { content: ""; position: absolute; top: .4em; right: .4em; width: 1.6em; height: 1.6em; background: var(--c-surface); border-radius: 1px; }
.mk-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4em; align-items: end; height: 13em; border-bottom: 1px solid var(--c-line); }
.mk-cols > i { display: block; height: var(--h); background: var(--c-brand); }
.mk-cols > i.is-signal { background: var(--c-signal); }
.mk-cols-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4em; text-align: center; font-family: var(--f-mono); font-size: 1em; color: var(--c-muted); }
.mk-cols-labels b { color: var(--c-ink); font-weight: 500; }
.mk-frame { height: 100vh; }
.mk-frame .mk { height: 100%; }
.mk-frame .mk__screen { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; }
.mk-push { margin-top: auto; }

/* narrow frames: stack two-column parts and enlarge the scale */
@container (max-width: 440px) {
  .mk__screen { font-size: calc(100cqi / 40); padding: 2em; }
  .mk--groups .mk__screen { font-size: calc(100cqi / 36); }
  .mk-gr { grid-template-columns: 1fr; }
  .mk--budget .mk__screen { font-size: calc(100cqi / 34); }
  .mk-bc { grid-template-columns: 1fr; gap: 1.2em; }
  .mk-tx__top { grid-template-columns: 1fr; }
  .mk--overview .mk__screen { font-size: calc(100cqi / 40); }
  .mk-ov { grid-template-columns: 1fr; grid-template-areas: "chart" "budget" "cat" "fix"; }
  .mk-ov__budget { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 1.6em; }
  .mk-ov__budget > .mk-label { grid-column: 1 / -1; }
  .mk-ov__budget .mk-ring { grid-row: 2 / span 3; width: 7em; height: 7em; }
}

/* the frame must not shrink to content: .mk has no intrinsic width */
@media (max-width: 800px) {
  :is(.zf-hero-visual, .hero__column__media, .zf-split__visual):has(> .mk) { align-self: stretch; width: 100%; box-sizing: border-box; }
}

/* wipe reveal, same as images in kontor.css */
html.js .mk[data-kx="wipe"]:not(.is-in),
html.js [data-kx="wipe"]:not(.is-in) > .mk:not(.zf-story__scene) { clip-path: inset(0 100% 0 0); }
html.js .mk[data-kx="wipe"].is-in,
html.js [data-kx="wipe"].is-in > .mk:not(.zf-story__scene) { clip-path: inset(0); transition: clip-path var(--t-slow) var(--ease); }
@media (prefers-reduced-motion: reduce) {
  html.js .mk[data-kx="wipe"], html.js [data-kx="wipe"] > .mk:not(.zf-story__scene) { clip-path: none !important; transition: none !important; }
}
.mk-ov__budget .mk-ring__val .mk-num { font-size: 1.6em; }

/* ===================== devices (hero illustrations) ===================== */
.mk-stage { position: relative; width: 100%; }
.mk-stage--hero { aspect-ratio: 3 / 2; }
.mk-stage--one, .mk-stage--two { aspect-ratio: 6 / 5; }

/* laptop */
.mk-laptop { position: absolute; right: 0; top: 2%; width: 84%; }
.mk-laptop__lid { position: relative; background: var(--c-ink); border-radius: 2.2% / 3.4%; padding: 2.4% 2% 2%; }
.mk-laptop__notch { position: absolute; left: 50%; top: 0; width: 15%; height: 3.4%; transform: translateX(-50%); background: var(--c-ink); border-radius: 0 0 6px 6px; z-index: 2; }
.mk-laptop__screen { container-type: inline-size; aspect-ratio: 16 / 10; overflow: hidden; background: var(--c-surface); display: flex; flex-direction: column; }
.mk-laptop__base { position: relative; width: 112%; margin-left: -6%; height: 0; padding-bottom: 3.6%; background: #262D3B; clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%); }
.mk-laptop__base::before { content: ""; position: absolute; left: 41%; right: 41%; top: 0; height: 32%; background: var(--c-ink); }
.mk-menubar { display: flex; align-items: center; gap: 1.6cqi; padding: .9cqi 2.2cqi; font-family: var(--f-text); font-size: 1.5cqi; color: var(--c-ink); border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.mk-menubar b { font-family: var(--f-display); font-weight: 700; }
.mk-menubar__time { margin-left: auto; font-family: var(--f-mono); }
.mk-laptop .mk { flex: 1; min-height: 0; }
.mk-laptop .mk__screen { font-size: calc(100cqi / 74); padding: 1.8em 2.2em; gap: 1.2em; }
.mk-laptop .mk-ov { grid-template-columns: 1.25fr .9fr 1.15fr; grid-template-areas: "chart budget fix" "cat cat fix"; }
.mk-laptop .mk-ov__budget { grid-template-columns: none; justify-items: center; text-align: center; }
.mk-laptop .mk-ov__budget .mk-ring { grid-row: auto; width: 8em; height: 8em; }
.mk-tabs { display: flex; gap: .4em; padding: .3em; border: 1px solid var(--c-line); border-radius: var(--r-1); }
.mk-tabs span { font-size: 1.15em; padding: .35em .9em; color: var(--c-muted); white-space: nowrap; }
.mk-tabs span.is-on { background: var(--c-ink); color: var(--c-on-ink); border-radius: var(--r-1); }

/* phone */
.mk-phone { position: absolute; aspect-ratio: 9 / 19; background: var(--c-ink); border-radius: 15% / 7.1%; padding: 3.2%; }
.mk-phone__screen { container-type: inline-size; position: relative; height: 100%; background: var(--c-surface); border-radius: 12% / 5.6%; overflow: hidden; display: flex; flex-direction: column; }
.mk-phone__island { position: absolute; left: 50%; top: 2.6%; width: 30%; height: 3.4%; transform: translateX(-50%); background: var(--c-ink); border-radius: 999px; z-index: 2; }
.mk-phone__status { display: flex; align-items: center; justify-content: space-between; padding: 6.5cqi 9cqi 2cqi; font-family: var(--f-text); font-weight: 600; font-size: 5cqi; color: var(--c-ink); }
.mk-phone__status i { display: block; width: 14cqi; height: 3.4cqi; background: linear-gradient(90deg, var(--c-ink) 0 62%, transparent 62% 70%, var(--c-ink) 70%); }
.mk-phone .mk { flex: 1; min-height: 0; overflow: hidden; }
.mk-phone .mk__screen { font-size: calc(100cqi / 27); padding: .8em 1.5em 1.2em; gap: 1em; }
.mk-phone .mk-title { font-size: 2.6em; }
.mk-phone__tabs { display: flex; justify-content: space-around; padding: 3.6cqi 6cqi 6cqi; border-top: 1px solid var(--c-line); }
.mk-phone__tabs svg { width: 7.5cqi; height: 7.5cqi; fill: none; stroke: var(--c-muted); stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.mk-phone__tabs svg.is-on { stroke: var(--c-brand); }

/* placement */
.mk-stage--hero .mk-phone { left: 0; bottom: 0; width: 29%; z-index: 3; }
.mk-stage--one .mk-phone { left: 8%; top: 0; width: 40%; }
.mk-stage--two .mk-phone:first-child { left: 4%; top: 0; width: 40%; }
.mk-stage--two .mk-phone:nth-child(2) { right: 4%; top: 6%; width: 40%; }

/* goal list inside phone */
.mk-seg { display: grid; grid-template-columns: 1fr 1fr; padding: .3em; border: 1px solid var(--c-line); border-radius: var(--r-1); text-align: center; }
.mk-seg span { font-size: 1.2em; padding: .4em 0; color: var(--c-muted); }
.mk-seg span.is-on { background: var(--c-ink); color: var(--c-on-ink); border-radius: var(--r-1); }
.mk-goalcard { justify-items: center; text-align: center; }
.mk-goalcard .mk-ring { width: 13em; height: 13em; }
.mk-goalcard .mk-ring__val { gap: .2em; }
.mk-goalcard .mk-ring__val .mk-num { font-size: 2.2em; }
.mk-prog { display: grid; gap: .5em; }
.mk-prog__head { display: flex; justify-content: space-between; align-items: baseline; }

/* floating notes inside a stage (cqi of the root .mk) */
.mk-float { position: absolute; z-index: 4; display: flex; align-items: center; gap: 2.2cqi; padding: 2.2cqi 2.8cqi; background: var(--c-surface); border: 1px solid var(--c-line); border-left: 4px solid var(--c-brand); font-family: var(--f-text); font-size: 2.6cqi; line-height: 1.35; color: var(--c-ink); white-space: nowrap; }
.mk-float b { display: block; font-weight: 600; }
.mk-float span { display: block; font-family: var(--f-mono); font-size: .9em; color: var(--c-muted); }
.mk-float__ico { flex: none; width: 6.4cqi; height: 6.4cqi; display: grid; place-items: center; background: var(--c-brand); color: #fff; }
.mk-float__ico svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.mk-float--ok { border-left-color: var(--c-success); }
.mk-float--ok .mk-float__ico { background: var(--c-success); }
.mk-stage--one .mk-float { right: 2%; top: 58%; }

/* index hero notes (existing .zf-float markup, outside .mk) */
.zf-hero-visual .zf-float { display: flex; position: absolute; z-index: 4; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; background: var(--c-surface); border: 1px solid var(--c-line); border-left: 4px solid var(--c-signal); border-radius: 0; box-shadow: none; animation: none; font-size: .85rem; line-height: 1.35; white-space: nowrap; }
.zf-hero-visual .zf-float--a { left: -7%; top: 7%; }
.zf-hero-visual .zf-float--b { right: 3%; bottom: -5%; border-left-color: var(--c-success); }
.zf-hero-visual .zf-float b { display: block; font-weight: 600; color: var(--c-ink); }
.zf-hero-visual .zf-float span.num { display: block; color: var(--c-muted); font-size: .8rem; }
.zf-hero-visual .zf-float__ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 0; flex: none; }
.zf-hero-visual .zf-float__ico svg { width: 20px; height: 20px; stroke-linecap: square; stroke-linejoin: miter; }

/* narrow stages: keep one readable device */
@container (max-width: 440px) {
  .mk-laptop .mk-ov { grid-template-columns: 1.25fr .9fr 1.15fr; grid-template-areas: "chart budget fix" "cat cat fix"; }
  .mk-laptop .mk__screen { font-size: calc(100cqi / 74); padding: 1.8em 2.2em; }
  .mk-stage--hero { aspect-ratio: auto; }
  .mk-stage--hero .mk-laptop { display: none; }
  .mk-stage--hero .mk-phone, .mk-stage--one .mk-phone { position: relative; left: auto; top: auto; bottom: auto; width: 64%; margin-inline: auto; }
  .mk-stage--one { aspect-ratio: auto; }
  .mk-stage--one .mk-float { position: relative; right: auto; top: auto; margin: 4cqi auto 0; width: fit-content; font-size: 4cqi; }
  .mk-stage--two .mk-phone:first-child, .mk-stage--two .mk-phone:nth-child(2) { width: 46%; }
  .mk-phone .mk__screen { font-size: calc(100cqi / 27); padding: .8em 1.5em 1.2em; }
}
@media (max-width: 640px) { .zf-hero-visual .zf-float { display: none; } }
.mk-stage--hero .mk-laptop { width: 79%; top: 0; }
.mk-stage--hero .mk-phone { width: 24%; }
.mk-goalcard .mk-ring { width: 16em; height: 16em; }
.mk-goalcard .mk-ring__val .mk-num { font-size: 1.9em; }
.mk-goalcard .mk-ring__val .mk-sub { font-size: 1em; }
.zf-hero-visual .zf-float--a { left: 18%; top: -26px; }
.zf-hero-visual .zf-float--b { right: -2%; bottom: -26px; }
.mk-stage { background: var(--c-paper-2); }
.mk-stage--hero { padding: 0; }
.mk-phone .mk__screen { font-size: calc(100cqi / 31); padding: .8em 1.4em 1.2em; }
.mk-phone :is(.mk-text, .mk-sub, .mk-label) { white-space: normal; }
.mk-phone .mk-head { flex-wrap: wrap; row-gap: .3em; }
.mk-phone .mk-row__main { min-width: 0; }
.mk-stage--one .mk-phone, .mk-stage--two .mk-phone:first-child, .mk-stage--two .mk-phone:nth-child(2) { width: 37%; }
.mk-stage--two .mk-phone:nth-child(2) { top: 4%; }
.mk-float__ico svg, .mk-float__ico svg *, .zf-hero-visual .zf-float__ico svg * { stroke: currentColor; }
.mk-float__ico { color: #fff; }
@container (max-width: 440px) {
  .mk-phone .mk__screen { font-size: calc(100cqi / 31); padding: .8em 1.4em 1.2em; }
}
.mk-float .mk-float__ico { display: grid; color: #fff; font-family: inherit; font-size: inherit; }
/* narrow frames, last so it wins over the size tweaks above */
@container (max-width: 440px) {
  .mk-stage--hero, .mk-stage--one { aspect-ratio: auto; padding: 6cqi 0; }
  .mk-stage--hero .mk-laptop { display: none; }
  .mk-stage--hero .mk-phone, .mk-stage--one .mk-phone { position: relative; left: auto; top: auto; bottom: auto; width: 62%; margin-inline: auto; }
  .mk-stage--one .mk-float { position: relative; right: auto; top: auto; margin: 5cqi auto 0; width: fit-content; font-size: 3.8cqi; }
  .mk-stage--two { aspect-ratio: auto; display: flex; gap: 4cqi; justify-content: center; padding: 6cqi 3cqi; }
  .mk-stage--two .mk-phone:first-child, .mk-stage--two .mk-phone:nth-child(2) { position: relative; left: auto; right: auto; top: auto; width: 47%; }
}

/* ===================== tablet (index hero) ===================== */
.mk-stage--tablet { aspect-ratio: 3 / 2; display: grid; place-items: center; overflow: visible; }
.mk-stage--tablet > .mk-phone { display: none; }
.mk-tablet {
  position: relative;
  width: 90%;
  aspect-ratio: 1.43;
  padding: 2.5%;
  background: #0D1119;
  border-radius: 5.2% / 7.4%;
  box-shadow:
    0 0 0 1.5px #B9BDC4,
    0 0 0 3px #E4E6EA,
    0 0 0 3.5px #A9ADB5,
    0 2px 4px rgb(18 24 38 / .18),
    0 18px 34px -10px rgb(18 24 38 / .35),
    0 48px 80px -26px rgb(18 24 38 / .45);
}
.mk-tablet::before, .mk-tablet::after { content: ""; position: absolute; background: #A9ADB5; border-radius: 2px; }
.mk-tablet::before { top: -4.5px; right: 12%; width: 7%; height: 2px; }
.mk-tablet::after { top: -4.5px; right: 21%; width: 4%; height: 2px; }
.mk-tablet__cam { position: absolute; top: 1%; left: 50%; width: .9%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: #1E2533; box-shadow: inset 0 0 0 1px #2E3747; }
.mk-tablet__screen { container-type: inline-size; height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--c-surface); border-radius: 2.7% / 3.9%; }
.mk-tablet__status { display: flex; justify-content: space-between; align-items: center; padding: .9cqi 2.6cqi .5cqi; font-family: var(--f-text); font-weight: 600; font-size: 1.25cqi; color: var(--c-ink); }
.mk-tablet__sys { display: inline-flex; align-items: center; gap: .7cqi; }
.mk-batt { display: block; width: 2.6cqi; height: 1.2cqi; border: 1px solid var(--c-ink); position: relative; }
.mk-batt::after { content: ""; position: absolute; inset: 1px; background: var(--c-ink); }
.mk-wifi { display: block; width: 1.5cqi; height: 1.1cqi; background: var(--c-ink); clip-path: polygon(50% 100%, 0 25%, 100% 25%); }
.mk-tablet__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 17% 1fr; }
.mk-side { display: flex; flex-direction: column; gap: .35cqi; padding: 1.6cqi 1.2cqi; border-right: 1px solid var(--c-line); background: var(--c-paper); font-family: var(--f-text); font-size: 1.25cqi; color: var(--c-muted); white-space: nowrap; }
.mk-side__brand { display: flex; align-items: center; gap: .7cqi; margin-bottom: 1.4cqi; font-family: var(--f-display); font-weight: 700; font-size: 1.6cqi; color: var(--c-ink); }
.mk-side__brand svg { width: 2.2cqi; height: 2.2cqi; }
.mk-side__item { display: flex; align-items: center; gap: .8cqi; padding: .7cqi .9cqi; border-radius: var(--r-1); }
.mk-side__item svg { width: 1.5cqi; height: 1.5cqi; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }
.mk-side__item.is-on { background: var(--c-ink); color: var(--c-on-ink); }
.mk-side__user { margin-top: auto; display: flex; align-items: center; gap: .8cqi; color: var(--c-ink); }
.mk-side__user .mk-av { width: 2.4cqi; height: 2.4cqi; font-size: 1cqi; }
.mk-tablet .mk { min-width: 0; min-height: 0; overflow: hidden; }
.mk-tablet .mk__screen { font-size: calc(100cqi / 64); padding: 1.6em 2em; gap: 1.2em; background: var(--c-surface); }
.mk-tablet .mk-ov { grid-template-columns: 1.25fr .9fr 1.15fr; grid-template-areas: "chart budget fix" "cat cat fix"; }
.mk-tablet .mk-ov__budget { grid-template-columns: none; justify-items: center; text-align: center; }
.mk-tablet .mk-ov__budget .mk-ring { grid-row: auto; width: 8em; height: 8em; }
.zf-hero-visual:has(.mk-stage--tablet) .zf-float--a { left: -6%; top: 8%; }
.zf-hero-visual:has(.mk-stage--tablet) .zf-float--b { right: -3%; bottom: 4%; }
@container (max-width: 440px) {
  .mk-tablet .mk-ov { grid-template-columns: 1.25fr .9fr 1.15fr; grid-template-areas: "chart budget fix" "cat cat fix"; }
  .mk-tablet .mk__screen { font-size: calc(100cqi / 64); padding: 1.6em 2em; }
  .mk-tablet .mk-ov__budget { grid-template-columns: none; justify-items: center; text-align: center; }
  .mk-tablet .mk-ov__budget .mk-ring { grid-row: auto; width: 8em; height: 8em; }
  .mk-tablet .mk-ov__budget > .mk-label { grid-column: auto; }
  .mk-stage--tablet { aspect-ratio: auto; display: block; padding: 6cqi 0; }
  .mk-stage--tablet > .mk-tablet { display: none; }
  .mk-stage--tablet > .mk-phone { display: block; }
}
.zf-hero-visual:has(.mk-stage--tablet) .zf-float--a { left: -9%; top: -30px; }
.zf-hero-visual:has(.mk-stage--tablet) .zf-float--b { right: -3%; bottom: -30px; }
.mk-tablet .mk__screen { font-size: calc(100cqi / 70); }
@container (max-width: 440px) { .mk-tablet .mk__screen { font-size: calc(100cqi / 70); } }
.zf-hero-visual:has(.mk-stage--tablet) .zf-float--a { left: 2%; top: -30px; }
.mk-ov__week { display: none; }
.mk-tablet .mk-ov { grid-template-areas: "chart budget fix" "cat cat fix" "week week fix"; }
.mk-tablet .mk-ov__week { display: grid; grid-area: week; }
.mk-wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1em; align-items: end; }
.mk-wk__day { display: grid; gap: .5em; justify-items: center; font-family: var(--f-mono); font-size: 1em; color: var(--c-muted); }
.mk-wk__pair { display: flex; gap: .3em; align-items: flex-end; height: 7em; }
.mk-wk__pair i { display: block; width: 1.1em; background: var(--c-line); }
.mk-wk__pair i.is-now { background: var(--c-brand); }
@container (max-width: 440px) {
  .mk-tablet .mk-ov { grid-template-areas: "chart budget fix" "cat cat fix" "week week fix"; }
}
.mk-wk__pair { height: 5em; }
.mk-tablet .mk__screen { gap: 1em; padding-bottom: 1.4em; }
.mk-tablet .mk-ov { gap: 1.2em; }

/* ===================== MacBook (index, under the registry) ===================== */
.mk--display { margin-top: 64px; }
.mk-mbp { width: min(100%, 1040px); margin: 0 auto; padding-bottom: 24px; }
.mk-mbp__lid { position: relative; margin: 0 7.5%; padding: 1.5% 1.4% 1.7%; background: #0B0E14; border-radius: 2.4% / 3.8% 3.8% 0 0;
  box-shadow: 0 0 0 2px #C9CCD2, 0 0 0 3px #A8ACB3, 0 -2px 10px -4px rgb(18 24 38 / .2); }
.mk-mbp__notch { position: absolute; top: 0; left: 50%; width: 11%; height: 3.2%; transform: translateX(-50%); background: #0B0E14; border-radius: 0 0 8px 8px; z-index: 2; }
.mk-mbp__notch::after { content: ""; position: absolute; left: 50%; top: 35%; width: 6px; height: 6px; transform: translateX(-50%); border-radius: 50%; background: #1E2533; box-shadow: inset 0 0 0 1px #2E3747; }
.mk-mbp__screen { container-type: inline-size; aspect-ratio: 16 / 10; overflow: hidden; background: var(--c-surface); border-radius: .9% / 1.4%; display: flex; flex-direction: column; }
.mk-mbp__screen > .mk-menubar { padding-right: 2.2cqi; }
.mk-mbp__screen > .mk-menubar span:nth-of-type(5) { margin-right: auto; }
.mk-mbp__base { position: relative; height: 0; padding-bottom: 2.6%; background: linear-gradient(180deg, #E6E8EB 0%, #D3D6DB 45%, #ADB1B8 100%);
  border-radius: 2px 2px 48% 48% / 2px 2px 100% 100%;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), 0 18px 26px -12px rgb(18 24 38 / .45), 0 46px 60px -34px rgb(18 24 38 / .35); }
.mk-mbp__groove { position: absolute; left: 50%; top: 0; width: 15%; height: 45%; transform: translateX(-50%); background: linear-gradient(180deg, #A9ADB4, #C9CCD1); border-radius: 0 0 10px 10px; }
.mk-mbp .mk { flex: 1; min-height: 0; }
.mk-mbp .mk__screen { font-size: calc(100cqi / 100); padding: 2.2em 2.6em; gap: 1.6em; height: 100%; box-sizing: border-box; display: grid; grid-template-rows: auto auto 1fr auto; }
.mk-an__kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4em; }
.mk-an__kpi { gap: .4em; }
.mk-an__kpi .mk-big { font-size: 3em; }
.mk-an__main { display: grid; grid-template-columns: 2.1fr 1fr; gap: 1.4em; min-height: 0; }
.mk-an__main > .mk-card { min-height: 0; }
.mk-an__chart svg { width: 100%; height: 100%; min-height: 0; display: block; }
.mk-an__chart { grid-template-rows: auto 1fr auto; }
.mk-an__axis { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 1.05em; color: var(--c-muted); padding: 0 1%; }
.mk-an__axis b { color: var(--c-ink); font-weight: 500; }
.mk-an__donut { grid-template-columns: 12em 1fr; align-items: center; column-gap: 1.6em; }
.mk-an__donut > .mk-head { grid-column: 1 / -1; }
.mk-an__donut .mk-ring { width: 12em; height: 12em; }
.mk-an__legend { display: grid; gap: .8em; }
.mk-an__legend p { display: flex; align-items: center; gap: .7em; font-size: 1.2em; color: var(--c-muted); white-space: nowrap; }
.mk-an__legend p::before { content: ""; width: .8em; height: .8em; background: var(--k, var(--c-brand)); flex: none; }
.mk-an__legend b { margin-left: auto; font-family: var(--f-mono); font-weight: 500; color: var(--c-ink); }
.mk-an__foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4em; }
.mk-an__foot .mk-card { gap: .6em; }
.mk-key { display: inline-flex; align-items: center; gap: .5em; font-size: 1.1em; color: var(--c-muted); white-space: nowrap; }
.mk-key::before { content: ""; width: 1em; height: .3em; background: var(--k, var(--c-brand)); }
@container (max-width: 440px) {
  .mk-mbp .mk__screen { font-size: calc(100cqi / 100); padding: 2.2em 2.6em; }
}
.mk-an__donut .mk-ring__val .mk-num { font-size: 1.6em; }

/* MacBook in 3/4 view, tilted toward the viewer */
.mk-mbp { perspective: 2400px; perspective-origin: 50% 0%; padding: 1% 0 19%; width: min(100%, 1040px); }
.mk-mbp__body { position: relative; width: 80%; margin: 0 auto; transform-style: preserve-3d; transform: rotateX(16deg) rotateY(-18deg) rotateZ(.6deg); }
.mk-mbp__lid { margin: 0; transform-origin: 50% 100%; transform: rotateX(4deg);
  box-shadow: 0 0 0 2px #C9CCD2, 0 0 0 3px #A8ACB3, -30px 40px 60px -30px rgb(18 24 38 / .35); }
.mk-mbp__deck { position: absolute; left: -5.5%; right: -5.5%; top: 100%; height: 92%; transform-origin: 50% 0; transform: rotateX(86deg);
  background: linear-gradient(180deg, #D7DADE 0%, #E4E6E9 40%, #DADCE0 100%); border-radius: 1.4% 1.4% 2.6% 2.6% / 2% 2% 3.8% 3.8%;
  box-shadow: inset 0 0 0 1px #BCC0C6, inset 0 8px 14px -8px rgb(18 24 38 / .45), 0 40px 70px 10px rgb(18 24 38 / .28), 0 12px 24px rgb(18 24 38 / .22); }
.mk-mbp__deck::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.6%; transform-origin: 50% 100%; transform: rotateX(-90deg);
  background: linear-gradient(180deg, #C2C6CC, #9EA3AA); border-radius: 0 0 6px 6px; }
.mk-mbp__keys { position: absolute; left: 13%; right: 13%; top: 7%; height: 43%; background: #1B2029; border-radius: 6px;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 15 - 3px), #0E1218 calc(100% / 15 - 3px) calc(100% / 15)),
    repeating-linear-gradient(180deg, transparent 0 calc(100% / 6 - 3px), #0E1218 calc(100% / 6 - 3px) calc(100% / 6));
  box-shadow: inset 0 0 0 3px #0E1218; }
.mk-mbp__speaker { position: absolute; left: 3%; top: 7%; width: 8%; height: 43%;
  background-image: radial-gradient(circle, #8E939B 0 1px, transparent 1.4px); background-size: 6px 6px; opacity: .8; }
.mk-mbp__speaker--r { left: auto; right: 3%; }
.mk-mbp__pad { position: absolute; left: 31%; right: 31%; top: 56%; height: 36%; background: linear-gradient(180deg, #D0D3D8, #C8CBD0); border-radius: 8px; box-shadow: inset 0 0 0 1px #B5B9C0; }
.mk-mbp { perspective: 2200px; perspective-origin: 50% -20%; padding: 2% 0 24%; }
.mk-mbp__body { transform: rotateX(-18deg) rotateY(-20deg) rotateZ(-.4deg); }
.mk-mbp__lid { transform: rotateX(6deg); }
.mk-mbp__deck { transform: rotateX(90deg); }
.mk-mbp { perspective: 3200px; perspective-origin: 50% -30%; padding: 2% 0 15%; overflow: visible; }
.mk-mbp__body { width: 72%; transform: translateX(-3%) rotateX(-11deg) rotateY(-17deg) rotateZ(-.3deg); }
.mk-mbp__lid { transform: rotateX(4deg); }
.mk-mbp__deck { height: 66%; left: -5%; right: -5%; }
.mk-mbp__keys { left: 15%; right: 15%; top: 8%; height: 40%; border-radius: 4px; background-color: #222833;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 18 - 2px), #0E1218 calc(100% / 18 - 2px) calc(100% / 18)),
    repeating-linear-gradient(180deg, transparent 0 calc(100% / 6 - 2px), #0E1218 calc(100% / 6 - 2px) calc(100% / 6));
  box-shadow: inset 0 0 0 2px #0E1218; }
.mk-mbp__speaker { top: 8%; height: 40%; width: 10%; left: 3%; background-size: 5px 5px; }
.mk-mbp__speaker--r { left: auto; right: 3%; }
.mk-mbp__pad { left: 33%; right: 33%; top: 55%; height: 37%; }
/* straight front view, camera slightly above */
.mk-mbp { perspective: 2600px; perspective-origin: 50% -10%; padding: 1% 0 9%; }
.mk-mbp__body { width: 76%; transform: rotateX(-15deg); }
.mk-mbp__lid { transform: rotateX(3deg); }
.mk-mbp__deck { height: 64%; left: -5%; right: -5%; }
.mk-mbp { padding-bottom: 15%; }
/* proportions closer to a real MacBook: base as wide as the lid, flatter view */
.mk-mbp { perspective: 4600px; perspective-origin: 50% -25%; padding-bottom: 11%; }
.mk-mbp__body { width: 78%; transform: rotateX(-10deg); }
.mk-mbp__lid { transform: rotateX(2deg); }
.mk-mbp__deck { left: -.6%; right: -.6%; height: 66%; border-radius: 1% 1% 2.4% 2.4% / 1.4% 1.4% 3.4% 3.4%; }
.mk-mbp__keys { left: 15.5%; right: 15.5%; top: 5%; height: 41%; border-radius: 3px; background-color: #252B36;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 14 - 2px), #10141B calc(100% / 14 - 2px) calc(100% / 14)),
    repeating-linear-gradient(180deg, transparent 0 calc(100% / 6 - 2px), #10141B calc(100% / 6 - 2px) calc(100% / 6)); }
.mk-mbp__speaker { left: 3.5%; width: 10%; top: 5%; height: 41%; background-size: 4px 4px; }
.mk-mbp__speaker--r { left: auto; right: 3.5%; }
.mk-mbp__pad { left: 30%; right: 30%; top: 52%; height: 40%; border-radius: 6px; }

/* ===================== floating 3D phone (groups hero) ===================== */
.hero__section .hero__column__media--bare { background: none; border: 0; padding: 0; }
.hero__section .hero__column__media--bare::before, .hero__section .hero__column__media--bare::after { display: none; }
.mk-stage--float { aspect-ratio: 6 / 5; background: none; display: grid; place-items: center; perspective: 1600px; perspective-origin: 50% 30%; }
.mk-stage--float .mk-phone--real {
  position: relative; left: auto; top: auto; width: 40%;
  transform: rotateX(26deg) rotateY(-12deg) rotateZ(-26deg);
  transform-style: preserve-3d;
  background: #0F1115;
  box-shadow:
    inset 0 0 0 1.5px #3A3F48,
    1px 1px 0 #2A2E36, 2px 2px 0 #24282F, 3px 3px 0 #1F2228, 4px 4px 0 #1A1D22, 5px 5px 0 #16181D, 6px 6px 0 #121418;
}
.mk-stage--float .mk-phone__screen { box-shadow: inset 0 0 0 1px rgb(0 0 0 / .5); }
.mk-phone__btn { position: absolute; width: 3px; background: #2B2F37; border-radius: 2px; }
.mk-phone__btn--a { left: -3px; top: 17%; height: 4%; }
.mk-phone__btn--b { left: -3px; top: 23%; height: 7%; }
.mk-phone__btn--c { right: -3px; top: 25%; height: 10%; }
.mk-phone__home { display: block; width: 34%; height: 4px; margin: 0 auto 3cqi; border-radius: 4px; background: var(--c-ink); }
.mk-stage--float .mk-phone__tabs { padding-bottom: 3cqi; }
.mk-floor { position: absolute; left: 24%; right: 18%; bottom: 4%; height: 14%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(18 24 38 / .32), rgb(18 24 38 / 0)); filter: blur(6px); transform: translate(6%, 0) rotate(-14deg); }
@container (max-width: 440px) {
  .mk-stage--float { aspect-ratio: 1 / 1; }
  .mk-stage--float .mk-phone--real { width: 52%; }
}
.mk-stage--float { aspect-ratio: 1 / 1.02; perspective: 1800px; }
.mk-stage--float .mk-phone--real { width: 37%; transform: rotateX(24deg) rotateY(-10deg) rotateZ(-24deg) translateY(-3%); }
.mk-floor { left: 34%; right: 12%; bottom: 7%; height: 11%; transform: rotate(-22deg); filter: blur(8px); }
.hero__section:has(.hero__column__media--bare) .hero__grid::before { grid-column: 7 / -1; }
@container (max-width: 440px) {
  .mk-stage--float .mk-phone--real { width: 50%; }
}
@container (max-width: 440px) {
  .mk-stage--float { aspect-ratio: 1 / 1.12; }
  .mk-stage--float .mk-phone--real { width: 42%; }
}

/* ===================== security hero: phone + tablet + laptop floating ===================== */
.intro__section .zf-split__visual--bare { background: none; border: 0; padding: 0; }
.intro__section .zf-split__visual--bare::before, .intro__section .zf-split__visual--bare::after { display: none; }
.intro__section:has(.zf-split__visual--bare) .zf-split::before { grid-column: 7 / -1; }
.mk-stage--trio { position: relative; aspect-ratio: 1 / 1.05; background: none; perspective: 1700px; perspective-origin: 50% 40%; }

.mk-stage--trio .mk-phone--real {
  position: absolute; left: 2%; top: 10%; width: 33%; z-index: 3;
  transform: rotateX(16deg) rotateY(22deg) rotateZ(-12deg);
  background: #0F1115;
  box-shadow: inset 0 0 0 1.5px #3A3F48,
    -1px 1px 0 #2A2E36, -2px 2px 0 #24282F, -3px 3px 0 #1F2228, -4px 4px 0 #1A1D22, -5px 5px 0 #16181D,
    -10px 40px 50px -20px rgb(18 24 38 / .35);
}
.mk-stage--trio .mk-phone .mk__screen { font-size: calc(100cqi / 29); }

.mk-tablet--trio { position: absolute; right: 0; top: 3%; width: 56%; z-index: 1;
  transform: rotateX(14deg) rotateY(-10deg) rotateZ(24deg); }
.mk-tablet--trio .mk-tablet__screen > .mk { flex: 1; min-height: 0; overflow: hidden; }
.mk-tablet--trio .mk__screen { font-size: calc(100cqi / 40); padding: 1.6em 2.2em; gap: 1.2em; background: var(--c-surface); }

.mk-mbp--trio { position: absolute; right: -4%; bottom: 3%; width: 64%; padding: 0; perspective: 1500px; perspective-origin: 50% -20%; z-index: 2; }
.mk-mbp--trio .mk-mbp__body { width: 86%; transform: rotateX(-14deg) rotateY(-16deg) rotateZ(-3deg); }
.mk-mbp--trio .mk-mbp__screen > .mk { flex: 1; min-height: 0; overflow: hidden; }
.mk-mbp--trio .mk__screen { font-size: calc(100cqi / 52); padding: 1.6em 2.2em; gap: 1.1em; display: flex; flex-direction: column; height: auto; }
.mk-mbp--trio .mk-menubar { font-size: 2.6cqi; }
.mk-log__time { width: 3.6em; flex: none; font-size: 1.15em; color: var(--c-muted); }

@container (max-width: 440px) {
  .mk-stage--trio { aspect-ratio: 1 / 1.1; }
  .mk-stage--trio .mk-tablet--trio, .mk-stage--trio .mk-mbp--trio { display: none; }
  .mk-stage--trio .mk-phone--real { left: 30%; top: 8%; width: 42%; }
  .mk-stage--trio .mk-phone .mk__screen { font-size: calc(100cqi / 29); }
  .mk-tablet--trio .mk__screen { font-size: calc(100cqi / 40); padding: 1.6em 2.2em; }
  .mk-mbp--trio .mk__screen { font-size: calc(100cqi / 52); padding: 1.6em 2.2em; }
}
/* 3D scenes may overhang their box: let the wipe end beyond the edges */
html.js [data-kx="wipe"].is-in > .mk:is(.mk--security-device, .mk--groups-device),
html.js .mk:is(.mk--security-device, .mk--groups-device)[data-kx="wipe"].is-in { clip-path: inset(-25%); }
.mk-stage--trio { aspect-ratio: 1 / 1.08; }
.mk-stage--trio .mk-phone--real { left: 5%; top: 11%; width: 31%; }
.mk-tablet--trio { right: 3%; top: 6%; width: 52%; }
.mk-mbp--trio { right: 0; bottom: 6%; width: 60%; }
@container (max-width: 440px) {
  .mk-stage--trio .mk-phone--real { left: 30%; top: 8%; width: 42%; }
}
/* security: tablet behind, phone in front */
.mk-stage--trio { aspect-ratio: 1 / .98; }
.mk-tablet--trio { right: 1%; top: 6%; width: 68%; z-index: 1; transform: rotateX(16deg) rotateY(-12deg) rotateZ(20deg); }
.mk-stage--trio .mk-phone--real { left: 7%; top: 20%; width: 34%; z-index: 3;
  box-shadow: inset 0 0 0 1.5px #3A3F48,
    -1px 1px 0 #2A2E36, -2px 2px 0 #24282F, -3px 3px 0 #1F2228, -4px 4px 0 #1A1D22, -5px 5px 0 #16181D,
    10px 50px 60px -20px rgb(18 24 38 / .45); }
@container (max-width: 440px) {
  .mk-stage--trio { aspect-ratio: 1 / 1.1; }
  .mk-stage--trio .mk-phone--real { left: 30%; top: 8%; width: 42%; }
}
.mk-tablet--trio { right: 5%; top: 9%; width: 60%; transform: rotateX(14deg) rotateY(-10deg) rotateZ(16deg); }
.mk-stage--trio .mk-phone--real { left: 8%; top: 18%; width: 33%;
  box-shadow: inset 0 0 0 1.5px #3A3F48,
    -1px 1px 0 #2A2E36, -2px 2px 0 #24282F, -3px 3px 0 #1F2228, -4px 4px 0 #1A1D22, -5px 5px 0 #16181D,
    8px 26px 34px -18px rgb(18 24 38 / .45); }
.intro__section .zf-split__visual--bare { overflow: visible; }

/* 3D device scenes: fade in instead of a clipping wipe, so shadows are never cut */
html.js .mk:is(.mk--security-device, .mk--groups-device)[data-kx="wipe"],
html.js [data-kx="wipe"] > .mk:is(.mk--security-device, .mk--groups-device) { clip-path: none !important; }
html.js .mk:is(.mk--security-device, .mk--groups-device)[data-kx="wipe"]:not(.is-in) { opacity: 0; }
html.js .mk:is(.mk--security-device, .mk--groups-device)[data-kx="wipe"].is-in { opacity: 1; transition: opacity var(--t-slow) var(--ease); }

/* ===================== spending hero: arm with smartwatch from the page edge ===================== */
.hero__section .hero__column__media--arm { overflow: visible; align-self: center; }
.mk--watch { overflow: visible; }
.mk-watch { display: block; width: 112%; height: auto; overflow: visible; margin-left: -6%; }
.mk-watch__name { font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; fill: #F7F5F0; }
.mk-watch__tiny { font-family: var(--f-mono); font-size: 5.2px; fill: #A3A7B3; letter-spacing: .02em; }

/* ===================== spending hero: open MacBook, 3/4 view from above ===================== */
.hero__section .hero__column__media--laptop { overflow: visible; align-self: center; }
html.js .mk--sp-device[data-kx="fade"]:not(.is-in) { opacity: 0; }
html.js .mk--sp-device[data-kx="fade"].is-in { opacity: 1; transition: opacity var(--t-slow) var(--ease); }
.mk-stage--laptop { background: none; aspect-ratio: 1 / .82; display: grid; align-items: start; }
.mk-mbp--hero { width: 100%; padding: 4% 0 0; perspective: 1900px; perspective-origin: 30% -40%; }
.mk-mbp--hero .mk-mbp__body { width: 74%; margin: 0 0 0 4%; transform: rotateX(-22deg) rotateY(24deg) rotateZ(1deg); }
.mk-mbp--hero .mk-mbp__lid { transform: rotateX(8deg); box-shadow: 0 0 0 2px #C9CCD2, 0 0 0 3px #A8ACB3, -40px 30px 50px -30px rgb(18 24 38 / .35); }
.mk-mbp--hero .mk-mbp__deck { height: 72%; box-shadow: inset 0 0 0 1px #BCC0C6, inset 0 8px 14px -8px rgb(18 24 38 / .45), -30px 60px 70px -10px rgb(18 24 38 / .30), -8px 18px 24px rgb(18 24 38 / .22); }
.mk-mbp--hero .mk-mbp__screen > .mk { flex: 1; min-height: 0; overflow: hidden; }
.mk-mbp--hero .mk__screen { font-size: calc(100cqi / 62); padding: 1.6em 2em; gap: 1.2em; display: flex; flex-direction: column; height: auto; }
.mk-mbp--hero .mk-menubar { font-size: 2cqi; }
.mk-sp { display: grid; grid-template-columns: 1fr 1.35fr; gap: 1.2em; }
.mk-sp__side { display: grid; gap: 1.2em; align-content: start; }
.mk-sp .mk-big { font-size: 2.8em; }
.mk-sp .mk-row { padding: .7em 0; }
@container (max-width: 440px) {
  .mk-mbp--hero .mk__screen { font-size: calc(100cqi / 62); padding: 1.6em 2em; }
  .mk-sp { grid-template-columns: 1fr 1.35fr; }
}
.mk-mbp--hero .mk-mbp__body { width: 70%; margin-left: 13%; }

/* front-facing MacBook (index): soft floor shadow instead of the skewed 3D box-shadow */
.mk--display .mk-mbp { position: relative; }
.mk--display .mk-mbp__deck { box-shadow: inset 0 0 0 1px #BCC0C6, inset 0 8px 14px -8px rgb(18 24 38 / .35); }
.mk--display .mk-mbp::after { content: ""; position: absolute; z-index: -1; left: 8%; right: 8%; bottom: 3%; height: 9%;
  background: radial-gradient(closest-side, rgb(18 24 38 / .30), rgb(18 24 38 / .12) 55%, rgb(18 24 38 / 0)); }
.mk--display .mk-mbp { isolation: isolate; }
.mk--display .mk-mbp::after { bottom: 5%; height: 7%; left: 6%; right: 6%;
  background: radial-gradient(50% 50% at 50% 50%, rgb(18 24 38 / .42), rgb(18 24 38 / .16) 60%, rgb(18 24 38 / 0)); }
.mk--display .mk-mbp::after { content: none; }
.mk-mbp__floor { position: absolute; left: 4%; right: 4%; bottom: 12.5%; height: 5%; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgb(18 24 38 / .38), rgb(18 24 38 / .14) 55%, rgb(18 24 38 / 0)); filter: blur(4px); }
.mk-mbp__floor { bottom: 11.5%; height: 6.5%; background: radial-gradient(50% 50% at 50% 50%, rgb(18 24 38 / .5), rgb(18 24 38 / .2) 55%, rgb(18 24 38 / 0)); }
/* spending MacBook (3/4 view): no skewed 3D box-shadows, soft floor shadow aligned with the base */
.mk-mbp--hero { position: relative; isolation: isolate; }
.mk-mbp--hero .mk-mbp__lid { box-shadow: 0 0 0 2px #C9CCD2, 0 0 0 3px #A8ACB3; }
.mk-mbp--hero .mk-mbp__deck { box-shadow: inset 0 0 0 1px #BCC0C6, inset 0 8px 14px -8px rgb(18 24 38 / .35); }
.mk-mbp--hero .mk-mbp__floor { left: 20%; right: 2%; top: 64%; bottom: auto; height: 15%; z-index: -1; transform: rotate(-16deg);
  background: radial-gradient(50% 50% at 50% 50%, rgb(18 24 38 / .34), rgb(18 24 38 / .12) 60%, rgb(18 24 38 / 0)); filter: blur(10px); }
.mk-mbp--hero .mk-mbp__floor { left: 24%; right: 0; top: 80%; height: 14%; transform: rotate(-15deg); filter: blur(12px);
  background: radial-gradient(50% 50% at 50% 50%, rgb(18 24 38 / .42), rgb(18 24 38 / .16) 60%, rgb(18 24 38 / 0)); }
.mk-mbp--hero .mk-mbp__floor { left: 20%; right: 0; top: 118%; height: 30%; transform: rotate(-14deg); filter: blur(14px);
  background: radial-gradient(50% 50% at 50% 50%, rgb(18 24 38 / .38), rgb(18 24 38 / .14) 60%, rgb(18 24 38 / 0)); }
