/* Product menu: four tinted cards, each with a sample UI that fades out at the bottom.
   Used inside the Product dropdown (#nav-menu-product). */

.pd-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

/* Card: a soft tint that deepens toward the bottom, over a faint grid */
.pd-card {
  --tint: #f5f3ff;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 27rem;
  overflow: hidden;
  border: 1px solid rgb(0 0 0 / 0.06);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--tint) 100%);
}
.pd-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgb(0 0 0 / 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(0 0 0 / 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}
.pd-card--violet { --tint: #f1edff; }
.pd-card--green  { --tint: #e9f8ef; }
.pd-card--amber  { --tint: #fff1e2; }
.pd-card--blue   { --tint: #e8f2ff; }

.pd-text {
  padding: 1.75rem 1.75rem 0;
}
.pd-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--icon, #8b5cf6);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25), 0 1px 2px rgb(0 0 0 / 0.12);
}
.pd-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pd-card--violet { --icon: #8b5cf6; }
.pd-card--green  { --icon: #22b45a; }
.pd-card--amber  { --icon: #f97316; }
.pd-card--blue   { --icon: #3b82f6; }

.pd-text h3 {
  margin-top: 1.25rem;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #171717;
}
.pd-text p {
  margin-top: 0.5rem;
  max-width: 30ch;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: #737373;
}

/* Sample UI, bleeding off the bottom edge */
.pd-preview {
  position: relative;
  margin-top: auto;
  padding: 1.5rem 1.25rem 0;
  height: 15.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  transition: transform 300ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pd-card:hover .pd-preview {
  transform: translateY(-6px);
}

.pd-agentlog {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  font-size: 0.8125rem;
  color: #404040;
}

.pd-main {
  display: grid;
  min-width: 0;
  margin-right: auto;
  line-height: 1.25;
}
.pd-main b {
  font-weight: 600;
  color: #171717;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-main small {
  font-size: 0.6875rem;
  color: #8a8a8a;
}

.pd-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--a);
  color: var(--b);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pd-chip {
  flex: none;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}
.pd-chip--green { background: #dcfce7; color: #15803d; }

.pd-chip--red   { background: #fee2e2; color: #b91c1c; }
.pd-chip--amber { background: #ffedd5; color: #c2410c; }

/* A/B test */

.pd-spark {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #22b45a, #86efac, #22b45a);
  box-shadow: inset 0 0 0 3px #ffffff, 0 0 0 1px #d4d4d4;
}

/* ASO */

.pd-delta {
  min-width: 2.75rem;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 600;
}
.pd-delta--up { color: #15803d; }

/* Apple Ads */
.pd-agentlog {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  color: #171717;
  font-weight: 500;
}
.pd-agentlog .pd-spark {
  background: conic-gradient(from 200deg, #3b82f6, #93c5fd, #3b82f6);
}

/* Narrow screens: one column */
@media (max-width: 820px) {
  .pd-grid {
    grid-template-columns: 1fr;
  }
  .pd-card {
    min-height: 0;
  }
  .pd-text {
    padding: 1.5rem 1.25rem 0;
  }
  .pd-preview {
    margin-top: 1.5rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .pd-preview {
    transition: none;
  }
  .pd-card:hover .pd-preview {
    transform: none;
  }
}

/* ---------- Inside the Product dropdown ----------
   A ruled panel like the rest of the site: four columns split by hairlines, white at rest. The only colour is each
   product's icon and a 2px rule that draws across the top on hover. Each sample UI is shown whole, in its own well. */
a.pd-card {
  color: inherit;
  text-decoration: none;
}
a.pd-card:focus-visible {
  outline: 2px solid #171717;
  outline-offset: -2px;
}

.pd-menu .pd-card {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  transition: background-color 250ms ease;
}
/* the product's rule: draws from the left on hover or focus (it replaces the card's old grid texture) */
.pd-menu .pd-card::before {
  inset: 0 0 auto 0;
  z-index: 1;
  height: 2px;
  background: var(--icon);
  background-image: none;
  -webkit-mask-image: none;
  mask-image: none;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms cubic-bezier(0.23, 1, 0.32, 1);
}
.pd-menu .pd-card:hover::before,
.pd-menu .pd-card:focus-visible::before {
  transform: scaleX(1);
}
.pd-menu .pd-card:hover,
.pd-menu .pd-card:focus-visible {
  background: linear-gradient(180deg, color-mix(in srgb, var(--icon) 5%, #ffffff), #ffffff 75%);
}

.pd-menu .pd-text {
  padding: 1.375rem 1.375rem 0;
}
.pd-menu .pd-icon {
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 0.4375rem;
}
.pd-menu .pd-icon svg {
  width: 0.9375rem;
  height: 0.9375rem;
}
.pd-menu .pd-text h3 {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.pd-menu .pd-text h3::after {
  content: "→";
  margin-left: auto;
  color: var(--icon);
  font-weight: 500;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 200ms ease, transform 300ms cubic-bezier(0.23, 1, 0.32, 1);
}
.pd-menu .pd-card:hover h3::after,
.pd-menu .pd-card:focus-visible h3::after {
  opacity: 1;
  transform: none;
}
.pd-menu .pd-text p {
  margin-top: 0.25rem;
  max-width: none;
  color: #6b6b6b;
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* "AI Agent" beside the title of the three products the agent works on, in the product's colour like the tour's pill */
.pd-agent {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  height: 1.375rem;
  padding: 0 0.5rem 0 0.4375rem;
  border: 1px solid color-mix(in srgb, var(--icon) 28%, transparent);
  border-radius: 99px;
  background: color-mix(in srgb, var(--icon) 10%, #ffffff);
  color: color-mix(in srgb, var(--icon) 78%, #000000);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}
.pd-agent svg {
  flex: none;
}

/* the sample UI: whole, in a well that fills the rest of the column */
.pd-menu .pd-preview {
  flex: 1;
  height: auto;
  margin: 1.125rem 1.375rem 1.375rem;
  padding: 0.625rem;
  overflow: visible;
  border: 1px solid #ececec;
  border-radius: 0.875rem;
  background: #fafafa;
  -webkit-mask-image: none;
  mask-image: none;
  transition: border-color 250ms ease, box-shadow 250ms ease;
}
.pd-menu .pd-card:hover .pd-preview,
.pd-menu .pd-card:focus-visible .pd-preview {
  transform: none;
  border-color: color-mix(in srgb, var(--icon) 28%, #ececec);
  box-shadow: 0 10px 24px -18px color-mix(in srgb, var(--icon) 60%, transparent);
}

/* the links along the foot of the panel */
.pd-more {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.75rem 1.375rem;
  border-top: 1px solid #ececec;
  background: #fafafa;
  font-size: 0.875rem;
}
.pd-more a {
  color: #525252;
  text-decoration: none;
  transition: color 150ms ease;
}
.pd-more a:hover {
  color: #171717;
}
.pd-more a:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 3px;
  border-radius: 4px;
}
.pd-more__all {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #171717 !important;
  font-weight: 600;
}
.pd-more__all svg {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform 250ms cubic-bezier(0.23, 1, 0.32, 1);
}
.pd-more__all:hover svg {
  transform: translateX(3px);
}
.pd-more__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

@media (min-width: 1025px) {
  /* Panel width for this menu only: four columns in one row, no padding between them */
  .nav-dropdown #nav-menu-product[data-astro-cid-q55oeftv] {
    width: min(calc(100vw - 3rem), 1240px);
  }
  #nav-menu-product .nav-menu-inner.pd-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0;
    gap: 0;
    overflow-y: auto;
  }
  .pd-menu .pd-card + .pd-card {
    border-left: 1px solid #ececec;
  }
  .pd-menu .pd-text p {
    min-height: 4.35em;
  }

}

/* Phones and tablets: the menu is a plain list, an icon, a name and a line, with no samples */
@media (max-width: 1024px) {
  .pd-menu .pd-preview {
    display: none;
  }
  .pd-menu {
    gap: 0;
  }
  .pd-menu .pd-card {
    border-top: 1px solid #ececec;
  }
  .pd-menu .pd-text {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.875rem;
    padding: 0.875rem 0.25rem;
  }
  .pd-menu .pd-icon {
    grid-row: span 2;
  }
  .pd-menu .pd-text h3 {
    margin-top: 0;
  }
  .pd-menu .pd-text h3::after {
    display: none;
  }
}

/* The four samples, each its own picture: a subscriber's story, two phones, an App Store result, a cost chart */

/* Subscriptions: one subscriber, from trial to renewal, and the problem the page catches */
.pd-sub {
  display: grid;
  gap: 0.625rem;
}
.pd-sub__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  padding: 0.5rem;
  border: 1px solid #ececec;
  border-radius: 0.625rem;
  background: #ffffff;
}
.pd-sub__head .pd-main {
  flex: 1;
  min-width: 0;
}
.pd-tl {
  position: relative;
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0.375rem 0.25rem 0.375rem 0.5rem;
  list-style: none;
}
.pd-tl::before {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: calc(0.5rem + 4px);
  width: 1px;
  background: #ddd6fe;
}
.pd-tl li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 0.5rem;
  padding-left: 1.125rem;
  font-size: 0.75rem;
  line-height: 1.3;
}
.pd-tl i {
  position: absolute;
  top: 0.2em;
  left: 0;
  width: 9px;
  height: 9px;
  border: 2px solid var(--icon);
  border-radius: 50%;
  background: #ffffff;
}
.pd-tl b {
  color: #262626;
  font-weight: 500;
}
.pd-tl small {
  color: #8a8a8a;
  font-size: 0.6875rem;
  text-align: right;
}
.pd-tl__next i {
  border-color: #c4b5fd;
  border-style: dashed;
}
.pd-tl__next b {
  color: #737373;
}
.pd-sub__alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px dashed #fecaca;
  border-radius: 0.625rem;
  background: #fff7f7;
}
.pd-sub__alert small {
  color: #737373;
  font-size: 0.6875rem;
  line-height: 1.25;
}

/* A/B tests: the result, a lift you can read at once and where A and B sit on the scale */
.pd-ab {
  display: grid;
  gap: 0.625rem;
}
.pd-ab__ask {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid #ececec;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #404040;
  font-size: 0.6875rem;
  white-space: nowrap;
}
.pd-ab__card {
  display: grid;
  gap: 0.25rem;
  padding: 0.625rem 0.75rem 0.75rem;
  border: 1px solid #ececec;
  border-radius: 0.75rem;
  background: #ffffff;
}
.pd-ab__card small {
  color: #8a8a8a;
  font-size: 0.625rem;
}
.pd-ab__lift {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
}
.pd-ab__lift b {
  color: var(--icon);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.pd-ab__lift span {
  color: #737373;
  font-size: 0.6875rem;
}
.pd-ab__plot {
  position: relative;
  height: 3.25rem;
  margin: 0.375rem 0.75rem 0;
}
.pd-ab__track,
.pd-ab__gap {
  position: absolute;
  top: 0.6875rem;
  height: 2px;
  border-radius: 2px;
}
.pd-ab__track {
  right: -0.75rem;
  left: -0.75rem;
  background: #e5e5e5;
}
.pd-ab__gap {
  height: 4px;
  top: 0.625rem;
  background: var(--icon);
}
.pd-ab__dot,
.pd-ab__val {
  position: absolute;
  transform: translateX(-50%);
}
.pd-ab__dot {
  display: grid;
  place-items: center;
  top: 0;
  width: 1.375rem;
  height: 1.375rem;
  border: 2px solid #a3a3a3;
  border-radius: 50%;
  background: #ffffff;
}
.pd-ab__dot em {
  color: #525252;
  font-size: 0.625rem;
  font-style: normal;
  font-weight: 700;
}
.pd-ab__dot--b {
  border-color: var(--icon);
  background: var(--icon);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--icon) 20%, transparent);
}
.pd-ab__dot--b em {
  color: #ffffff;
}
.pd-ab__val {
  top: 1.75rem;
  color: #525252;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pd-ab__val--b {
  color: #15803d;
}
.pd-ab__sure {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid #ececec;
  border-radius: 0.625rem;
  background: #ffffff;
  color: #737373;
  font-size: 0.6875rem;
}
.pd-ab__sure b {
  color: #171717;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.pd-ab__sure i {
  position: relative;
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 99px;
  background: #e5e5e5;
}
.pd-ab__sure u {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--icon);
}
.pd-ab__sure s {
  position: absolute;
  top: -2px;
  left: 95%;
  width: 1px;
  height: 9px;
  background: #171717;
}

/* ASO: what a person searching for you sees in the App Store, and the change proposed to it */
.pd-as {
  display: grid;
  gap: 0.5rem;
}
.pd-as__search {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.75rem;
  padding: 0 0.625rem;
  border-radius: 0.5rem;
  background: #ececee;
  color: #404040;
  font-size: 0.75rem;
}
.pd-as__search svg {
  width: 0.8rem;
  height: 0.8rem;
  color: #8a8a8a;
}
.pd-as__app {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #ececec;
  border-radius: 0.75rem;
  background: #ffffff;
}
.pd-as__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.6rem;
  background: linear-gradient(160deg, #fb923c, #ea580c);
}
.pd-as__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.pd-as__meta {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.pd-as__meta b {
  color: #171717;
  font-size: 0.75rem;
}
.pd-as__meta small {
  overflow: hidden;
  color: #737373;
  font-size: 0.625rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pd-as__stars {
  color: #f59e0b;
  font-size: 0.5625rem;
  letter-spacing: 0.5px;
}
.pd-as__stars i {
  margin-left: 0.2rem;
  color: #8a8a8a;
  font-style: normal;
}
.pd-as__get {
  flex: none;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: #eef0f4;
  color: #2563eb;
  font-size: 0.6875rem;
  font-weight: 700;
}
.pd-as__rank {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #737373;
  font-size: 0.6875rem;
}
.pd-as__rank b {
  color: #171717;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.pd-as__suggest {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.125rem 0.5rem;
  padding: 0.5rem;
  border: 1px dashed #fdba74;
  border-radius: 0.625rem;
  background: #fffaf5;
}
.pd-as__suggest small {
  grid-column: 1 / -1;
  color: #9a3412;
  font-size: 0.625rem;
}
.pd-as__suggest b {
  color: #171717;
  font-size: 0.6875rem;
  line-height: 1.25;
}

/* Apple Ads: cost per install against the limit, and the moment the agent paused what crossed it */
.pd-ads {
  display: grid;
  gap: 0.5rem;
}
.pd-ads__chart {
  padding: 0.5rem 0.5rem 0.375rem;
  border: 1px solid #ececec;
  border-radius: 0.625rem;
  background: #ffffff;
}
.pd-ads__cap {
  display: block;
  margin-bottom: 0.25rem;
  color: #8a8a8a;
  font-size: 0.625rem;
}
.pd-ads__plot {
  position: relative;
}
.pd-ads__plot svg {
  display: block;
  width: 100%;
  height: 4.5rem;
}
.pd-ads__limit,
.pd-ads__paused {
  position: absolute;
  font-size: 0.5625rem;
  line-height: 1;
}
.pd-ads__limit {
  top: calc(34 / 84 * 100% - 0.875rem);
  left: 0;
  color: #8a8a8a;
}
.pd-ads__paused {
  top: 0;
  left: calc(122 / 200 * 100% + 4px);
  padding: 2px 5px;
  border-radius: 99px;
  background: #171717;
  color: #ffffff;
}
.pd-ads__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.pd-ads__stats span {
  display: grid;
  padding: 0.375rem 0.5rem;
  border: 1px solid #ececec;
  border-radius: 0.5rem;
  background: #ffffff;
  line-height: 1.2;
}
.pd-ads__stats b {
  color: #171717;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.pd-ads__stats small {
  color: #8a8a8a;
  font-size: 0.625rem;
}

@media (prefers-reduced-motion: reduce) {
  .pd-menu .pd-card,
  .pd-menu .pd-card::before,
  .pd-menu .pd-text h3::after,
  .pd-menu .pd-preview,
  .pd-more__all svg {
    transition: none;
  }
}
