/* Directions phrases stay paired with their translations on small screens. */
.directions-table td:first-child {
  width: 52%;
  color: var(--text);
}

.directions-route {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.directions-route li {
  position: relative;
  padding: 16px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--workbook-soft);
}

.directions-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--workbook-sage);
  color: var(--workbook-ink);
  font-weight: 700;
}

.directions-step-dutch,
.directions-step-english {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.5;
}

.directions-step-dutch { font-weight: 600; }
.directions-step-english { margin-top: 8px; color: var(--text-muted); }

.directions-step-arrow {
  position: absolute;
  top: 50%;
  right: -25px;
  width: 24px;
  transform: translateY(-50%);
  color: var(--workbook-ink);
  text-align: center;
}

.directions-step-arrow::before { content: '→'; }

@media (max-width: 700px) {
  .directions-route { grid-template-columns: 1fr; }
  .directions-route li { padding: 16px; }
  .directions-step-arrow {
    top: auto;
    bottom: -25px;
    right: 50%;
    height: 24px;
    transform: translateX(50%);
  }
  .directions-step-arrow::before { content: '↓'; }

  .workbook-page .directions-table,
  .workbook-page .directions-table tbody {
    display: block;
    width: 100%;
  }

  .directions-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .workbook-page .directions-table tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .workbook-page .directions-table td {
    display: block;
    width: 100%;
    padding: 4px 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .directions-table td:last-child {
    color: var(--text-muted);
  }
}
