.simulator-page #main-content > :is(.ms-guide,.ext-next-review,.tp-related) {
  width:calc(100% + 2 * (var(--ms-page-gutter) - var(--tp-content-gutter)));
  max-width:calc(var(--tp-content-width) - 2 * var(--tp-content-gutter));
  margin-inline:auto;
}

.ms-guide {
  --ms-guide-gap:clamp(22px, 3.3vw, 38px);
  margin-top:clamp(44px, 6vw, 86px);
  padding-bottom:clamp(32px, 5vw, 58px);
}

.ms-guide-intro {
  max-width:720px;
  margin:0 auto clamp(24px, 4vw, 43px);
  text-align:center;
}

.ms-guide h2 {
  margin:0 0 12px;
  color:var(--text);
  font-size:clamp(28px, 3.65vw, 44px);
  font-weight:740;
  line-height:1.13;
  letter-spacing:-.04em;
  text-wrap:balance;
  scroll-margin-top:100px;
}

.ms-guide-intro-accent { color:var(--accent); }

.ms-guide-intro p {
  margin:0;
  color:var(--muted);
  font-size:clamp(15px, 1.7vw, 18px);
  line-height:1.7;
  text-wrap:pretty;
}

.ms-guide-steps {
  display:grid;
  gap:clamp(23px, 3.5vw, 42px);
  margin:0;
  padding:0;
  list-style:none;
}

.ms-guide-step {
  --ms-step-color:var(--accent);
  position:relative;
  isolation:isolate;
  min-width:0;
  padding-top:clamp(16px, 2.25vw, 24px);
  border-top:1px solid var(--line);
}

.ms-guide-step:is([data-ms-guide-step="classic"],[data-ms-guide-step="placement"]) {
  --ms-step-color:color-mix(in srgb, #2c83df 78%, var(--text));
}

.ms-guide-step:is([data-ms-guide-step="devices"],[data-ms-guide-step="workspace"]) {
  --ms-step-color:color-mix(in srgb, #099e80 75%, var(--text));
}

.ms-guide-step[data-ms-guide-step="controls"] {
  --ms-step-color:color-mix(in srgb, #cd569b 78%, var(--text));
}

.android-emulator-guide {
  --accent:#157653;
  --accent:light-dark(#157653,#77e0aa);
}

.iphone-emulator-guide {
  --accent:#405f8b;
  --accent:light-dark(#405f8b,#a9c5f3);
}

:is(.android-emulator-guide,.iphone-emulator-guide) .ms-guide-step { --ms-step-color:var(--accent); }
.android-emulator-guide .ms-guide-step:is([data-ms-guide-step="devices"],[data-ms-guide-step="navigate"]) {
  --ms-step-color:light-dark(#13786a,#74dcc8);
}

.iphone-emulator-guide .ms-guide-step:is([data-ms-guide-step="devices"],[data-ms-guide-step="navigate"]) {
  --ms-step-color:light-dark(#4a617e,#b4c9e6);
}

:is(.iphone-mockup-guide,.ipad-mockup-guide) {
  --accent:#5142bb;
  --accent:light-dark(#5142bb,#b0a4ff);
  margin-top:clamp(16px,3vw,34px);
}

:is(.iphone-mockup-guide,.ipad-mockup-guide) .ms-guide-step { --ms-step-color:var(--accent); }
:is(.iphone-mockup-guide,.ipad-mockup-guide) .ms-guide-step:is([data-ms-guide-step="views"],[data-ms-guide-step="image-tools"]) {
  --ms-step-color:light-dark(#3d59b3,#9eafff);
}
:is(.iphone-mockup-guide,.ipad-mockup-guide) .ms-guide-step:is([data-ms-guide-step="blank-download"],[data-ms-guide-step="export"]) {
  --ms-step-color:light-dark(#754597,#c9a7f3);
}

.ms-guide :is(.android-tool-comparison,.iphone-tool-comparison) {
  width:min(100%, 930px);
  margin:clamp(34px, 5vw, 58px) auto 0;
}

:is(.android-tool-comparison,.iphone-tool-comparison) h2 {
  margin:0 auto 18px;
  font-size:clamp(25px, 3vw, 34px);
  text-align:center;
}

:is(.android-tool-comparison,.iphone-tool-comparison) :is(th,td) { text-align:start; }
:is(.android-tool-comparison,.iphone-tool-comparison) thead th:first-child { width:20%; }
:is(.android-tool-comparison,.iphone-tool-comparison) thead th:nth-child(2) { width:25%; background:var(--bg2); }
:is(.android-tool-comparison,.iphone-tool-comparison) td:nth-child(2) { background:var(--card); }
:is(.android-tool-comparison,.iphone-tool-comparison) thead th:nth-child(3) { width:30%; background:color-mix(in srgb,var(--accent) 22%,var(--bg2)); }
:is(.android-tool-comparison,.iphone-tool-comparison) td:nth-child(3) { background:color-mix(in srgb,var(--accent) 14%,var(--card)); }

:is(.android-compare-column,.iphone-compare-column) {
  display:flex;
  align-items:center;
  gap:8px;
}

:is(.android-compare-column,.iphone-compare-column) :is(svg,img) {
  flex:none;
  width:24px;
  height:24px;
  color:var(--accent);
}

:is(.android-tool-comparison,.iphone-tool-comparison) .mf-compare-benefit { align-items:flex-start; }

:is(.android-tool-comparison,.iphone-tool-comparison) [data-comparison-status="partial"] .mf-compare-status {
  color:#182819;
  background:linear-gradient(135deg,#f4d86c,#9cc958);
}

@media (forced-colors:active) {
  :is(.android-tool-comparison,.iphone-tool-comparison) [data-comparison-status="partial"] .mf-compare-status {
    color:ButtonText;
    background:ButtonFace;
    outline:1px solid ButtonText;
  }
}

.ms-guide-step::before {
  --ms-step-tint:light-dark(color-mix(in srgb, var(--ms-step-color) 8%, transparent), transparent);
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background:linear-gradient(180deg, transparent, var(--ms-step-tint) 36% 64%, transparent);
  mask-image:linear-gradient(90deg, transparent, #000 12% 88%, transparent);
  pointer-events:none;
}

.ms-guide-chapter {
  --accent:var(--ms-step-color);
  margin:0 0 14px;
  color:var(--text);
  font-size:clamp(25px, 3vw, 32px);
  font-weight:700;
  line-height:1.18;
  letter-spacing:-.035em;
  text-align:center;
  text-wrap:balance;
}

.ms-guide-chapter .ms-guide-number { margin:0 auto 6px; }

.ms-guide-chapter .ms-guide-number::before {
  content:"";
  width:52px;
  height:2px;
  border-radius:2px;
  background:linear-gradient(90deg,transparent,var(--accent));
  opacity:.5;
}

.ms-guide-step p {
  margin:0;
  color:var(--muted);
  font-size:15px;
  line-height:1.7;
  text-wrap:pretty;
}

.ms-guide-step strong { color:var(--text); }

.ms-guide-step kbd {
  display:inline-block;
  padding:0 5px;
  border:1px solid var(--line);
  border-radius:5px;
  background:var(--card);
  color:var(--text);
  font-size:.85em;
  line-height:1.55;
}

.ms-guide-step img {
  display:block;
  max-width:100%;
  height:auto;
  border-radius:11px;
  background:var(--bg2);
  box-shadow:0 0 0 1px var(--line);
}

.ms-guide-device-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  column-gap:var(--ms-guide-gap);
  row-gap:12px;
  width:min(100%, 850px);
  margin-inline:auto;
}

.ms-guide-device-grid > div {
  display:grid;
  grid-row:span 2;
  grid-template-rows:subgrid;
  min-width:0;
}

.ms-guide-device-grid img {
  width:auto;
  max-height:clamp(52px, 9vw, 88px);
  align-self:end;
  justify-self:center;
}

.ms-guide-device-copy {
  align-self:start;
  text-align:center;
}

.ms-guide-device-copy p { max-width:36ch; margin-inline:auto; }

.ms-guide-device-copy h4 {
  margin:0 0 5px;
  color:var(--text);
  font-size:16px;
  font-weight:680;
  line-height:1.3;
}

.ms-guide-diagram {
  width:min(100%, 850px);
  margin-inline:auto;
}

.ms-guide-step[data-ms-guide-step="start"] .ms-guide-diagram { max-width:690px; }
.ms-guide-step[data-ms-guide-step="controls"] .ms-guide-diagram { max-width:650px; }
.ms-guide-step[data-ms-guide-step="placement"] .ms-guide-diagram { max-width:750px; }
:is(.android-emulator-guide,.iphone-emulator-guide) [data-ms-guide-step="slots"] .ms-guide-diagram { max-width:690px; }
:is(.android-emulator-guide,.iphone-emulator-guide) [data-ms-guide-step="actions"] .ms-guide-diagram { max-width:650px; }
:is(.android-emulator-guide,.iphone-emulator-guide) [data-ms-guide-step="background"] .ms-guide-diagram { max-width:750px; }
:is(.iphone-mockup-guide,.ipad-mockup-guide) :is([data-ms-guide-step="devices"],[data-ms-guide-step="blank-download"],[data-ms-guide-step="upload"]) .ms-guide-diagram { max-width:400px; }
:is(.iphone-mockup-guide,.ipad-mockup-guide) [data-ms-guide-step="views"] .ms-guide-diagram { width:min(100%,960px); }
:is(.iphone-mockup-guide,.ipad-mockup-guide) :is([data-ms-guide-step="image-tools"],[data-ms-guide-step="export"]) .ms-guide-diagram { max-width:680px; }
:is(.iphone-mockup-guide,.ipad-mockup-guide) :is(.ms-guide-original,.ms-guide-arrows--wide) { display:none; }

.ms-guide-diagram-shot {
  position:relative;
  margin:0;
  padding-block:var(--ms-guide-above) var(--ms-guide-below);
}

.ms-guide-diagram-shot > img {
  width:var(--ms-guide-shot-width);
  aspect-ratio:var(--ms-guide-shot-ratio);
  margin-inline:auto;
  object-fit:cover;
  object-position:top;
}

.ms-guide-arrows {
  --ms-neon-edge:color-mix(in srgb,var(--ms-step-color) 70%,black);
  --ms-neon-glow:color-mix(in srgb,var(--ms-step-color) 52%,transparent);
  position:absolute;
  z-index:1;
  inset:0;
  width:100%;
  height:100%;
  overflow:visible;
  pointer-events:none;
  color:color-mix(in srgb,var(--ms-step-color) 72%,white);
  filter:drop-shadow(0 0 1px var(--ms-neon-edge)) drop-shadow(0 0 4px var(--ms-neon-glow));
}

.ms-guide-leader,
.ms-guide-target {
  stroke:currentColor;
  stroke-width:2.6px;
  vector-effect:non-scaling-stroke;
}

.ms-guide-leader { fill:none; stroke-linecap:butt; }
.ms-guide-target { fill:color-mix(in srgb,var(--ms-step-color) 16%,transparent); }

.ms-guide-callouts {
  display:grid;
  column-gap:clamp(10px, 2.4vw, 22px);
  margin:0;
  padding:0;
  list-style:none;
}

.ms-guide-callouts[data-count="1"] { width:min(100%,530px); margin-inline:auto; }
.ms-guide-callouts[data-count="2"] { grid-template-columns:repeat(2,minmax(0,1fr)); }
.ms-guide-callouts[data-count="3"] { grid-template-columns:repeat(3,minmax(0,1fr)); }

.ms-guide-callout {
  min-width:0;
  padding:clamp(12px,2vw,20px);
  border:1px solid color-mix(in srgb,var(--ms-step-color) 26%,var(--line));
  border-radius:14px;
  text-align:center;
  background:
    linear-gradient(135deg,color-mix(in srgb,var(--ms-step-color) 8%,transparent),transparent 75%),
    var(--card);
  box-shadow:0 4px 16px color-mix(in srgb,var(--text) 5%,transparent);
}

.ms-guide-callout h4 {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:.4em;
  margin:0 0 6px;
  color:var(--text);
  font-size:16px;
  font-weight:700;
  line-height:1.35;
  overflow-wrap:anywhere;
}

.ms-guide-callout svg {
  flex:none;
  width:17px;
  height:17px;
  color:var(--ms-step-color);
}

:is(.iphone-mockup-guide,.ipad-mockup-guide) [data-ms-guide-step="image-tools"] .ms-guide-callouts[data-count="3"] { column-gap:0; }
:is(.iphone-mockup-guide,.ipad-mockup-guide) [data-ms-guide-step="image-tools"] .ms-guide-callouts[data-count="3"] .ms-guide-callout {
  margin-inline:clamp(3px,.45vw,5px);
  padding-inline:clamp(7px,1.25vw,16px);
}
:is(.iphone-mockup-guide,.ipad-mockup-guide) [data-ms-guide-step="image-tools"] .ms-guide-callouts[data-count="3"] h4 {
  display:flex;
  flex-wrap:nowrap;
  gap:5px;
}
:is(.iphone-mockup-guide,.ipad-mockup-guide) [data-ms-guide-step="image-tools"] .ms-guide-callouts[data-count="3"] h4 svg { margin:0; }

.ms-guide-callout p { font-size:14px; line-height:1.6; }

.ms-guide a {
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:.22em;
}

.ms-guide .mf-faq {
  margin-top:clamp(40px, 6vw, 72px);
}

.ms-guide .mf-faq .mg-section-heading { max-width:none; margin-bottom:18px; }

.ms-guide .mf-faq h2 {
  color:var(--text);
  color:light-dark(var(--text),#fff);
  font-size:clamp(28px, 3.3vw, 38px);
  text-align:center;
}

.ms-guide-extension {
  width:min(100%, 800px);
  margin:clamp(36px, 5vw, 56px) auto 0;
}

.ms-guide-extension h2 {
  margin:0 0 16px;
  font-size:clamp(26px, 3.1vw, 36px);
  text-align:center;
  scroll-margin-top:104px;
}

.ms-guide-extension p {
  margin:0;
  color:var(--text);
  font-size:clamp(16px, 1.65vw, 18px);
  line-height:2;
  text-wrap:pretty;
}

.ms-guide-extension-control {
  display:inline-block;
  margin-inline:2px;
  vertical-align:middle;
  line-height:0;
}

.ms-guide-extension-control img {
  display:block;
  border-radius:7px;
}

.ms-guide-extension-control [data-appearance="dark"],
:root[data-theme="dark"] .ms-guide-extension-control [data-appearance="light"] { display:none; }
:root[data-theme="dark"] .ms-guide-extension-control [data-appearance="dark"] { display:block; }

@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) .ms-guide-extension-control [data-appearance="light"] { display:none; }
  :root:not([data-theme="light"]) .ms-guide-extension-control [data-appearance="dark"] { display:block; }
}

.ms-guide-extension-control[data-extension-control="ws-add"] img { box-shadow:0 2px 10px rgba(109,101,240,.4); }

.ms-guide :is(a,summary):focus-visible {
  outline:2px solid var(--accent);
  outline-offset:3px;
}

@media (min-width:760px) {
  :is(.iphone-mockup-guide,.ipad-mockup-guide) [data-ms-guide-step] .ms-guide-diagram--sides {
    display:grid;
    max-width:850px;
    grid-template-columns:minmax(0,1fr) min(48%,400px) minmax(0,1fr);
    align-items:center;
  }
  :is(.iphone-mockup-guide,.ipad-mockup-guide) .ms-guide-diagram--sides > .ms-guide-diagram-shot { padding-block:0; }
  :is(.iphone-mockup-guide,.ipad-mockup-guide) [data-ms-guide-step="upload"] .ms-guide-diagram--sides {
    max-width:720px;
    grid-template-columns:min(55%,400px) minmax(0,1fr);
  }
  :is(.iphone-mockup-guide,.ipad-mockup-guide) .ms-guide-diagram--offset > .ms-guide-callouts:first-child {
    grid-template-columns:minmax(0,32%) minmax(0,34%);
    justify-content:space-between;
  }
  :is(.iphone-mockup-guide,.ipad-mockup-guide) .ms-guide-arrows--compact { display:none; }
  :is(.iphone-mockup-guide,.ipad-mockup-guide) .ms-guide-arrows--wide { display:block; }
}

@media (max-width:599px) {
  .ms-guide .mf-faq details p { padding-right:0; }
  :is(.iphone-mockup-guide,.ipad-mockup-guide) .ms-guide-original { display:block; margin:12px 0 0; text-align:center; font-size:13px; }
  .ms-guide-callout { padding:9px; border-radius:10px; }
  .ms-guide-callout h4 { font-size:14px; }
  .ms-guide-callout p { font-size:13px; overflow-wrap:anywhere; }
  .ms-guide-callouts[data-count="3"] .ms-guide-callout h4 { display:block; }
  .ms-guide-callouts[data-count="3"] .ms-guide-callout h4 svg { display:block; margin:0 auto 4px; }
}

@media (max-width:520px) {
  .ms-guide-device-grid { grid-template-columns:minmax(0, 1fr); row-gap:20px; }
  .ms-guide-device-grid > div { grid-row:auto; grid-template-rows:auto auto; gap:8px; }
}

@media (forced-colors:active) {
  .ms-guide-arrows { color:Highlight; filter:none; }
}

@media screen and (prefers-reduced-motion:no-preference) {
  .ms-guide-step[data-ms-guide-reveal="pending"] :is(
    .ms-guide-chapter,
    .ms-guide-diagram-shot > img,
    .ms-guide-arrows,
    .ms-guide-callout,
    .ms-guide-device-grid > div
  ) { opacity:0; }

  .ms-guide-step[data-ms-guide-reveal="shown"] :is(
    .ms-guide-chapter,
    .ms-guide-diagram-shot > img,
    .ms-guide-callout,
    .ms-guide-device-grid > div
  ) {
    animation:ms-guide-enter var(--ms-guide-enter-duration,320ms) cubic-bezier(.22,.75,.22,1)
      var(--ms-guide-enter-delay,0ms) backwards;
  }

  .ms-guide-step[data-ms-guide-reveal="shown"] .ms-guide-diagram-shot > img {
    --ms-guide-enter-delay:105ms;
    --ms-guide-enter-duration:340ms;
  }

  .ms-guide-step[data-ms-guide-reveal="shown"]:is([data-ms-guide-step="classic"],[data-ms-guide-step="placement"]) .ms-guide-diagram-shot > img {
    --ms-guide-enter-duration:460ms;
    animation-name:ms-guide-image-settle;
  }

  .ms-guide-step[data-ms-guide-reveal="shown"] .ms-guide-callout {
    --ms-guide-enter-delay:290ms;
    --ms-guide-enter-y:12px;
  }

  .ms-guide-step[data-ms-guide-reveal="shown"] .ms-guide-callouts:first-child > .ms-guide-callout {
    --ms-guide-enter-y:-12px;
  }

  .ms-guide-step[data-ms-guide-reveal="shown"] .ms-guide-callout:nth-child(2) { --ms-guide-enter-delay:365ms; }
  .ms-guide-step[data-ms-guide-reveal="shown"] .ms-guide-callout:nth-child(3),
  .ms-guide-step[data-ms-guide-reveal="shown"][data-ms-guide-step="workspace"] .ms-guide-callouts:last-child > .ms-guide-callout {
    --ms-guide-enter-delay:440ms;
  }

  .ms-guide-step[data-ms-guide-reveal="shown"] .ms-guide-arrows {
    animation:ms-guide-arrows-in 250ms ease-out 510ms backwards;
  }

  .ms-guide-step[data-ms-guide-reveal="shown"] .ms-guide-device-grid > div:first-child {
    --ms-guide-enter-delay:105ms;
    --ms-guide-enter-x:-14px;
    --ms-guide-enter-y:0px;
  }

  .ms-guide-step[data-ms-guide-reveal="shown"] .ms-guide-device-grid > div:last-child {
    --ms-guide-enter-delay:175ms;
    --ms-guide-enter-x:14px;
    --ms-guide-enter-y:0px;
  }
}

@keyframes ms-guide-enter {
  from { opacity:0; transform:translate(var(--ms-guide-enter-x,0px),var(--ms-guide-enter-y,8px)); }
  to { opacity:1; transform:translate(0,0); }
}

@keyframes ms-guide-image-settle {
  0% { opacity:0; transform:translateY(-10px); }
  52% { opacity:1; transform:translateY(-6px); }
  100% { opacity:1; transform:translateY(0); }
}

@keyframes ms-guide-arrows-in {
  from { opacity:0; }
  to { opacity:1; }
}
