/* Directory pages only (home, plugins, jump puzzle). */
h1 { font-size: 2.4rem; line-height: 1.1; }
header p { max-width: 60ch; }

/* Section labels: mono eyebrow with a hairline running out */
h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0 14px;
  padding: 0;
  border: 0;
  font: 600 12px/16px var(--font-mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.featured-guides h2 { color: var(--accent); }

/* Sidebar nav: current page gets a bold ink rule on its left edge */
.page-nav { gap: 12px; }
.page-nav a {
  padding: 0 0 0 12px;
  border-bottom: 0;
  border-left: 2px solid transparent;
  font-size: 0.9rem;
  line-height: 1.3;
}
.page-nav a.current { color: var(--text); font-weight: 600; border-left-color: var(--text); }
.page-nav a:hover { color: var(--accent); }

/* Inputs and pills */
#search { border-color: var(--border-strong); border-radius: 10px; font-family: var(--font-sans); }
#search::placeholder { color: var(--muted); }
#search:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.tag-pill, li .tags button {
  font-family: var(--font-mono);
  font-weight: 500;
  background: var(--raised);
  border-color: transparent;
}
li .tags button { font-size: 0.72rem; padding: 3px 9px; }
.tag-pill:hover, .tag-pill.active, li .tags button:hover { color: var(--accent); border-color: var(--accent); }
.tag-pill.active { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); font-weight: 600; }

/* Status badge on every tool (I use it / not tried yet) and the filter above the tag bar. */
.badge {
  display: inline-block;
  font: 500 0.68rem var(--font-mono);
  padding: 2px 8px;
  border: 1px solid;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.badge.use { color: var(--accent); border-color: var(--accent); }
.badge.untried { color: var(--muted); border-color: var(--border-strong); border-style: dashed; }
#status-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
header .note { margin-top: 12px; }

/* Phones: the sidebar sits above the list, so the long tag filter folds away behind a
   toggle. Desktop keeps it open in the sticky sidebar. */
.tag-toggle { display: none; }
@media (max-width: 768px) {
  .tag-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--raised);
    color: var(--muted);
    font: 500 0.78rem var(--font-mono);
    cursor: pointer;
  }
  .tag-toggle::after { content: "\25BE"; transition: transform 0.15s; }
  .tag-toggle[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
  .tag-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
  #tag-bar:not(.open) { display: none; }
  #tag-bar.open { margin-top: 10px; }
}

/* Cards */
li { background: var(--card); border-color: var(--border); }
li:hover { border-color: var(--accent); box-shadow: var(--shadow-lift); }
li .link-body { font-weight: 600; }
li .desc { font-weight: 400; }
li a:hover { color: var(--text); }
li a:hover .link-body { color: var(--accent); }
li .favicon { background: var(--raised); border-radius: 6px; }
.featured-guides li { border-radius: 16px; }
.featured-guides li .link-body { font-weight: 600; font-size: 1.1rem; line-height: 1.25; letter-spacing: -0.01em; }
.featured-guides li .desc { font-family: var(--font-sans); font-size: 0.85rem; line-height: 1.4; }

footer a, #empty-state button { color: var(--accent); }
a { text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  li, li:hover { transition: none; transform: none; }
}

/* Inline links and notes */
p a, .note a, .credit-banner a { color: var(--accent); }
.note, .credit-banner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.note {
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Phones: the sidebar stacks above the list, so keep it short and get the guides and
   tools onto the first screen. */
@media (max-width: 768px) {
  .is-home .wordmark { font-size: 28px; }
  h1 { font-size: 1.7rem; }
  header p { font-size: 0.9rem; }

  /* Nav becomes a row (wrapping to a second line on narrow screens). */
  .page-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 14px;
  }
  .page-nav a { padding: 0 0 4px; border-left: 0; border-bottom: 2px solid transparent; }
  .page-nav a.current { border-bottom-color: var(--text); }
  #lang-bar { margin-bottom: 10px; }

  /* Search and the tag toggle share a row. */
  .sidebar-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
    align-items: center;
  }
  .sidebar-col > * { grid-column: 1 / -1; }
  .sidebar-col > .search-bar { grid-column: 1; margin-bottom: 0; }
  .sidebar-col > .tag-toggle { grid-column: 2; margin-top: 0; align-self: stretch; }
  #tag-bar.open { grid-column: 1 / -1; }
  .content-col > section:first-of-type h2 { margin-top: 12px; }

  /* Guide cards: thumbnail beside the title instead of a full-width image. */
  .featured-note { display: none; }
  .featured-guides ul { grid-template-columns: 1fr; gap: 10px; }
  .featured-guides li a { flex-direction: row; align-items: center; gap: 12px; padding: 10px; }
  .featured-guides li .favicon { width: 104px; flex: none; border-radius: 8px; }
  .featured-guides li .link-body { padding: 0; font-size: 1rem; }
  .featured-guides li .desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
  }
  .featured-guides li .tags { display: none; }
}
