/* Platform page (/platform, the v4 design): what differs from
   platform.css and platform-v2.css. One shape for every step, quieter
   cards, step links inside the diagram, a left rail with a progress line. */

/* one accent through the features section */
.pf4 .pf-ph--creation,
.pf4 .pf-ph--assembly,
.pf4 .pf-ph--activation { --ph: var(--kit-teal-medium); --ph-tint: var(--kit-teal-highlight); }

/* ---------- Diagram: each band links to its steps ---------- */
.pf4 .pd-zone--main .pd-zone-head { flex-direction: column; gap: 6px; }
.pf4-pd-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pf4-pd-steps a {
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--kit-teal-shade);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--pf-line);
  background: var(--kit-white);
  transition: box-shadow .15s ease, background .15s ease;
}
.pf4-pd-steps a:hover { background: var(--kit-teal-highlight); box-shadow: inset 0 0 0 1px var(--kit-teal-medium); }
.pf4-pd-steps a:focus-visible { outline: 2px solid var(--kit-teal-medium); outline-offset: 2px; }

/* ---------- Features ----------
   Phones: a sticky three-phase nav, then in-flow phase and step headings.
   From 600: a sticky left rail (phases and steps beside a progress line)
   carries the names, so the in-flow headings are visually hidden. */
.pf4-feat { --g: 20px; --cols: 1; --past: rgba(32, 31, 29, .42); }
.pf4-num {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--type-label-s);
  line-height: 16px;
  letter-spacing: .04em;
  color: var(--kit-teal-medium);
}

/* phones: where you are among the three phases */
.pf4-pnav {
  position: sticky;
  top: var(--fnav-top);
  z-index: 5;
  background: var(--kit-ivory-tint);
  box-shadow: 0 0 0 100vmax var(--kit-ivory-tint), 0 1px 0 100vmax var(--kit-ivory-medium);
  clip-path: inset(0 -100vmax -1px);
}
.pf4-pnav ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.pf4-pnav a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0 12px;
  font-size: var(--type-small);
  line-height: 20px;
  font-weight: var(--type-subhead-weight);
  color: var(--pf-ink);
  text-decoration: none;
}
.pf4-pnav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--kit-ivory-medium);
}
.pf4-pnav a.is-past, .pf4-pnav a.is-past .pf4-num { color: var(--past); }
.pf4-pnav a.is-past::after { background: color-mix(in srgb, var(--kit-teal-medium) 40%, transparent); }
.pf4-pnav a[aria-current] { color: var(--kit-teal-shade); }
.pf4-pnav a[aria-current]::after { background: var(--kit-teal-medium); }
.pf4-pnav a:focus-visible, .pf4-toc a:focus-visible { outline: 2px solid var(--kit-teal-medium); outline-offset: 2px; border-radius: 4px; }

.pf4-toc { display: none; }
@media (max-width: 599.98px) { .pf4-feat.l-section { padding-top: 0; } }

/* a phase: its heading and lead, then its steps */
.pf4-phase { padding-top: 48px; scroll-margin-top: calc(var(--fnav-top) + 60px); }
.pf4-phase + .pf4-phase { margin-top: 48px; }
.pf4-phase-head { display: grid; gap: 12px; padding-bottom: 28px; }
.pf4-phase-title { display: flex; align-items: center; gap: 16px; }
/* number and name on one line, the number at the name's size in Regular,
   as in the rail */
.pf4-phase-title > div { display: flex; align-items: baseline; gap: calc(var(--type-h3) * .3); }
.pf4-phase-title .pf4-num {
  font-size: var(--type-h3);
  line-height: var(--type-h3-lh);
  letter-spacing: var(--type-h3-ls);
  font-weight: 400;
}
.pf4-phase-line {
  margin: 0;
  max-width: 36em;
  font-size: var(--type-body);
  line-height: var(--type-body-lh);
  color: var(--pf-muted);
}

/* a step: its cards, then its other features. Steps are set apart by
   space alone */
.pf4-step {
  display: grid;
  gap: 20px;
  padding: 0 0 56px;
  container-type: inline-size;
  scroll-margin-top: calc(var(--fnav-top) + 60px);
}
.pf4-step-name { margin: 0; color: var(--pf-ink); }
/* two sizes only, on one grid of half-height rows: a full card spans two
   rows, a half card one. A full card's height follows from the column
   width (padding, three lines of text, the 320 x 200 scene, the foot); a
   row is half of that less the gap. Half cards flow into whatever is free
   (dense), so they first stack beside the last full cards and then run in
   rows across, with no half card left alone under a stack */
.pf4-cards {
  --colw: calc((min(100cqw, var(--maxw, 100cqw)) - (var(--cols) - 1) * var(--g)) / var(--cols));
  --copy-h: calc(3 * var(--type-small) * var(--type-body-lh));
  --card-h: calc(48px + var(--copy-h) + 20px + (var(--colw) - 40px) * .625 + 20px + 24px);
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: calc((var(--card-h) - var(--g)) / 2);
  grid-auto-flow: row dense;
  gap: var(--g);
  max-width: var(--maxw, none);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pf4-cards > li { display: flex; min-width: 0; container-type: inline-size; }
.pf4-cards > .pf4-full { grid-row: span 2; }
.pf4-cards .pf4-card { flex: 1; }
.pf4-cards .pf4-card .pf-fcard-copy { min-height: var(--copy-h); }

/* the step's other features: half cards (a small picture on 60% of the
   tile, the name on 40%). Each opens its full card */
.pf4-mini {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  padding: 12px;
  border: 0;
  border-radius: 16px;
  background: var(--kit-white);
  box-shadow: 0 0 0 1px var(--kit-ivory-medium);
  font: inherit;
  color: var(--pf-ink);
  text-align: left;
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}
.pf4-mini-art { display: grid; place-items: center; align-self: stretch; min-height: 0; border-radius: 10px; background: var(--kit-ivory-tint); overflow: hidden; }
.pf4-mini-art .fa { display: block; width: 100%; height: 100%; }
.pf4-mini-name { overflow-wrap: break-word; font-size: var(--type-small); line-height: 20px; font-weight: var(--type-subhead-weight); }
/* in a narrow cell the name steps down a size so its longest word fits */
@container (max-width: 320px) { .pf4-mini-name { font-size: var(--type-caption); line-height: 18px; } }
.pf4-mini-go { position: absolute; right: 12px; bottom: 12px; width: 16px; height: 16px; color: var(--kit-teal-medium); transition: transform .15s ease; }
.pf4-mini:hover { box-shadow: 0 0 0 1.5px var(--kit-teal-medium); transform: translateY(-2px); }
.pf4-mini:hover .pf4-mini-go { transform: translateX(3px); }
.pf4-mini:focus-visible { outline: 2px solid var(--kit-teal-medium); outline-offset: 2px; }

/* ---- from tablet: the rail ---- */
@media (min-width: 600px) {
  .pf4-feat { --g: 24px; --rail: 168px; }
  .pf4-pnav { display: none; }
  .pf4-flow { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); column-gap: 32px; }
  .pf4-toc { display: block; }
  .pf4-toc-in { position: sticky; top: calc(var(--fnav-top) + 40px); }
  .pf4-toc ol { margin: 0; padding: 0; list-style: none; }
  .pf4-toc a { text-decoration: none; color: var(--pf-ink); transition: color .2s ease; }
  /* a phase: its icon on the line, its number and name, set larger than
     the steps under it */
  .pf4-toc-phase + .pf4-toc-phase { margin-top: 40px; }
  .pf4-toc-phase > a { display: flex; align-items: center; gap: 14px; }
  .pf4-toc-ico {
    position: relative;
    z-index: 1;
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--kit-white);
    box-shadow: 0 0 0 1px var(--kit-ivory-medium);
    transition: box-shadow .2s ease, transform .25s cubic-bezier(.3, 1.4, .5, 1);
  }
  .pf4-toc-ico .icon { width: 23px; height: 23px; transition: opacity .2s ease; }
  .pf4-toc-name .pf4-num { font-size: inherit; line-height: inherit; font-weight: 400; letter-spacing: inherit; }
  /* number and name on one line, the number at the name's size, the pair
     centred on the icon box */
  .pf4-toc-name {
    display: flex;
    align-items: baseline;
    gap: .3em;
    font-size: var(--type-h4);
    line-height: var(--type-h4-lh);
    font-weight: var(--type-heading-weight);
    letter-spacing: var(--type-h4-ls);
  }
  .pf4-toc-phase > a:hover .pf4-toc-ico { transform: scale(1.06); }
  .pf4-toc-phase > a[aria-current] { color: var(--kit-teal-shade); }
  .pf4-toc-phase > a[aria-current] .pf4-toc-ico { box-shadow: 0 0 0 2px var(--kit-teal-medium), 0 6px 14px rgba(13, 40, 40, .12); transform: scale(1.08); }
  .pf4-toc-phase > a.is-past, .pf4-toc-phase > a.is-past .pf4-num { color: var(--past); }
  /* a passed icon fades inside its tile; the tile stays solid over the line */
  .pf4-toc-phase > a.is-past .pf4-toc-ico .icon { opacity: .45; }
  /* its steps: smaller, quieter, indented past the icon; listed for the
     current phase only, folding open and shut */
  .pf4-toc-steps { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s ease; }
  .pf4-toc.is-snap .pf4-toc-steps, .pf4-toc.is-snap .pf4-toc-steps > div { transition: none; }
  .pf4-toc.is-live .pf4-toc-phase:not(.is-open) .pf4-toc-steps { grid-template-rows: 0fr; }
  .pf4-toc-steps > div { min-height: 0; overflow: hidden; padding-left: 50px; }
  /* the phase's one-line lead, under its name while it is current */
  .pf4-toc-lead { margin: 0; padding-top: 2px; font-size: var(--type-caption); line-height: 18px; color: var(--pf-muted); }
  .pf4-toc.is-live .pf4-toc-phase:not(.is-open) .pf4-toc-steps > div { visibility: hidden; transition: visibility 0s .3s; }
  .pf4-toc-steps a { display: block; padding: 8px 0; font-size: var(--type-small); line-height: 20px; color: var(--pf-muted); }
  .pf4-toc-steps li:first-child a { padding-top: 16px; }
  .pf4-toc-steps a:hover { color: var(--kit-teal-shade); }
  .pf4-toc-steps a.is-past { color: var(--past); }
  .pf4-toc-steps a[aria-current] { color: var(--kit-teal-shade); font-weight: var(--type-subhead-weight); }
  /* the progress line runs behind the icons, filled from the top; a dot
     rides its end */
  .pf4-toc-line { position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; border-radius: 2px; background: var(--kit-ivory-medium); overflow: hidden; }
  .pf4-toc-line span { display: block; height: var(--fill, 0px); background: var(--kit-teal-medium); transition: height .35s cubic-bezier(.33, 0, .67, 1); }
  .pf4-toc-dot {
    position: absolute;
    z-index: 2;
    left: 14px;
    top: var(--at, 0px);
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-radius: 50%;
    background: var(--kit-citron-highlight);
    box-shadow: 0 0 0 2px var(--kit-teal-medium);
    opacity: 0;
    transition: opacity .2s ease, top .35s cubic-bezier(.33, 0, .67, 1); /* easy ease */
  }
  .pf4-toc-dot.is-on { opacity: 1; }

  /* the rail carries each phase's name and lead and each step's name;
     their in-flow headings stay for screen readers only */
  .pf4-phase-head, .pf4-step-name {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .pf4-phase { padding-top: 0; scroll-margin-top: calc(var(--fnav-top) + 40px); }
  .pf4-phase + .pf4-phase { margin-top: 56px; }
  .pf4-step { padding: 0 0 64px; scroll-margin-top: calc(var(--fnav-top) + 40px); }
  .pf4-phase:last-of-type .pf4-step:last-of-type { padding-bottom: 0; }
  .pf4-feat { --maxw: 420px; }
}
@media (min-width: 900px) {
  .pf4-feat { --cols: 2; --maxw: initial; }
}
@media (min-width: 1024px) {
  .pf4-feat { --g: 28px; --rail: 200px; }
  .pf4-flow { column-gap: 48px; }
}
/* three across for every step */
@media (min-width: 1280px) {
  .pf4-feat { --cols: 3; --g: 24px; }
  /* one full card on the last row leaves two columns free: the first two
     half cards stack in the second, the next two in the third (left to
     auto-placement they would sit side by side) */
  .pf4-cards[data-rem3="1"] > .pf4-half:is([data-i="0"], [data-i="1"]) { grid-column: 2; }
  .pf4-cards[data-rem3="1"] > .pf4-half:is([data-i="2"], [data-i="3"]) { grid-column: 3; }
}
@media (min-width: 1440px) {
  .pf4-feat { --rail: 220px; }
  .pf4-flow { column-gap: 64px; }
}
@media (prefers-reduced-motion: reduce) { .pf4-mini, .pf4-mini-go, .pf4-pd-steps a, .pf4-toc a, .pf4-toc-ico, .pf4-toc-steps, .pf4-toc-line span, .pf4-toc-dot { transition: none; } }

/* ---------- Cards: one-line foot, no shadow stack ---------- */
.pf4 .pf4-card { box-shadow: 0 0 0 1px var(--kit-ivory-medium); }
.pf4 .pf2-dialog .pf4-card { box-shadow: 0 24px 60px rgba(13, 40, 40, .25); }
/* an opened card has room to breathe: wider, roomier, larger text */
.pf4 .pf2-dialog { width: min(600px, calc(100vw - 32px)); border-radius: 24px; }
.pf4 .pf2-dialog .pf4-card { border-radius: 24px; }
.pf4 .pf2-dialog .pf-fcard-surface { gap: 24px; padding: 28px; }
.pf4 .pf2-dialog .pf-fcard-copy { font-size: var(--type-body); padding-right: 40px; }
.pf4 .pf2-dialog .pf2-dialog-step { margin-bottom: -12px; }
@media (min-width: 600px) {
  .pf4 .pf2-dialog .pf-fcard-surface { gap: 28px; padding: 40px; }
  .pf4 .pf2-dialog .pf-fcard-copy { font-size: var(--type-lede); }
  .pf4 .pf2-dialog .pf2-dialog-close { top: 24px; right: 24px; }
}
.pf4-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: 24px;
  margin-top: auto;
}
.pf4-ways { margin: 0; color: var(--pf-muted); white-space: nowrap; }
.pf4-logos { flex: none; flex-wrap: nowrap; gap: 6px; align-items: center; }
.pf4-logos .pf-logo { display: block; line-height: 0; }
.pf .pf4-logos .pf-logo .logo-tile { --tile: 24px; }

/* ---------- Card art: one palette ----------
   Teal, ivory and Citron throughout; partner app chrome goes neutral so the
   only brand colour in a scene is the partner's own logo. Magenta stays for
   issues caught. */
.pf4 .fa { --fa-b: var(--kit-citron-tint); --fa-c: var(--kit-teal-highlight); }
.pf4 .fa-pdf { fill: var(--kit-teal-shade); }
.pf4 .fa-sf-bar, .pf4 .fa-aem-bar, .pf4 .fa-vv-bar, .pf4 .fa-fig-bar, .pf4 .fa-gs-bar { fill: #1d2b2c; }
.pf4 .fa-wf-bar { fill: var(--kit-ivory-medium); }
.pf4 .fa-sf-btn, .pf4 .fa-fig-tag, .pf4 .fa-gm-tab, .pf4 .fa-gm-promo { fill: var(--kit-teal-shade); }
.pf4 .fa-sf-ico { color: var(--kit-teal-shade); }
.pf4 .fa-sf-t, .pf4 .fa-gm-deal-t, .pf4 .fa-u--ok { fill: var(--kit-teal-shade); }
.pf4 .fa-sf-row-on, .pf4 .fa-fig-layer-on, .pf4 .fa-gm-nav-on, .pf4 .fa-gm-compose, .pf4 .fa-pill-ok { fill: var(--kit-teal-highlight); stroke: none; }
.pf4 .fa-wr-on, .pf4 .fa-gm-deal { fill: var(--kit-teal-highlight); stroke: var(--kit-teal-medium); }
.pf4 .fa-fig-sel, .pf4 .fa-fig-handle { stroke: var(--kit-teal-medium); }
.pf4 .fa-gm-bg, .pf4 .fa-claude-bg, .pf4 .fa-fig-canvas { fill: var(--kit-ivory-tint); }
.pf4 .fa-gm-search, .pf4 .fa-claude-user { fill: var(--kit-ivory-medium); }
