/* Foolscap · the front page ----------------------------------------------- */

.hub__masthead {
  padding: var(--fs-7) 0 var(--fs-4);
  border-bottom: 1px solid var(--fs-ink);
  box-shadow: 0 3px 0 -2px var(--fs-ink);
  margin-bottom: var(--fs-5);
  position: relative;
}

/* The claret bar that opens the paper. */
.hub__masthead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4rem;
  height: 3px;
  background: var(--fs-claret);
}

.hub__dateline {
  text-align: center;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fs-ink-faint);
  margin: var(--fs-4) 0 0;
}

/* -- the list of games ---------------------------------------------------- */

.hub__list {
  display: flex;
  flex-direction: column;
}

.hub__game {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--fs-3);
  padding: var(--fs-4) 0;
  border-top: 1px solid var(--fs-rule);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s var(--fs-ease);
}

.hub__game:first-child {
  border-top: 0;
}

/* A grid item will not shrink below its own content unless told to, so the
   one-line blurb pushed the row 187px wider than the screen instead of
   ellipsing. This is the line that lets text-overflow do its job. */
.hub__game > div:first-child {
  min-width: 0;
}

.hub__game:hover {
  background: var(--fs-paper-sunk);
  /* Bleed the hover into the gutter so it reads as a full-width row. */
  box-shadow: -1rem 0 0 var(--fs-paper-sunk), 1rem 0 0 var(--fs-paper-sunk);
}

.hub__name {
  font-family: var(--fs-serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: var(--fs-2);
  flex-wrap: wrap;
}

/* The numeral is the one piece of claret in the list. It does the same job a
   drop capital does in a book: it tells you where the entry begins. */
.hub__numeral {
  font-family: var(--fs-serif);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--fs-claret);
  min-width: 1.6rem;
}

/* A rule-bounded label, not a pill. Pills are software; this is a caption. */
.hub__tag {
  font-family: var(--fs-sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fs-ink-faint);
  border-top: 1px solid var(--fs-rule-strong);
  border-bottom: 1px solid var(--fs-rule-strong);
  padding: 0.1rem 0;
}

/* One line, clipped. A front page of twenty-five entries that each ran to a
   paragraph put 154 characters of prose in every row across two blocks, which
   is what made the page feel crowded rather than long. The whole blurb is a
   tap away in the game's own rules. */
.hub__blurb {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--fs-ink-soft);
  margin: var(--fs-2) 0 0;
  max-width: 30rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* -- status column -------------------------------------------------------- */

.hub__status {
  text-align: right;
  min-width: 4.5rem;
}

.hub__streak {
  font-family: var(--fs-serif);
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hub__streak-label {
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fs-ink-faint);
}

.hub__today {
  display: inline-block;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 1px;
}

.hub__today[data-done="true"] {
  background: var(--fs-exact);
  color: var(--fs-exact-ink);
}

/* An unplayed puzzle needs no badge shouting at the reader; the absence of
   the "played" mark already says it. Just a quiet rule. */
.hub__today[data-done="false"] {
  border: 1px solid var(--fs-rule-strong);
  color: var(--fs-ink-faint);
  background: none;
}

.hub__streak--none {
  display: none;
}

/* -- footer --------------------------------------------------------------- */

.hub__note {
  border-top: 1px solid var(--fs-ink);
  box-shadow: 0 3px 0 -2px var(--fs-ink);
  padding-top: var(--fs-4);
  margin-top: var(--fs-5);
}

.hub__footer {
  padding: var(--fs-5) 0 var(--fs-7);
  text-align: center;
}

/* The standfirst: the line of italic under a masthead that says what the
   publication is before the reader has to work it out. */
.hub__standfirst {
  font-family: var(--fs-serif);
  font-style: italic;
  font-size: 1rem;
  text-align: center;
  color: var(--fs-ink-soft);
  margin: var(--fs-4) auto 0;
  max-width: 22rem;
}

/* -- the arrangement bar --------------------------------------------------- */

/* Four ways into the same fifteen puzzles. Set as a row of ruled captions
   rather than as tabs or pills: this is a masthead control on a printed page,
   and the underline is what a newspaper uses to say "you are here". */
.hub__arrangebar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fs-4);
  justify-content: center;
  padding-bottom: var(--fs-3);
  margin-bottom: var(--fs-3);
  border-bottom: 1px solid var(--fs-rule);
}

.hub__arrange {
  background: none;
  border: 0;
  padding: 0.15rem 0;
  font-family: var(--fs-sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fs-ink-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.12s var(--fs-ease);
}

.hub__arrange:hover {
  color: var(--fs-ink);
}

.hub__arrange[data-on="true"] {
  color: var(--fs-claret);
  border-bottom-color: var(--fs-claret);
}

/* -- section headings ------------------------------------------------------ */

.hub__section {
  padding: var(--fs-5) 0 var(--fs-2);
  border-top: 1px solid var(--fs-ink);
  box-shadow: 0 3px 0 -2px var(--fs-ink);
  margin-top: var(--fs-3);
}

.hub__list > .hub__section:first-child {
  border-top: 0;
  box-shadow: none;
  margin-top: 0;
  padding-top: var(--fs-2);
}

.hub__section-title {
  font-family: var(--fs-serif);
  font-size: 1.25rem;
  line-height: 1.1;
  margin: 0;
}

.hub__section-note {
  font-family: var(--fs-serif);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--fs-ink-faint);
  margin: var(--fs-1) 0 0;
}

/* A section heading is followed immediately by its first game, so that row
   should not draw its own rule on top of the heading's. */
.hub__section + .hub__game {
  border-top: 0;
}

/* -- the facet line -------------------------------------------------------- */

/* Kind, length and difficulty, on one quiet line. Every arrangement is
   available from the bar above, so a reader who sorts by one axis can still
   see the other two without changing view. */
.hub__facets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fs-1) var(--fs-3);
  margin: var(--fs-2) 0 0;
  font-family: var(--fs-sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fs-ink-faint);
}

.hub__facets span + span::before {
  content: "·";
  margin-right: var(--fs-3);
  color: var(--fs-rule-strong);
}

/* A finished puzzle and a begun one are different news. */
.hub__today[data-standing="done"] {
  background: var(--fs-exact);
  color: var(--fs-exact-ink);
  border: 1px solid var(--fs-exact);
}

.hub__today[data-standing="started"] {
  background: none;
  border: 1px solid var(--fs-brass);
  color: var(--fs-brass);
}
