/* Page rider for bookmarks/, loaded after anvil-core.css,
   deliberately unlayered so it always wins over the layered core. Holds
   only what this page alone uses; a rule graduates to core only when a
   second page needs it. */

/* ---- Bookmarks: compact rail ---- */
/* Each group is a section with a colored left rail (--rail, set inline per
   group by the renderer) and dense rows: name, dotted leader, short URL. */
#bookmarks { display: flex; flex-direction: column; gap: 24px; }

/* Vendor divider: sits above a run of same-vendor groups so a reader can
   tell the two chunks apart at a glance, not just tell topics apart within
   one. Colored via --rail (set inline per vendor by the renderer) from the
   same shared vendor palette forge/balancing-the-anvil/ uses, so "Anthropic"
   and "OpenAI" mean the same color everywhere on the site. */
.bm-vendor {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rail, var(--ember));
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--rail, var(--ember));
}

.bm-group {
  border-left: 3px solid var(--rail, var(--ember));
  padding-left: 16px;
}
.bm-group-title {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rail, var(--ember));
}

.bm-list { list-style: none; margin: 0; padding: 0; }
/* The whole row is the anchor; the name and URL inside it light up together. */
.bm-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  color: inherit;
  text-decoration: none;
}
.bm-row:focus-visible { outline: 2px solid var(--rail, var(--ember)); outline-offset: 2px; }
.bm-name {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
}
.bm-row:hover .bm-name,
.bm-row:focus-visible .bm-name { color: var(--rail, var(--ember)); }
.bm-row:hover .bm-url,
.bm-row:focus-visible .bm-url { color: var(--ink); }

/* empty spacer; the dotted line lifted off the baseline to sit mid-text */
.bm-leader {
  flex: 1 1 auto;
  min-width: 16px;
  border-bottom: 1px dotted var(--border);
  position: relative;
  top: -0.3em;
}

.bm-url {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

/* Narrow screens: drop the leader, stack the URL under the name so the long
   docs URLs wrap instead of overflowing. */
@media (max-width: 560px) {
  .bm-row { flex-wrap: wrap; gap: 1px 0; }
  .bm-name { flex: 1 1 100%; white-space: normal; }
  .bm-leader { display: none; }
  .bm-url { flex: 1 1 100%; white-space: normal; word-break: break-all; }
}
