/* 上师语露（窍诀），将来教证集、公案集同用- one passage per card, words first at reading size.

   Same column and palette as 堪布语露, which this grows out of: serif text ranged
   left, everything about the passage - who said it, where on the site it is
   read in full, which 类 it sits in - on one quiet line under it. */
.hj {
  margin: 0 auto;
  max-width: 1080px;
  padding: 6px 14px 30px;
  text-align: left;
}

.hj-head {
  border-bottom: 1px solid #ddddc8;
  padding-bottom: 10px;
}

.hj-head__title {
  color: #4e0d0d;
  font-family: "Songti SC", "SimSun", "宋体", serif;
  font-size: 1.35em;
  margin: 0;
}

.hj-head__meta {
  color: #8a7a6a;
  font-size: 0.85em;
  margin: 4px 0 0;
}

.hj-head__meta strong {
  color: #4a7c59;
  font-weight: 600;
}

.hj-search {
  align-items: center;
  border: 1px solid #ddddc8;
  border-radius: 999px;
  display: inline-flex;
  gap: 2px;
  margin-top: 8px;
  max-width: 300px;
  padding: 2px 10px 2px 2px;
}

.hj-search:focus-within {
  background-color: #fff;
  border-color: #b9a94a;
}

.hj-search__go {
  background: none;
  border: 0;
  color: #4e0d0d;
  cursor: pointer;
  height: 30px;
  width: 30px;
}

.hj-search .hj-search__input {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0;
  min-width: 0;
  outline: none;
  padding: 4px 0;
  width: 100%;
}

/* The 类 as a wrapping row of quiet chips: sixteen of them fit in two or three
   lines on a phone, and the one being read is the only filled one. */
.hj-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 4px;
}

.hj-cat,
.hj-len {
  border: 1px solid #ddddc8;
  border-radius: 999px;
  color: #4e0d0d;
  font-size: 0.88em;
  padding: 3px 11px;
  text-decoration: none;
}

.hj-cat:hover,
.hj-len:hover {
  border-color: #b9a94a;
  color: #6a1414;
}

.hj-cat.is-on,
.hj-len.is-on {
  background-color: #4e0d0d;
  border-color: #4e0d0d;
  color: #fff;
}

.hj-cat__n,
.hj-len__n {
  font-size: 0.85em;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
  opacity: 0.65;
}

.hj-cat-note {
  color: #8a7a6a;
  font-size: 0.85em;
  margin: 6px 0 0;
}

.hj-lens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.hj-len {
  border-style: dashed;
  font-size: 0.82em;
}

.hj-card__text {
  border: 0;
  color: #2b2620;
  font-family: "Songti SC", "SimSun", "宋体", serif;
  font-size: 1.05em;
  line-height: 1.85;
  margin: 0;
  padding: 0;
}

.hj-card__text p {
  margin: 0 0 0.6em;
  text-indent: 2em;
}

.hj-card__text p:last-child {
  margin-bottom: 0;
}

.hj-card__foot {
  align-items: baseline;
  color: #8a7a6a;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82em;
  gap: 4px 12px;
  margin-top: 10px;
}

.hj-card__speaker {
  color: #6b5d50;
}

.hj-card__source {
  color: #4a7c59;
  text-decoration: none;
}

.hj-card__source:hover {
  text-decoration: underline;
}

.hj-card__tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.hj-tag {
  color: #8a6d2f;
  font-size: 0.85em;
  text-decoration: none;
}

.hj-tag::before {
  content: "#";
  opacity: 0.6;
}

.hj-tag:hover {
  text-decoration: underline;
}

.hj-empty {
  color: #8a7a6a;
  padding: 24px 0;
}

.hj-back {
  color: #8a7a6a;
  display: inline-block;
  font-size: 0.85em;
  margin-bottom: 4px;
  text-decoration: none;
}

.hj-back:hover {
  color: #4e0d0d;
}

/* 今日一条: the one passage written out in full on the front page, on a faint
   ground so it reads as the day's line rather than the first of a list. */
.hj-today {
  background-color: #faf7ec;
  border: 1px solid #ecebdc;
  border-radius: 6px;
  margin: 14px 0 6px;
  padding: 12px 16px 12px;
}

.hj-today__bar {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.hj-today__label {
  color: #8a6d2f;
  font-size: 0.8em;
  letter-spacing: 0.1em;
}

.hj-today__random {
  color: #4a7c59;
  font-size: 0.82em;
  text-decoration: none;
}

.hj-today__title {
  color: #4e0d0d;
  display: block;
  font-family: "Songti SC", "SimSun", "宋体", serif;
  font-size: 1.05em;
  font-weight: 600;
  margin-bottom: 6px;
  text-decoration: none;
}

/* The 类 as a directory: a tile each with its count and the first few titles,
   two to a row on a phone. */
.hj-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

@media (max-width: 480px) {
  .hj-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hj-tile {
  min-width: 0;
  border: 1px solid #ecebdc;
  border-radius: 6px;
  padding: 10px 12px;
}

.hj-tile__head {
  align-items: baseline;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  text-decoration: none;
}

.hj-tile__title {
  color: #4e0d0d;
  font-family: "Songti SC", "SimSun", "宋体", serif;
  font-weight: 600;
}

.hj-tile__n {
  color: #8a7a6a;
  flex: none;
  font-size: 0.78em;
  font-variant-numeric: tabular-nums;
}

.hj-tile__samples {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.hj-tile__samples li {
  font-size: 0.82em;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hj-tile__samples a {
  color: #6b5d50;
  text-decoration: none;
}

.hj-tile__samples a:hover {
  color: #4e0d0d;
}

.hj-group {
  margin-top: 18px;
  scroll-margin-top: 84px;
}

.hj-group__title {
  border-bottom: 1px solid #ddddc8;
  color: #4e0d0d;
  font-family: "Songti SC", "SimSun", "宋体", serif;
  font-size: 1em;
  font-weight: 600;
  margin: 0;
  padding-bottom: 4px;
}

.hj-group__n {
  color: #8a7a6a;
  font-size: 0.8em;
  font-weight: 400;
  margin-left: 6px;
}

.hj-group__note {
  color: #8a7a6a;
  font-size: 0.82em;
  margin: 4px 0 0;
}

/* A row: the title, then the words themselves. A longer passage stops at eight
   lines under a fade until 展开全文 opens it. */
.hj-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hj-row {
  border-bottom: 1px solid #f0efe3;
  padding: 14px 0 12px;
}

.hj-row__title {
  color: #4e0d0d;
  display: inline-block;
  font-family: "Songti SC", "SimSun", "宋体", serif;
  font-weight: 600;
  margin-bottom: 6px;
  text-decoration: none;
}

.hj-row__title:hover {
  text-decoration: underline;
}

.hj-row.is-clamped:not(.is-open) .hj-row__text {
  -webkit-mask-image: linear-gradient(#000 85%, transparent);
  mask-image: linear-gradient(#000 85%, transparent);
  max-height: calc(1.85em * 8);
  overflow: hidden;
}

.hj-row__more {
  background: none;
  border: 0;
  color: #4a7c59;
  cursor: pointer;
  font-size: 0.85em;
  margin-top: 2px;
  padding: 2px 0;
}

.hj-row__more:hover {
  text-decoration: underline;
}

.hj-row__more:focus-visible {
  outline: 2px solid #b9a94a;
  outline-offset: 2px;
}

.hj-one {
  padding: 14px 0 6px;
}

.hj-one__cats {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 14px;
}

.hj-pn {
  border-top: 1px solid #ecebdc;
  display: flex;
  font-size: 0.88em;
  gap: 12px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 10px;
}

.hj-pn a {
  color: #4a7c59;
  text-decoration: none;
}

.hj-pn__next {
  text-align: right;
}

.hj-related {
  margin-top: 22px;
}

.hj-related__list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.hj-related__list li {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 5px 0;
}

.hj-related__list a {
  color: #4e0d0d;
  text-decoration: none;
}

.hj-related__why {
  display: inline-flex;
  font-size: 0.8em;
  gap: 6px;
}

/* 单条页 is one passage read through: a narrower column keeps its lines short. */
.hj--one {
  max-width: 860px;
}

/* 侧面 directory over a paged category, and the pager rows. */
.hj-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
}

.hj-jump {
  color: #4a7c59;
  font-size: 0.88em;
  text-decoration: none;
}

.hj-jump:hover {
  color: #4e0d0d;
}

.hj-pager {
  color: #8a7a6a;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.88em;
  gap: 14px;
  justify-content: center;
  margin: 20px 0 8px;
}

.hj-pager--top {
  justify-content: flex-start;
  margin: 14px 0 0;
}

.hj-pager a {
  color: #4a7c59;
  text-decoration: none;
}

.hj-pager a:hover {
  color: #4e0d0d;
}
