/* Leavory — Platform page. Builds on css/styles.css, css/pages.css and
   css/charts.css (the product views). */

/* Part labels over the two big sections. */
.part {
  display: block;
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.1em;
}
/* The label sits over the title, outside its box, so the text beside it
   centres on the title alone. The head keeps the label's room on top. */
.feature__head:has(.part) {
  align-items: center;
  padding-top: 36px;
}
.feature__head:has(.part) h2 {
  position: relative;
}
.feature__head .part {
  position: absolute;
  bottom: 100%;
  left: 0;
}
.muted {
  font-size: 12.5px;
  color: var(--text-3);
}

/* Inventory: the manifests it reads. */
.manifests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.manifests li {
  padding: 4px 8px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font: 400 12px/1.3 var(--mono);
  color: var(--text-2);
}

/* Dockerfile diff: one band per line. */
.diff {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.diff__lines {
  display: grid;
  padding: 10px 0;
  font: 400 12px/1.7 var(--mono);
  color: var(--text-2);
}
/* Long lines wrap inside their band, so the view never scrolls. */
.diff__lines span {
  padding: 0 12px;
  overflow-wrap: anywhere;
}
.diff .is-del {
  background-color: rgb(var(--white-rgb) / 0.05);
  color: var(--text-3);
  text-decoration: line-through;
}
.diff .is-add {
  background-color: rgb(var(--red-rgb) / 0.16);
  color: var(--text);
}

.ntiles--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---------- Before and after ---------- */
.versus-wrap {
  margin-top: clamp(48px, 6vw, 80px);
  padding: 0;
}
.versus {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.versus th {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  color: var(--text-3);
}
.versus th + th {
  color: var(--text);
}
.versus td {
  width: 50%;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
  vertical-align: top;
}
.versus tr:last-child td {
  border-bottom: 0;
}
.versus th + th,
.versus td + td {
  border-left: 1px solid var(--line);
}
.versus td + td {
  color: var(--text);
}
.versus svg {
  display: inline-block;
  margin-right: 10px;
  vertical-align: -3px;
}
.versus__x {
  color: rgb(var(--white-rgb) / 0.4);
}
.versus__ok {
  color: var(--red);
}

/* ---------- Breakpoints ---------- */
@media (max-width: 760px) {
  .versus,
  .versus tbody,
  .versus tr,
  .versus td {
    display: block;
    width: auto;
  }
  .versus thead {
    display: none;
  }
  .versus tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }
  .versus td {
    padding: 0;
    border: 0;
  }
  .versus td + td {
    margin-top: 8px;
    border: 0;
  }
}
