/* Route Packs: the homepage teaser and the /route-packs page share these styles. */
.iq-rp {
  --iq-rp-ink: #1e1f2b;
  --iq-rp-muted: #55585e;
  --iq-rp-line: #e3e4e6;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 128px) var(--h-spacing);
  box-sizing: content-box;
  border-top: 1px solid #ececee;
  color: var(--iq-rp-ink);
}
.iq-rp__head {
  max-width: 820px;
  margin-bottom: clamp(36px, 4vw, 64px);
}
.iq-rp__title {
  font-family: 'Alliance No.1', system-ui, sans-serif;
  font-feature-settings: 'ss04' on;
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--iq-rp-ink);
  margin: 20px 0 18px;
  text-wrap: balance;
}
.iq-rp__lede {
  margin: 0;
  max-width: 60ch;
  font-size: 18px;
  line-height: 1.55;
  color: var(--iq-rp-muted);
  text-wrap: pretty;
}
.iq-rp__note {
  margin: 0;
  max-width: 62ch;
  font-size: 13px;
  line-height: 1.5;
  color: #55585e;
}
.iq-rp__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(40px, 5vw, 72px);
}
.iq-rp-tag {
  display: inline-block;
  padding: 0;
  border: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7178;
  white-space: nowrap;
}

/* The spine: four numbered parts on a rail. */
.iq-rp-spine {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  list-style: none;
  margin: 0 0 clamp(48px, 6vw, 88px);
  padding: 0;
  border-top: 1px solid var(--iq-rp-line, #e3e4e6);
}
.iq-rp-spine::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--iq-rp-ink, #1e1f2b);
  transform-origin: left;
  transform: scaleX(var(--iq-rp-progress, 1));
}
.iq-rp-spine__part {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 24px 0 0;
}
.iq-rp-spine__num {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #8a8f97;
}
.iq-rp-spine__label {
  font-family: 'Alliance No.1', system-ui, sans-serif;
  font-size: clamp(22px, 1.9vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.iq-rp-spine__text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--iq-rp-muted, #55585e);
  max-width: 26ch;
}

/* Featured packs: cards that stack as you scroll. */
.iq-rp-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-bottom: 1px solid #1e1f2b;
}
.iq-rp-stack__card {
  display: grid;
  gap: clamp(24px, 3vw, 40px);
  padding: clamp(28px, 3.5vw, 56px) 0;
  border-top: 1px solid #1e1f2b;
  color: #1e1f2b;
}

.iq-rp-stack__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.iq-rp-stack__count {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #8a8f97;
}
.iq-rp-stack__body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}

.iq-rp-stack__name {
  margin: 14px 0 16px;
  font-family: 'Alliance No.1', system-ui, sans-serif;
  font-feature-settings: 'ss04' on;
  font-weight: 400;
  font-size: clamp(32px, 3.4vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: #1e1f2b;
}
.iq-rp-stack__outcome {
  margin: 0;
  max-width: 44ch;
  font-size: 18px;
  line-height: 1.5;
  color: #55585e;
}

/* Field list shared by stack cards and catalogue cards. */
.iq-rp-fields {
  margin: 0;
  display: grid;
}
.iq-rp-fields__row {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid #ececee;
}
.iq-rp-fields dt {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7178;
  padding-top: 3px;
}
.iq-rp-fields dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--iq-rp-ink, #1e1f2b);
}
.iq-rp-fields__row[data-part='exceptions'] dd {
  color: #1e1f2b;
  font-weight: 500;
}

/* /route-packs hero. */
.iq-rp-hero {
  padding: clamp(150px, 18vw, 230px) var(--h-spacing) clamp(64px, 8vw, 112px);
  background: #efefef;
}
.iq-rp-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
/* QA: the eyebrow sits on the grey hero, where #6b7178 fails AA at 13px. */
.iq-rp-hero .iq-eyebrow {
  color: #55585e;
}
.iq-rp-hero__title {
  margin: 20px 0 24px;
  font-family: 'Alliance No.1', system-ui, sans-serif;
  font-feature-settings: 'ss04' on;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #1e1f2b;
  text-wrap: balance;
}
.iq-rp-hero__lede {
  margin: 0 0 36px;
  max-width: 56ch;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5;
  color: #55585e;
  text-wrap: pretty;
}
.iq-rp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
  margin-bottom: 28px;
}

/* Catalogue. */
.iq-rp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
  margin-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid #e3e4e6;
}
.iq-rp-filter {
  all: unset;
  cursor: pointer;
  padding: 14px 10px;
  min-width: 44px;
  box-sizing: border-box;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  color: #6b7178;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}
.iq-rp-filter span {
  margin-left: 6px;
  color: #6b7178;
}
.iq-rp-filter:hover {
  color: #1e1f2b;
}
.iq-rp-filter[aria-pressed='true'] {
  border-bottom-color: #1e1f2b;
  color: #1e1f2b;
}
.iq-rp-filter:focus-visible {
  outline: 2px solid #1e1f2b;
  outline-offset: 3px;
}
.iq-rp-group + .iq-rp-group {
  margin-top: clamp(48px, 6vw, 88px);
}
.iq-rp-group[hidden] {
  display: none;
}
.iq-rp-group__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid #1e1f2b;
}
.iq-rp-group__name {
  margin: 0;
  font-family: 'Alliance No.1', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.iq-rp-group__lede {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #55585e;
}
.iq-rp-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 0;
  border-top: 1px solid #e3e4e6;
  border-left: 1px solid #e3e4e6;
}
.iq-rp-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  border-right: 1px solid #e3e4e6;
  border-bottom: 1px solid #e3e4e6;
  background: #fff;
  transition: background 0.3s ease;
}
.iq-rp-card:hover {
  background: #f7f7f7;
}
.iq-rp-card[data-featured] {
  box-shadow: inset 0 2px 0 #1e1f2b;
}
.iq-rp-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.iq-rp-card__name {
  margin: 0;
  font-family: 'Alliance No.1', system-ui, sans-serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.iq-rp-card__outcome {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #55585e;
  flex: 1;
}
.iq-rp-card .iq-rp-fields__row {
  grid-template-columns: 8.5em minmax(0, 1fr);
}
.iq-rp-card__usecase {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #2a4bd7;
  text-decoration: none;
}
.iq-rp-card__usecase svg {
  transition: transform 0.25s ease;
}
.iq-rp-card__usecase:hover svg {
  transform: translateX(3px);
}
.iq-rp-card__usecase:focus-visible {
  outline: 2px solid #1e1f2b;
  outline-offset: 3px;
}

/* QA: designed focus rings for the CTA pills and text links on this page. */
.iq-rp-hero a.iq-ways__link:focus-visible,
.iq-rp-cta a.iq-ways__link:focus-visible {
  outline: 2px solid #1e1f2b;
  outline-offset: 3px;
}

/* QA: anchor landing keeps the previous section's tail link clear of the nav. */
#catalogue {
  scroll-margin-top: 96px;
}

/* What we hold back. */
.iq-rp-held {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 100px);
  align-items: start;
}
.iq-rp-held__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.iq-rp-held__list li {
  padding: 20px 0;
  border-top: 1px solid #e3e4e6;
  font-size: 17px;
  line-height: 1.55;
  color: #55585e;
}
.iq-rp-held__list strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  color: #1e1f2b;
}

/* Closing CTA. */
.iq-rp--cta {
  border-top: 0;
  padding-top: 0;
}
.iq-rp-cta {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: clamp(40px, 6vw, 88px);
  background: #1e1f2b;
}
.iq-rp-cta .iq-rp__title {
  color: #fff;
  margin-top: 0;
}
.iq-rp-cta .iq-rp__lede {
  color: #c9cbd3;
  margin-bottom: 28px;
}
.iq-rp-cta .iq-ways__link--primary {
  background: #fff;
  color: #1e1f2b;
}

@media (max-width: 59.9375em) {
  .iq-rp-spine {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 8px;
  }
  .iq-rp-stack__body,
  .iq-rp-held,
  .iq-rp-group__head {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 34.9375em) {
  .iq-rp-spine {
    grid-template-columns: 1fr;
  }
  .iq-rp-spine__part {
    padding-right: 0;
  }
  .iq-rp-fields__row,
  .iq-rp-card .iq-rp-fields__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .iq-rp-card {
    padding: 24px;
  }
  .iq-rp-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .iq-rp-filter {
    white-space: nowrap;
  }
}

/* Homepage flow stage: one machine assembled on a base plate. Empty sockets wait on
   the plate; each step drops its part in and extends the conduit; scrolling back
   lifts parts out again. */
.iq-flow__frame--diagram {
  background: #f4f5f7;
  border: 1px solid #e3e5e8;
  box-shadow: none;
}
.iq-flow__frame--diagram .iq-flow__tick {
  border-top-color: rgba(19, 21, 25, 0.16);
  color: #8a8f97;
}
.iq-flow__frame--diagram .iq-flow__tick[data-active] {
  border-color: #131519;
  color: #131519;
}
.iq-dg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 1% 2% 8%;
  box-sizing: border-box;
  overflow: visible;
}
@media (min-width: 60em) {
  .iq-flow__body {
    grid-template-columns: 2px minmax(0, 0.62fr) minmax(0, 1.38fr);
  }
  .iq-flow__stage {
    align-self: start;
  }
  .iq-flow__frame--diagram {
    aspect-ratio: auto;
    height: clamp(460px, calc(100vh - 150px), 860px);
  }
}
.iq-dg__box polygon {
  stroke: #131519;
  stroke-width: 0.6;
  stroke-linejoin: round;
}
.iq-dg__rim {
  fill: none;
  stroke: #d5d9dd;
  stroke-width: 0.8;
}
.iq-dg__socket polygon {
  fill: #f1f2f4;
  stroke: #9aa0a8;
  stroke-width: 0.9;
  stroke-dasharray: 4 3;
  transition:
    fill 0.4s ease,
    stroke 0.4s ease;
}
.iq-dg__socket text {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  text-anchor: middle;
  fill: #9aa0a8;
  transition: opacity 0.3s ease;
}
.iq-dg__socket[data-current] polygon {
  fill: #e8ecfb;
  stroke: #2a4bd7;
}
.iq-dg__socket[data-on] text {
  opacity: 0;
}
.iq-dg__part {
  opacity: 0;
  transform: translateY(-70px);
  transition:
    opacity 0.35s ease,
    transform 0.75s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.iq-dg__part[data-on] {
  opacity: 1;
  transform: none;
}
.iq-dg__mesh,
.iq-dg__wire {
  fill: none;
  stroke: #131519;
  stroke-width: 0.8;
}
.iq-dg__wire--down {
  stroke: #e0241a;
  stroke-dasharray: 3 3;
}
.iq-dg__wire--live {
  stroke: #2a4bd7;
  stroke-width: 1.4;
}
.iq-dg__badge {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.iq-dg__part[data-current] .iq-dg__badge {
  opacity: 1;
  transition-delay: 0.45s;
}
.iq-dg__badge circle {
  fill: #2a4bd7;
}
.iq-dg__badge text {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  text-anchor: middle;
  fill: #fff;
}
.iq-dg__conduit {
  fill: none;
  stroke: #2a4bd7;
  stroke-width: 1.6;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.35s;
}
[data-on] > .iq-dg__conduit,
.iq-dg__conduit[data-on] {
  stroke-dashoffset: 0;
}
.iq-dg__tag {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  fill: #5c636b;
}
.iq-dg__tag--out {
  fill: #2a4bd7;
}
.iq-dg__entry .iq-dg__tag,
.iq-dg__exit .iq-dg__tag {
  opacity: 0;
  transition: opacity 0.4s ease 0.5s;
}
.iq-dg__entry[data-on] .iq-dg__tag,
.iq-dg__exit[data-on] .iq-dg__tag {
  opacity: 1;
}
.iq-dg__caption {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
.iq-dg__caption[data-current] {
  opacity: 1;
  transform: none;
  transition-delay: 0.15s;
}
.iq-dg__capTitle {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  fill: #2a4bd7;
}
.iq-dg__capPlain {
  font-family: 'Alliance No.1', system-ui, sans-serif;
  font-size: 19px;
  fill: #131519;
}
@media (max-width: 47.4375em) {
  .iq-dg__capPlain,
  .iq-dg__tag {
    display: none;
  }
  .iq-dg__capTitle {
    font-size: 22px;
  }
  .iq-flow__stage {
    position: sticky;
    top: 76px;
    z-index: 3;
    padding-bottom: 8px;
    background: #fff;
  }
}
@media (prefers-reduced-motion: reduce) {
  .iq-dg__part,
  .iq-dg__conduit,
  .iq-dg__caption,
  .iq-dg__badge {
    transition: none;
  }
}

/* Homepage story: Work, Build and Govern converge into the one path of "How it works". */
.iq-converge {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--h-spacing) clamp(24px, 3vw, 40px);
  box-sizing: content-box;
  background: #fff;
}
.iq-converge__inner {
  position: relative;
}
.iq-converge__sources {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.iq-converge__source {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.iq-converge__mode {
  font-family: 'Alliance No.1', system-ui, sans-serif;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.02em;
  color: #1e1f2b;
}
.iq-converge__via {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7178;
}
.iq-converge__req {
  margin-top: 10px;
  padding: 9px 14px;
  border: 1px solid #e3e4e6;
  background: #f6f6f7;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px;
  color: #1e1f2b;
}
.iq-converge__paths {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 18px;
  overflow: visible;
}
.iq-converge__track {
  fill: none;
  stroke: #e6e7ea;
  stroke-width: 2;
}
.iq-converge__line {
  fill: none;
  stroke: #1e1f2b;
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.iq-converge__dot {
  fill: #1e1f2b;
  opacity: 0;
}
.iq-converge__node {
  fill: #1e1f2b;
}
.iq-converge__captions {
  display: grid;
  margin-top: 28px;
  text-align: center;
}
.iq-converge__caption {
  grid-area: 1 / 1;
  margin: 0;
  font-family: 'Alliance No.1', system-ui, sans-serif;
  font-size: clamp(26px, 2.8vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #1e1f2b;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}
.iq-converge__caption[data-active] {
  opacity: 1;
  transform: none;
}
@media (max-width: 47.4375em) {
  .iq-converge__req {
    display: none;
  }
  .iq-converge__via {
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  .iq-converge__caption {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .iq-converge__caption {
    transition: none;
  }
}
