/* The favourites strip's missing half.
 *
 * favorites.js builds .sk-fav-striphead, .sk-fav-grid, .sk-fav-item, .sk-fav-remove
 * and .sk-fav-status, and the site stylesheet had rules for none of them — so the
 * list rendered as full-width stacked boxes with an unlabelled default browser
 * button sitting wherever block flow put it. These rules finish what the markup
 * already promised, using the tokens the strip is already painted with.
 *
 * Scoped to the home page, where the strip lives. */

body.home .sk-fav-striphead {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0 0 14px;
}

body.home .sk-fav-striphead .sk-fav-striptitle {
  margin: 0;
  /* The home page sets headings in Fraunces through its own token; the strip sits
     between two of them, so it uses the same face rather than the body sans. */
  font-family: var(--f-display, var(--sk26-display, inherit));
  font-weight: 500;
  letter-spacing: -0.02em;
}

body.home .sk-fav-striphead .sk-fav-striphint {
  margin: 0;
}

body.home .sk-fav-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 620px) {
  body.home .sk-fav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  body.home .sk-fav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

body.home .sk-fav-item {
  position: relative;
  min-width: 0;
}

body.home .sk-fav-item .sk-fav-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  height: 100%;
  /* Right padding keeps the label clear of the remove control. */
  padding: 12px 42px 12px 13px;
  text-decoration: none;
}

body.home .sk-fav-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--sk26-hairline, rgba(0, 0, 0, .15));
  border-radius: var(--sk26-radius, 3px);
  background: transparent;
  color: var(--sk26-muted, #6b6259);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

body.home .sk-fav-remove:hover,
body.home .sk-fav-remove:focus-visible {
  border-color: var(--sk26-accent, #0007cb);
  color: var(--sk26-accent, #0007cb);
}

body.home .sk-fav-remove:focus-visible {
  outline: 2px solid var(--sk26-accent, #0007cb);
  outline-offset: 2px;
}

body.home .sk-fav-status {
  margin: 10px 0 0;
  min-height: 1.1em;
  font-family: var(--sk26-mono, ui-monospace, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sk26-muted, #6b6259);
}

/* The empty-state line. One sentence, no box: a reader who has used a tool and
   kept none is told how to keep one. Hidden until an inline script proves they
   qualify, so first-time visitors never see it. */
body.home .sk-fav-hint {
  margin: 26px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--sk26-muted, #6b6259);
}

body.home .sk-fav-hint a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.home .sk-fav-hint a:hover,
body.home .sk-fav-hint a:focus-visible {
  color: var(--sk26-accent, #0007cb);
}

html[data-sk-scheme="dark"] body.home .sk-fav-hint {
  color: var(--sk26-muted, #a89f92);
}
