/* WeChat article lists - the portal page and the search page.

   Both used to be a six-column table. The title is the only long value and the
   only one anybody reads, yet it shared the width with a 公众号 column that
   repeated one name down a portal page and a 来源 column holding the same word in
   every one of 55k rows. These are cards: title first at full width, the facts
   under it in one muted line, and the repeated columns gone. */
.wx-page {
  margin: 0 auto;
  max-width: 820px;
  padding: 0 14px;
  text-align: left;
}

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

.wx-head__title {
  color: #4e0d0d;
  font-size: 1.3em;
}

/* Counts on one muted line under the title, where they describe the column they
   sit above. They used to hang off the left edge of the viewport in a blue box. */
.wx-head__meta {
  color: #8a7a6a;
  font-size: 0.85em;
  margin-top: 4px;
}

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

.wx-head__sep {
  opacity: 0.5;
  padding: 0 6px;
}

.wx-search {
  display: flex;
  gap: 8px;
  padding: 12px 0 4px;
}

/* forms_styling.css dresses every input for a stacked form. Give the box and its
   button one height so the bar reads as one control. */
.wx-search input[type="search"] {
  box-sizing: border-box;
  flex: 1 1 auto;
  font-size: 0.95em;
  height: 38px;
  min-width: 0;
  width: 100%;
}

/* `.styled-button` carries its own vertical padding, which sat the label below
   centre once the bar gave the button a fixed height. */
.wx-search__go {
  align-items: center;
  box-sizing: border-box;
  display: inline-flex;
  flex: none;
  gap: 6px;
  height: 38px;
  justify-content: center;
  line-height: 1;
  padding-bottom: 0;
  padding-top: 0;
  white-space: nowrap;
}

.wx-facets {
  padding: 4px 0 10px;
}

.wx-facets__row {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 3px 0;
}

.wx-facets__label {
  color: #8a8a78;
  flex: none;
  font-size: 0.82em;
  width: 2.6em;
}

/* Name first, count second and quieter: you read the year, then check the number. */
.wx-chip small {
  opacity: 0.7;
  padding-left: 3px;
}

.wx-cards {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wx-card {
  background-color: #fff;
  border: 1px solid #d9d9c6;
  border-radius: 10px;
  margin-bottom: 6px;
  padding: 8px 14px;
}

.wx-card:hover {
  border-color: #b9b9a0;
}

.wx-card__title {
  color: #1a5276;
  display: block;
  font-size: 1.02em;
  line-height: 1.5;
  text-decoration: none;
}

.wx-card__title:hover {
  text-decoration: underline;
}

.wx-card__title mark {
  background-color: #f6e7a8;
  color: inherit;
  padding: 0 1px;
}

.wx-card__audio {
  color: #4a7c59;
  font-size: 0.8em;
  margin-left: 8px;
  vertical-align: middle;
}

/* One line of facts, wrapping rather than widening: a date, the account where it
   varies, and the way out to the original. */
.wx-card__meta {
  align-items: baseline;
  color: #8a8a78;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82em;
  gap: 4px 14px;
  padding-top: 4px;
}

.wx-card__date {
  flex: none;
}

.wx-card__portal,
.wx-card__link {
  color: #4a7c59;
  text-decoration: none;
}

.wx-card__portal:hover,
.wx-card__link:hover {
  text-decoration: underline;
}

.wx-card__link-icon {
  font-size: 0.85em;
  margin-left: 4px;
  opacity: 0.7;
}

/* Admin-only. The sync state was a True/False cell in a column of its own; it is
   a state, so it reads as a word and only stands out when something is missing. */
.wx-card__sync {
  color: #4a7c59;
}

.wx-card__sync--off {
  color: #a15c3e;
}

.wx-card__delete {
  margin-left: auto;
}

.wx-empty {
  background-color: #fff;
  border: 1px dashed #d0d0ba;
  border-radius: 10px;
  list-style: none;
  padding: 26px 18px;
  text-align: center;
}

.wx-empty__lead {
  color: #6f6f5e;
  font-size: 1.02em;
  margin: 0;
}

.wx-empty__hint {
  color: #9a9a88;
  font-size: 0.85em;
  margin: 6px 0 12px;
}

@media screen and (max-width: 600px) {
  .wx-facets__label {
    width: auto;
  }
}

/* The portal directory is a grid of cards, not a reading column, so it gets the
   full width the grid can use. */
.wx-page--wide {
  max-width: 1160px;
}

/* The box on that page searches articles and lands on another page; say so once,
   quietly, rather than letting the reader find out by pressing Enter. */
.wx-search__hint {
  color: #a5a593;
  font-size: 0.78em;
  margin: 4px 0 0;
}
