/* Leavory — Security Gate page. Builds on css/styles.css, css/pages.css
   and css/charts.css (the product view). */

.gate-h2 {
  margin-top: 18px;
  font-size: clamp(32px, 3.8vw, 52px);
  font-weight: 540;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.block__text > p:not(.eyebrow, .block__note, .gate-download) {
  max-width: var(--measure);
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-2);
}

/* ---------- The failed build ---------- */
.gate-cols {
  grid-template-columns: minmax(0, 2.6fr) minmax(220px, 1fr);
}
.gsteps {
  display: grid;
  gap: 4px;
}
.gsteps li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.gsteps em {
  font-style: normal;
  font-size: 12px;
  color: var(--text-3);
}
.gsteps .is-failed {
  background-color: rgb(var(--red-rgb) / 0.14);
}
.gsteps .is-failed em {
  color: var(--text);
  font-weight: 600;
}
.gsteps .is-skipped span {
  color: var(--text-3);
  text-decoration: line-through;
}
.gate-log {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: rgb(var(--white-rgb) / 0.025);
  font: 400 12px/1.8 var(--mono);
  color: var(--text-2);
  white-space: pre;
}
.gate-log span {
  margin-right: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background-color: var(--red);
  color: var(--white);
}

/* ---------- Setup ---------- */
.gate-download {
  margin-top: 28px;
}
.gate-download .pill {
  gap: 8px;
  height: 42px;
  padding: 0 18px;
}
.gate-download svg {
  display: inline-block;
}
/* The hub's token page, as an example view. */
.gtok-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}
.gtok-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.gtok-head p {
  max-width: 34rem;
  margin-top: 4px;
  color: var(--text-2);
}
.pw .pp__head h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}
.pbtn--light {
  border-color: transparent;
  background-color: var(--white);
  color: var(--ink);
}
.gtok-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.gtok-stats > div {
  padding: 14px 16px;
}
.gtok-stats > div + div {
  border-left: 1px solid var(--line);
}
.gtok-stats .mono {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.gtok-stats p:nth-child(2) {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-3);
}
.gtok-stats b {
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
}
.gtok-stats p:last-child {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-2);
}

/* ---------- The data and the questions ---------- */
.gate-data {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px clamp(40px, 6vw, 96px);
  align-items: start;
}
.gate-figures {
  margin-top: 32px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.gate-sources {
  margin-top: 32px;
}
.gate-sources h3 {
  font-size: 11px;
}
.gate-sources ol,
.gate-sources ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.gate-sources li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.gate-sources li:not([aria-hidden]) {
  height: 34px;
  padding: 0 12px 0 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.gate-sources li[aria-hidden] {
  color: var(--text-3);
}
.gate-sources li span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background-color: rgb(var(--white-rgb) / 0.08);
  font: 500 11px/1 var(--mono);
  color: var(--text-2);
}
.gate-sources li:first-child span {
  background-color: var(--red);
  color: var(--white);
}
.gate-sources > p {
  max-width: 30rem;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text-3);
}
.gate-more {
  max-width: 40rem;
  margin-top: 32px;
  font-size: 16px;
  color: var(--text-2);
}
.gate-more .more {
  margin-top: 0;
  margin-left: 4px;
  color: var(--text);
}
.gate-more .more + .more {
  margin-left: 20px;
}

/* ---------- Keycloak analyzed ---------- */
.kc-figures {
  max-width: var(--visual-max);
  margin-inline: auto;
}
.kc-asof {
  max-width: var(--visual-max);
  margin-inline: auto;
}
.kc-figures .ntile__value {
  font-size: clamp(26px, 2.6vw, 34px);
}
.kc-asof {
  margin-top: 16px;
  text-align: right;
}
.trio--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}
.pair h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Breakpoints ---------- */
@media (max-width: 1100px) {
  .gate-cols,
  .gate-data {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .trio--2,
  .gate-figures {
    grid-template-columns: minmax(0, 1fr);
  }
  .gtok-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gtok-stats > div:nth-child(3) {
    border-left: 0;
  }
  .gtok-stats > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
