/* ---------- Features ---------- */

/* ---------- Features: index + detail panel ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.features__body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 1.5fr);
  gap: 64px;
}

/* The bus: one hairline across the whole page, and both columns tap off it. */
.features__body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  height: 1px;
  background: var(--line);
}

.features__index {
  position: relative;
  border-left: 1px solid var(--line);
}

/* Solder point where the rail taps off the bus. 3px dot, dead centre on
   the 1px rail crossed with the 1px bus. */
.features__index::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  z-index: 1;
}

.features__index ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Same language as the nav marker, sliding vertically instead. */
.features__marker {
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: 0;
  background: var(--accent);
  transition: transform 0.35s var(--ease-out), height 0.35s var(--ease-out);
}

.features__item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  padding: 13px 0 13px 22px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s ease;
}

.features__item:hover,
.features__item.is-active { color: var(--text); }

.features__num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}

.features__item.is-active .features__num { color: var(--accent); }

.features__panels {
  position: relative;
  display: grid;
  padding: 13px 0 0 40px;
  border-left: 1px solid var(--line);
}

/* Second solder point, where the panel block taps off the bus. */
.features__panels::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}

/* Panel header: the key, and which of the six we are on. */
.features__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

/* Short accent segment tapped off the header hairline. */
.features__head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 36px;
  height: 1px;
  background: var(--accent);
}

.features__count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* Panels share one grid cell, so the block keeps the height of the tallest
   one and swapping never makes the page jump. */
.features__panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out),
              visibility 0s linear 0.35s;
}

.features__panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out),
              visibility 0s;
}

.features__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.features__text {
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .features__body {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* A grid column takes its min-content width by default, and the code
     listings are wide. Let them scroll instead of widening the page. */
  .features__body > *,
  .features__panel { min-width: 0; }

  /* Stacked: the panel no longer hangs off the bus, so drop its tap. */
  .features__panels {
    padding: 0;
    border-left: 0;
  }

  .features__panels::after { display: none; }
}
