/*
 * Selected Counterweight Panels treatment.
 * Desktop: numbered corner brackets replace the former unnumbered bridges.
 * Mobile: every row uses a number-then-rule index while retaining the rail.
 */

.m05-counterweight {
  --m05-dark-soft: #123a32;
  --m05-muted: #3f554e;
  --m05-accent-light: #e1bd70;
  --m05-accent-ink: #62471f;
  --m05-row-min: 520px;
  --m05-copy-y: 56px;
  --m05-copy-x: clamp(50px, 5.5vw, 84px);
  --m05-mobile-top: 36px;
  --m05-mobile-bottom: 44px;
  --m05-mobile-gap: 22px;
  --m05-mobile-media: 180px;
  --m05-mobile-node: 54px;
  --display: "Sablemill Newsreader Archive", "Iowan Old Style", Baskerville,
    Georgia, serif;
  overflow: hidden;
  background: var(--dark);
  color: var(--light);
}

.m05-intro {
  position: relative;
  z-index: 10;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(84px, 9vw, 150px) 32px clamp(62px, 7vw, 110px);
  text-align: center;
}

.m05-intro h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(52px, 5.25vw, 78px);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.96;
  text-wrap: balance;
}

.m05-intro-support {
  max-width: 720px;
  margin: 28px auto 0;
  color: rgba(255, 250, 240, 0.76);
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  line-height: 1.65;
  text-wrap: balance;
}

.m05-sequence {
  position: relative;
  z-index: 2;
}

.m05-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.m05-rail {
  position: absolute;
  z-index: 8;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--accent);
  transform: translateX(-50%);
}

.m05-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  min-height: var(--m05-row-min);
}

.m05-copy {
  position: static;
  z-index: 12;
  width: 100%;
  min-width: 0;
  padding: var(--m05-copy-y) var(--m05-copy-x);
}

.m05-row-time .m05-copy,
.m05-row-economics .m05-copy {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}

.m05-row-team .m05-copy,
.m05-row-authority .m05-copy {
  grid-column: 2;
  justify-self: start;
  text-align: left;
}

.m05-copy h3 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(48px, 4.1vw, 64px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.m05-copy > p {
  max-width: 31rem;
  margin: 0;
  color: rgba(255, 250, 240, 0.78);
  font-size: clamp(16px, 1.1vw, 17px);
  line-height: 1.62;
  text-wrap: pretty;
}

.m05-copy > p + p {
  margin-top: 1em;
}

.m05-row-time .m05-copy > p,
.m05-row-economics .m05-copy > p {
  margin-left: auto;
}

.m05-node {
  position: absolute;
  z-index: 16;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 15px;
  border: 1px solid var(--m05-accent-light);
  border-radius: 50%;
  background: var(--dark);
  transform: translate(-50%, -50%);
}

.m05-media {
  position: relative;
  z-index: 6;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--m05-dark-soft);
}

.m05-row-time .m05-media,
.m05-row-economics .m05-media {
  grid-column: 2;
}

.m05-row-team .m05-media,
.m05-row-authority .m05-media {
  grid-column: 1;
  grid-row: 1;
}

.m05-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m05-row-time .m05-media img {
  object-position: 58% 35%;
}

.m05-row-team .m05-media img {
  object-position: 50% 50%;
}

.m05-row-economics .m05-media img {
  object-position: 50% 50%;
}

.m05-row-authority .m05-media img {
  object-position: 48% 38%;
}

.m05-row-time,
.m05-row-economics {
  background: var(--paper);
  color: var(--ink);
}

.m05-row-time .m05-copy > p,
.m05-row-economics .m05-copy > p {
  color: var(--m05-muted);
}

.m05-row-time .m05-node,
.m05-row-economics .m05-node {
  background: var(--paper);
}

.m05-number {
  color: var(--m05-accent-light);
  font-family: var(--utility);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.m05-row-time .m05-number,
.m05-row-economics .m05-number {
  color: var(--m05-accent-ink);
}

.m05-row-bridge {
  pointer-events: none;
}

@media (min-width: 821px) {
  .m05-row-bridge {
    display: none;
  }

  .m05-number {
    position: absolute;
    z-index: 20;
    top: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    min-width: 0;
    height: 54px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-top: 1px solid currentColor;
    background: transparent;
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .m05-number::before {
    content: attr(data-padded);
  }

  .m05-row-time .m05-number,
  .m05-row-economics .m05-number {
    right: calc(50% + 26px);
    left: auto;
    border-right: 1px solid currentColor;
  }

  .m05-row-team .m05-number,
  .m05-row-authority .m05-number {
    right: auto;
    left: calc(50% + 26px);
    border-left: 1px solid currentColor;
  }
}

@media (max-width: 900px) {
  .m05-intro h2 {
    font-size: clamp(46px, 7.2vw, 64px);
  }
}

@media (max-width: 820px) {
  .m05-intro {
    padding: 76px 28px 62px 74px;
    text-align: left;
  }

  .m05-intro-support {
    max-width: 620px;
    margin-inline: 0;
    text-wrap: pretty;
  }

  .m05-rail {
    left: 36px;
    width: 1px;
    transform: none;
  }

  .m05-row {
    display: flex;
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: var(--m05-mobile-gap);
    padding:
      var(--m05-mobile-top)
      22px
      var(--m05-mobile-bottom)
      76px;
  }

  .m05-copy,
  .m05-row-time .m05-copy,
  .m05-row-team .m05-copy,
  .m05-row-economics .m05-copy,
  .m05-row-authority .m05-copy {
    align-self: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: left;
  }

  .m05-copy h3 {
    margin-bottom: 16px;
    font-size: clamp(38px, 10vw, 48px);
    line-height: 0.95;
  }

  .m05-copy > p {
    max-width: 620px;
    margin-left: 0;
    font-size: 16px;
    line-height: 1.6;
  }

  .m05-number,
  .m05-row-time .m05-number,
  .m05-row-team .m05-number,
  .m05-row-economics .m05-number,
  .m05-row-authority .m05-number {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: 88px;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    background: transparent;
    gap: 11px;
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .m05-number::before {
    content: attr(data-padded);
  }

  .m05-number::after {
    flex: 1;
    height: 1px;
    background: currentColor;
    content: "";
    opacity: 0.68;
  }

  .m05-node {
    top: var(--m05-mobile-node);
    left: 36px;
    transform: translate(-50%, -50%);
  }

  .m05-media,
  .m05-row-time .m05-media,
  .m05-row-team .m05-media,
  .m05-row-economics .m05-media,
  .m05-row-authority .m05-media {
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
    width: 100%;
    max-width: 620px;
    height: var(--m05-mobile-media);
    margin: 0;
  }

  .m05-row-time .m05-media img {
    object-position: 58% 18%;
  }

  .m05-row-team .m05-media img,
  .m05-row-economics .m05-media img {
    object-position: 50% 50%;
  }

  .m05-row-authority .m05-media img {
    object-position: 48% 30%;
  }

  .m05-row-bridge,
  .m05-row-time .m05-row-bridge,
  .m05-row-team .m05-row-bridge,
  .m05-row-economics .m05-row-bridge,
  .m05-row-authority .m05-row-bridge {
    position: absolute;
    z-index: 14;
    top: auto;
    right: auto;
    bottom: -14px;
    left: 36px;
    display: block;
    width: 1px;
    height: 28px;
    border: 0;
    background: var(--m05-accent-light);
    opacity: 0.62;
    transform: none;
  }
}

@media (max-width: 560px) {
  .m05-intro h2 {
    font-size: clamp(39px, 11.4vw, 52px);
    line-height: 0.99;
  }

  .m05-row-time .m05-media img {
    object-position: 58% 50%;
  }

  .m05-row-authority .m05-media img {
    object-position: 48% 50%;
  }
}

@media (max-width: 480px) {
  .m05-intro {
    padding-right: 20px;
    padding-left: 66px;
  }

  .m05-row {
    padding-right: 18px;
    padding-left: 66px;
  }

  .m05-rail,
  .m05-node,
  .m05-row-bridge,
  .m05-row-time .m05-row-bridge,
  .m05-row-team .m05-row-bridge,
  .m05-row-economics .m05-row-bridge,
  .m05-row-authority .m05-row-bridge {
    left: 30px;
  }
}

@media (forced-colors: active) {
  .m05-rail,
  .m05-row-bridge,
  .m05-number::after {
    background: CanvasText;
  }

  .m05-node,
  .m05-number {
    border-color: CanvasText;
  }
}
