/* Hero stage. State comes from [data-device], [data-step] and [data-motion] on .stage. */

.stage {
  --scale: 1;
  --sans-dev: -apple-system, "Instrument Sans", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  min-height: 780px;
  padding: 32px 24px;
  border-radius: var(--radius-stage);
  background: var(--stage);
}

/* ---------- Device picker ---------- */
.stage-control {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 24px;
  background: var(--sand);
}

.stage-control[hidden] {
  display: none;
}

.stage-control button {
  padding: 8px 18px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.stage-control button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Layout: timeline (iPad, Mac), side list (iPhone), compact (small screens) ---------- */
.stage-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.stage-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.stage-steps li {
  counter-increment: step;
  transition: opacity 0.4s;
}

.stage-steps h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
}

.stage-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-wrap: pretty;
}

.t-pointer {
  display: none;
}

.stage[data-device="mac"] .t-touch {
  display: none;
}

.stage[data-device="mac"] .t-pointer {
  display: inline;
}

.stage-dots {
  display: none;
}

.step-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar {
  display: block;
  height: 3px;
  margin-bottom: 8px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.num {
  display: none;
}

/* Timeline above the device (iPad, Mac) */
.stage:not([data-device="iphone"]) .stage-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.stage[data-device="ipad"] .stage-steps {
  width: calc(780px * var(--scale));
}

.stage[data-device="mac"] .stage-steps {
  width: calc(920px * var(--scale));
}

.stage:not([data-device="iphone"]) .stage-steps h3::before {
  content: counter(step) ". ";
}

/* Side list (iPhone on wide screens) */
.stage[data-device="iphone"] .stage-body {
  flex-direction: row;
  gap: 56px;
}

.stage[data-device="iphone"] .stage-steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 260px;
}

.stage[data-device="iphone"] .stage-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
}

.stage[data-device="iphone"] .bar {
  display: none;
}

.stage[data-device="iphone"] .num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
}

.stage[data-device="iphone"] .step-copy {
  gap: 4px;
  padding-top: 6px;
}

.stage[data-device="iphone"] .stage-steps h3 {
  font-size: 19px;
}

.stage[data-device="iphone"] .stage-steps p {
  font-size: 15px;
}

/* Active step: the others fade (only while the loop runs) */
.stage[data-motion="play"] .stage-steps li {
  opacity: 0.4;
}

.stage[data-motion="play"][data-step="0"] li:nth-child(1),
.stage[data-motion="play"][data-step="1"] li:nth-child(2),
.stage[data-motion="play"][data-step="2"] li:nth-child(3),
.stage[data-motion="play"][data-step="3"] li:nth-child(4) {
  opacity: 1;
}

.stage[data-motion="static"] .bar,
.stage[data-motion="seek"] .bar {
  display: none;
}

.stage[data-motion="play"] li[data-step-go],
.stage[data-motion="play"] .stage-dots button {
  cursor: pointer;
}

.stage-disclaimer {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  text-wrap: balance;
}

.stage-device {
  display: flex;
  justify-content: center;
}

.dev-scale {
  zoom: var(--scale);
}

.dev {
  display: none;
}

.stage[data-device="iphone"] .dev-iphone,
.stage[data-device="ipad"] .dev-ipad,
.stage[data-device="mac"] .dev-mac {
  display: block;
}

/* Compact: phone visit. Device alone, caption and dots below. */
@media (max-width: 600px) {
  .stage {
    min-height: 0;
    padding: 24px 12px;
    gap: 20px;
  }

  .stage[data-device="ipad"] {
    --scale: 0.44;
  }

  .stage[data-device="mac"] {
    --scale: 0.37;
  }

  .stage-body,
  .stage[data-device="iphone"] .stage-body {
    flex-direction: column;
    gap: 20px;
  }

  .stage-device {
    order: 0;
  }

  .stage-steps,
  .stage[data-device="iphone"] .stage-steps,
  .stage[data-device="ipad"] .stage-steps,
  .stage[data-device="mac"] .stage-steps {
    order: 1;
    display: block;
    width: auto;
    max-width: 320px;
    text-align: center;
  }

  .stage-steps li,
  .stage[data-device="iphone"] .stage-steps li {
    display: block;
  }

  .stage[data-motion="play"] .stage-steps li {
    display: none;
    opacity: 1;
  }

  .stage[data-motion="play"][data-step="0"] li:nth-child(1),
  .stage[data-motion="play"][data-step="1"] li:nth-child(2),
  .stage[data-motion="play"][data-step="2"] li:nth-child(3),
  .stage[data-motion="play"][data-step="3"] li:nth-child(4) {
    display: block;
  }

  .stage-steps li + li {
    margin-top: 16px;
  }

  .stage[data-motion="play"] .stage-steps li + li {
    margin-top: 0;
  }

  .stage .bar,
  .stage[data-device="iphone"] .num {
    display: none;
  }

  .stage-steps h3,
  .stage[data-device="iphone"] .stage-steps h3 {
    font-size: 18px;
  }

  .stage-steps h3::before,
  .stage[data-device="iphone"] .stage-steps h3::before {
    content: counter(step) ". ";
  }

  .stage-steps p,
  .stage[data-device="iphone"] .stage-steps p {
    min-height: 44px;
    font-size: 15px;
  }

  .stage[data-device="iphone"] .step-copy {
    padding-top: 0;
    gap: 12px;
  }

  .stage[data-motion="play"] .stage-dots {
    order: 2;
    display: flex;
    gap: 8px;
  }

  .stage-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: color-mix(in srgb, var(--ink) 22%, transparent);
    transition: width 0.3s, background 0.3s;
  }

  .stage[data-step="0"] .stage-dots button:nth-child(1),
  .stage[data-step="1"] .stage-dots button:nth-child(2),
  .stage[data-step="2"] .stage-dots button:nth-child(3),
  .stage[data-step="3"] .stage-dots button:nth-child(4) {
    width: 22px;
    background: var(--accent);
  }
}

/* ---------- Device internals (always light, like the real thing) ---------- */
.dev {
  --dev-ink: #111;
  --dev-blue: #007aff;
  font-family: var(--sans-dev);
  color: var(--dev-ink);
  text-align: start;
}

.dev * {
  box-sizing: border-box;
}

.battery {
  display: inline-block;
  width: 22px;
  height: 11px;
  border: 1.5px solid #111;
  border-radius: 3px;
}

.shop-photo {
  display: block;
  border-radius: 10px;
  background: #f2eee8;
  overflow: hidden;
}

.shop-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-badge {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 5px;
  background: #d93a2b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.shop-title {
  color: #111;
  font-weight: 600;
}

.shop-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.shop-price b {
  color: #111;
  font-weight: 700;
}

.shop-price s {
  color: #999;
}

.shop-price span {
  color: #666;
  font-size: 0.5em;
}

.shop-urgent {
  color: #d93a2b;
  font-weight: 600;
}

.shop-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f08a24;
  color: #fff;
  font-weight: 600;
}

.dim {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}

.share-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 122, 255, 0.16);
  opacity: 0;
  transition: opacity 0.4s;
}

.ico-share {
  position: relative;
}

.share-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-head b {
  display: block;
  color: #111;
  font-size: 14px;
  font-weight: 600;
}

.share-head small {
  display: block;
  color: #888;
  font-size: 12px;
}

.share-thumb {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #e0d9ce;
}

.share-rule {
  height: 1px;
  background: #dedbd5;
}

.apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.app-icon {
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 13px;
}

.app-label {
  color: #333;
  font-size: 11px;
}

.app-us .app-label {
  color: #111;
  font-weight: 600;
}

.app-messages {
  background: #34c759;
}

.app-mail {
  background: #1e88f5;
}

.app-notes {
  background: #ffd43b;
}

.app-li {
  box-shadow: 0 0 0 3px #f2f1ee, 0 0 0 5px transparent;
  transition: box-shadow 0.35s;
}

/* ---------- Link Insights panel ---------- */
.res {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fbf8f2;
  color: #231d18;
}

.res-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid #ece4d7;
}

.res-name {
  font-size: 15px;
  font-weight: 600;
  color: #231d18;
}

.res-x {
  color: #6e6258;
  font-size: 18px;
}

.res-done {
  padding: 4px 10px;
  border: 1px solid #dcd2c3;
  border-radius: 6px;
  color: #6e6258;
  font-size: 12px;
}

.res-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.res-headline {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  color: #231d18;
}

.res-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8a7e72;
  font-size: 11px;
}

.res-chip {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f1e4d6;
  color: #b4532a;
  font-size: 10px;
  font-weight: 700;
}

.res-domain {
  color: #b4532a;
  text-decoration: underline;
}

.tag-full {
  display: none;
}

.res-prompt {
  position: relative;
  height: 40px;
}

.pill {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.4s;
}

.pill span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-sum {
  background: #f3e3d3;
  color: #9c4522;
}

.pill-risk {
  background: #b4532a;
  color: #fff;
  opacity: 0;
}

.res-text {
  position: relative;
  height: 250px;
  color: #2e2620;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.5;
}

.res-sum,
.res-risk {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.4s;
}

.res-risk {
  opacity: 0;
}

.res-note {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1e9dd;
  color: #6e6258;
  font-family: var(--sans);
  font-size: 12px;
}

.risk-badge {
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 6px;
  background: #c23a22;
  color: #fff;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.risk-badge--neutral {
  background: #2e2620;
}

.line-box {
  position: relative;
  padding-left: 22px;
}

.line-box::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.3em;
  width: 11px;
  height: 11px;
  border: 1.6px solid #9c4522;
  border-radius: 3px;
}

/* A news or blog page instead of a shop page (clips for the non-trust questions) */
.ph-page--article {
  gap: 8px;
}

.ph-page--article .shop-photo {
  height: 118px;
}

.art-kicker {
  color: #9c4522;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.art-title {
  color: #111;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
}

.art-byline {
  color: #777;
  font-size: 11px;
}

.art-lede {
  color: #333;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.4;
}

.art-bars {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.art-bars span {
  height: 7px;
  border-radius: 4px;
  background: #e7e4df;
}

.art-bars span:nth-child(2) {
  width: 92%;
}

.art-bars span:nth-child(3) {
  width: 64%;
}

.res--pad .res-bar,
.res--mac .res-bar {
  height: 46px;
  padding: 0 18px;
}

.res--pad .res-body,
.res--mac .res-body {
  padding: 18px 22px;
}

.res--pad .res-headline,
.res--mac .res-headline {
  font-size: 22px;
}

.res--pad .res-meta,
.res--mac .res-meta {
  font-size: 12px;
}

.res--pad .res-text,
.res--mac .res-text {
  height: 220px;
  font-size: 15px;
}

.res--mac .res-bar {
  height: 44px;
}

.res--mac .res-name {
  font-size: 14px;
}

.res--mac .res-prompt {
  height: 38px;
}

/* ---------- iPhone ---------- */
.dev-iphone .ph-bezel {
  width: 300px;
  height: 620px;
  padding: 10px;
  border-radius: 46px;
  background: #1b1714;
  box-shadow: 0 40px 80px -30px rgba(60, 35, 20, 0.45);
}

.ph-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  background: #fff;
  overflow: hidden;
}

.ph-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 26px;
  font-size: 13px;
  font-weight: 600;
}

.ph-url {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  margin: 0 12px;
  border-radius: 10px;
  background: #efede9;
  color: #333;
  font-size: 13px;
}

.ph-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
}

.ph-page .shop-photo {
  height: 170px;
}

.ph-page .shop-title {
  font-size: 19px;
}

.ph-page .shop-price b {
  font-size: 26px;
}

.ph-page .shop-price s {
  font-size: 15px;
}

.ph-page .shop-urgent {
  font-size: 12px;
}

.ph-page .shop-buy {
  height: 42px;
  font-size: 15px;
}

.ph-toolbar {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 62px;
  border-top: 1px solid #e8e6e2;
  background: #faf9f7;
  color: var(--dev-blue);
  font-size: 20px;
}

.ph-toolbar .share-btn {
  width: 34px;
  height: 34px;
}

.ph-share {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 290px;
  padding: 18px 16px;
  border-radius: 18px 18px 0 0;
  background: #f2f1ee;
  transform: translateY(110%);
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.share-copy {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border-radius: 11px;
  background: #fff;
  font-size: 14px;
}

.ph-sheet {
  position: absolute;
  inset: 52px 0 0;
  border-radius: 18px 18px 0 0;
  background: #fbf8f2;
  overflow: hidden;
  transform: translateY(105%);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- iPad ---------- */
.dev-ipad .pad-bezel {
  width: 780px;
  height: 560px;
  padding: 12px;
  border-radius: 32px;
  background: #1b1714;
  box-shadow: 0 40px 80px -30px rgba(60, 35, 20, 0.45);
}

.pad-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 21px;
  background: #fff;
  overflow: hidden;
}

.pad-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 600;
}

.pad-status .battery {
  width: 20px;
  height: 10px;
}

.pad-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 16px;
  color: var(--dev-blue);
  font-size: 18px;
}

.pad-url-wrap {
  display: flex;
  flex: 1;
  justify-content: center;
}

.pad-url {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 32px;
  border-radius: 9px;
  background: #efede9;
  color: #333;
  font-size: 13px;
}

.pad-toolbar .share-btn {
  width: 32px;
  height: 32px;
}

.pad-shopbar {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 28px;
  border-block: 1px solid #eee;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.pad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 24px 28px;
}

.pad-grid .shop-photo {
  height: 340px;
  border-radius: 12px;
}

.pad-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.pad-detail .shop-badge {
  font-size: 12px;
  padding: 4px 9px;
}

.pad-detail .shop-title {
  font-size: 26px;
}

.pad-detail .shop-price b {
  font-size: 34px;
}

.pad-detail .shop-price s {
  font-size: 17px;
}

.pad-detail .shop-urgent {
  font-size: 13px;
}

.pad-detail .shop-buy {
  height: 46px;
  margin-top: 6px;
  font-size: 16px;
}

.pad-pop {
  position: absolute;
  top: 64px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 330px;
  padding: 16px;
  border-radius: 14px;
  background: #f2f1ee;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: scale(0.94);
  transform-origin: top right;
  transition: opacity 0.35s, transform 0.35s;
}

.pad-pop .apps {
  gap: 4px;
}

.pad-pop .app-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
}

.pad-pop .app-label {
  font-size: 10px;
}

.pad-pop .share-head b {
  font-size: 13px;
}

.pad-pop .share-head small {
  font-size: 11px;
}

.pad-pop .share-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.pad-modal {
  position: absolute;
  top: 50px;
  bottom: 24px;
  left: 50%;
  width: 470px;
  margin-left: -235px;
  border-radius: 16px;
  background: #fbf8f2;
  box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.45s, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Mac ---------- */
.dev-mac {
  position: relative;
  width: 920px;
  height: 580px;
  border: 1px solid #d9d0c3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 40px 90px -30px rgba(60, 35, 20, 0.45);
  overflow: hidden;
}

.mac-title {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid #e2ded7;
  background: #f4f2ee;
  color: #6b6b6b;
}

.mac-dots {
  display: flex;
  gap: 8px;
}

.mac-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d6d1c9;
}

.mac-nav {
  font-size: 16px;
}

.mac-url-wrap {
  display: flex;
  flex: 1;
  justify-content: center;
}

.mac-url {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 380px;
  height: 30px;
  border-radius: 8px;
  background: #e6e3dd;
  color: #333;
  font-size: 13px;
}

.mac-title .share-btn {
  width: 30px;
  height: 30px;
  color: #555;
}

.mac-title .share-ring {
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.09);
}

.mac-plus {
  font-size: 18px;
}

.mac-shopbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 40px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.mac-shopbar b {
  letter-spacing: 0.14em;
}

.mac-shopbar span {
  color: #777;
}

.mac-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  padding: 32px 40px;
}

.mac-grid .shop-photo {
  height: 360px;
  border-radius: 12px;
}

.mac-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 12px;
}

.mac-detail .shop-badge {
  font-size: 12px;
  padding: 4px 9px;
}

.mac-detail .shop-title {
  font-size: 30px;
}

.mac-detail .shop-price b {
  font-size: 38px;
}

.mac-detail .shop-price s {
  font-size: 18px;
}

.mac-detail .shop-urgent {
  font-size: 14px;
}

.mac-detail .shop-buy {
  width: 220px;
  height: 46px;
  margin-top: 6px;
  font-size: 16px;
}

.dim-mac {
  top: 52px;
}

.mac-menu {
  position: absolute;
  top: 46px;
  right: 44px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 230px;
  padding: 6px;
  border: 1px solid #dcd7cf;
  border-radius: 10px;
  background: #fbfaf8;
  box-shadow: 0 18px 40px -8px rgba(0, 0, 0, 0.28);
  color: #222;
  font-size: 13px;
  opacity: 0;
  transform: scale(0.94);
  transform-origin: top right;
  transition: opacity 0.3s, transform 0.3s;
}

.mac-row {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
}

.mac-row-muted {
  color: #777;
}

.mi {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.mi-mail {
  background: #1e88f5;
}

.mi-msg {
  background: #34c759;
}

.mi-notes {
  background: #ffd43b;
}

.mac-sep {
  height: 1px;
  margin: 4px 6px;
  background: #e6e1d9;
}

.mac-sheet {
  position: absolute;
  top: 52px;
  left: 50%;
  width: 500px;
  height: 470px;
  margin-left: -250px;
  border: 1px solid #dcd2c3;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: #fbf8f2;
  box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.4s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Step states (the only place the animation is defined) ---------- */

/* 0 · share: ring around the share button */
.stage[data-step="0"] .share-ring {
  opacity: 1;
}

/* 1 · pick Link Insights */
.stage[data-step="1"] .dev-iphone .dim {
  opacity: 0.25;
}

.stage[data-step="1"] .ph-share {
  transform: translateY(0);
}

.stage[data-step="1"] .app-li {
  box-shadow: 0 0 0 3px #f2f1ee, 0 0 0 5px var(--accent);
}

.stage[data-step="1"] .dev-ipad .dim {
  opacity: 0.25;
}

.stage[data-step="1"] .pad-pop,
.stage[data-step="1"] .mac-menu {
  opacity: 1;
  transform: scale(1);
}

.stage[data-step="1"] .mac-row-us {
  background: var(--accent);
  color: #fff;
  transition-delay: 0.81s;
}

/* 2 and 3 · the panel is open */
.stage:is([data-step="2"], [data-step="3"]) .dev-iphone .dim {
  opacity: 0.42;
}

.stage:is([data-step="2"], [data-step="3"]) .dev-ipad .dim {
  opacity: 0.42;
}

.stage:is([data-step="2"], [data-step="3"]) .dev-mac .dim {
  opacity: 0.25;
}

.stage:is([data-step="2"], [data-step="3"]) .ph-sheet {
  transform: translateY(0);
}

.stage:is([data-step="2"], [data-step="3"]) .pad-modal,
.stage:is([data-step="2"], [data-step="3"]) .mac-sheet {
  opacity: 1;
  transform: translateY(0);
}

/* 3 · the sharper question */
.stage[data-step="3"] .pill-sum,
.stage[data-step="3"] .res-sum {
  opacity: 0;
}

.stage[data-step="3"] .pill-risk,
.stage[data-step="3"] .res-risk {
  opacity: 1;
}

.stage[data-step="3"] .tag-quick {
  display: none;
}

.stage[data-step="3"] .tag-full {
  display: inline;
}

/* Frame-exact rendering (clips, OG images): no transitions while a frame is prepared */
.stage.no-transition,
.stage.no-transition * {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .stage .dim,
  .stage .ph-share,
  .stage .ph-sheet,
  .stage .pad-pop,
  .stage .pad-modal,
  .stage .mac-menu,
  .stage .mac-sheet,
  .stage .pill,
  .stage .res-sum,
  .stage .res-risk {
    transition: none;
  }
}
