/* Use the same inset and outer edge for both interactive panels. */
:is(#roles, #join) {
  --card-inset: clamp(24px, 3.5vw, 60px);
  --card-radius: 18px;
  --card-border: #484641;
}

#roles .role-tabs {
  border-color: var(--card-border);
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}

#roles .role-tabs button {
  min-height: 48px;
  padding-block: 12px;
  line-height: 1.3;
}

#roles [data-panel] {
  min-height: clamp(296px, 26vw, 440px);
  padding: clamp(54px, 5.5vw, 86px) var(--card-inset) var(--card-inset);
  justify-content: flex-start;
  border-color: var(--card-border);
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}

#roles [data-panel] h3 {
  font-size: clamp(28px, 3.2vw, 58px);
  line-height: 1.1;
}

#roles [data-panel] p {
  margin-top: 14px;
}

#roles [data-panel]::after {
  inset: 4% 2.5% 4% 51%;
}

/* Each step is a single hit area with its own aligned number and action. */
#join .steps {
  --steps-width: 58%;
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  border-radius: var(--card-radius);
  border-color: var(--card-border);
  background: #232427;
  padding: 0;
}

#join .steps::before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0 0 0 var(--steps-width);
  background: radial-gradient(ellipse at 65% 75%, #63503c, transparent 85%), #2b2a28;
  z-index: -1;
}

#join .steps::after {
  inset: 0 0 0 var(--steps-width);
  background: url(img42.png) center / 94% auto no-repeat;
  z-index: -1;
}

#join .steps a {
  width: var(--steps-width);
  min-height: clamp(116px, 10vw, 164px);
  grid-template-columns: 1.15em minmax(0, 1fr) 28px;
  align-items: center;
  gap: clamp(14px, 1.55vw, 27px);
  padding: 22px var(--card-inset);
  font-size: clamp(24px, 2.4vw, 38px);
  border-right: 1px solid var(--card-border);
}

#join .steps a + a { border-top: 1px solid var(--card-border); }

#join .steps :is(strong, span, i) {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

#join .steps strong {
  justify-content: flex-start;
  color: #ffb079;
  font: 500 1em/1 Inter, sans-serif;
  font-variant-numeric: tabular-nums;
}

#join .steps span {
  font: 500 clamp(15px, 1.35vw, 23px)/1.45 Inter, sans-serif;
}

#join .steps i {
  display: block;
  position: relative;
  width: 28px;
  height: 28px;
  color: #f9bb91;
  background: none;
}

#join .steps i::before, #join .steps i::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
}

#join .steps i::before {
  width: 16px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
}

#join .steps i::after {
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: translate(-29%, -73%);
}

#join .steps a:nth-child(2) i { rotate: 135deg; }

@media (hover: hover) {
  #join .steps a:hover { background-color: #303033; }
  #join .steps a:hover span, #join .steps a:hover i { background: transparent; }
}
@media (prefers-reduced-motion: no-preference) {
  #join .steps a { transition: background-color 180ms ease; }
}
@media (max-width: 700px) {
  :is(#roles, #join) { --card-inset: 20px; --card-radius: 14px; }
  #roles [data-panel] {
    min-height: calc(212px + clamp(158px, 43vw, 222px));
    padding: 23px var(--card-inset) 10px;
  }
  #roles [data-panel]::after {
    inset: auto;
    flex: 0 0 clamp(158px, 43vw, 222px);
    height: auto;
    margin-top: auto;
  }
  #roles [data-panel] h3 { font-size: clamp(25px, 6vw, 31px); }
  #roles [data-panel] p { font-size: 15px; margin: 10px 0 8px; }
  #join .steps {
    --steps-width: 100%;
    --flight-height: clamp(112px, 33vw, 180px);
    padding-bottom: var(--flight-height);
  }
  #join .steps::before, #join .steps::after {
    inset: auto 0 0;
    height: var(--flight-height);
  }
  #join .steps::after { background-size: auto 96%; }
  #join .steps a {
    min-height: 88px;
    grid-template-columns: 18px minmax(0, 1fr) 22px;
    gap: 12px;
    padding: 17px var(--card-inset);
    border-right: 0;
    font-size: 25px;
  }
  #join .steps i { width: 22px; }
}
/* On the smallest screens the longest role title wraps to two lines. */
@media (max-width: 375px) {
  #roles [data-panel] { min-height: 410px; }
}

/* Give the art its own grid cell in both sections. */
:is(#roles,#join) {--panel-columns:minmax(0,1.08fr) minmax(0,.92fr)}
#roles [data-panel]:not([hidden]) {
  display:grid;grid-template-columns:var(--panel-columns);grid-template-rows:1fr auto auto 1fr;
  column-gap:var(--card-inset);padding:var(--card-inset);align-content:center;
}
#roles [data-panel] h3,#roles [data-panel] p {grid-column:1;width:auto;max-width:100%;min-width:0}
#roles [data-panel] h3 {grid-row:2}
#roles [data-panel] p {grid-row:3}
#roles [data-panel]::after {
  position:static;grid-area:1 / 2 / -1 / 3;align-self:stretch;width:100%;height:auto;margin:0;
}
#roles [hidden] {display:none}
#join .steps {
  display:grid;grid-template-columns:var(--panel-columns);grid-template-rows:repeat(2,minmax(100px,1fr));
  padding:0;
}
#join .steps a {grid-column:1;width:100%;min-width:0;min-height:100px}
#join .steps::before {content:none}
#join .steps::after {
  position:static;grid-area:1 / 2 / 3 / 3;width:auto;height:auto;
  background:#292b2b url(img42.png) center / contain no-repeat;
}
#roles .role-tabs {overflow:hidden}
@media(max-width:700px) {
  #roles [data-panel]:not([hidden]) {
    grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr clamp(140px,38vw,205px);
    row-gap:10px;min-height:clamp(365px,85vw,435px);padding:20px;
  }
  #roles [data-panel] h3 {grid-row:1}
  #roles [data-panel] p {grid-row:2;align-self:start;margin:0}
  #roles [data-panel]::after {grid-area:3 / 1;width:100%}
  #join .steps {grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(80px,1fr)) clamp(108px,29vw,155px)}
  #join .steps a {min-height:80px}
  #join .steps::after {grid-area:3 / 1;border-top:1px solid var(--card-border)}
}
@media(max-width:375px) { #roles [data-panel]:not([hidden]) { min-height:410px } }
