/* --- /docs (web-docs change, 2026-08-19) ---------------------------
   Two columns: a sticky nav rail that doubles as the search results
   panel, and the rendered page. Collapses to one column on narrow
   screens, nav first, because on a phone the nav is how you got here.
   ------------------------------------------------------------------ */
.docs {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  max-width: 68rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.docs-nav { position: sticky; top: 1.5rem; font-size: 0.9rem; }
.docs-nav ul { list-style: none; padding: 0; margin: 0; }
.docs-nav > nav > ul > li { margin-bottom: 0.15rem; }
.docs-nav a { display: block; padding: 0.3rem 0.5rem; border-radius: var(--radius-ctl); color: var(--fg-muted); }
.docs-nav a:hover { background: var(--bg-inset); color: var(--fg); text-decoration: none; }
.docs-nav a.active { background: var(--accent-wash); color: var(--accent-emph); font-weight: 600; }
.docs-nav-title { margin: 0 0 0.5rem; font-weight: 600; }
.docs-nav-title a { color: var(--fg); }
.docs-subnav { margin: 0.15rem 0 0.5rem 0.75rem !important; border-left: 1px solid var(--border); }
.docs-subnav a { font-size: 0.85rem; padding: 0.2rem 0.5rem; }

.docs-search { margin-bottom: 1rem; }
.docs-search input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-ctl);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.9rem;
}
.docs-search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.docs-results { list-style: none; padding: 0; margin: 0 0 1rem; }
.docs-results li { margin-bottom: 0.15rem; }
.docs-results a { display: block; padding: 0.4rem 0.5rem; border-radius: var(--radius-ctl); }
.docs-result-where { display: block; color: var(--fg); font-weight: 600; font-size: 0.85rem; }
.docs-result-snippet {
  display: block;
  color: var(--fg-muted);
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 0.15rem;
}

.docs-body { min-width: 0; }
.docs-body .amadan-markdown { max-width: 68ch; }
.docs-body h1 { margin-top: 0; }
.docs-body h2 { margin-top: 2.25rem; padding-top: 0.25rem; }
.docs-body h3 { margin-top: 1.5rem; }
.docs-lede { color: var(--fg-muted); max-width: 60ch; }

/* Heading permalinks: present for anyone who wants one, quiet until
   the heading is hovered or the link itself is focused. */
.docs-body .anchor {
  margin-left: 0.4rem;
  color: var(--fg-muted);
  opacity: 0;
  text-decoration: none;
  font-weight: 400;
}
.docs-body h2:hover .anchor,
.docs-body h3:hover .anchor,
.docs-body .anchor:focus { opacity: 1; }

/* Anchored headings must clear the sticky header when jumped to. */
.docs-body :target { scroll-margin-top: 5rem; }

.docs-cards { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.85rem; }
.docs-cards li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.docs-cards a { font-size: 1rem; }
.docs-cards span { display: block; color: var(--fg-muted); font-size: 0.9rem; margin-top: 0.2rem; }

.site-header .header-link { font-size: 0.9rem; color: var(--fg-muted); align-self: center; }
.site-header .header-link:hover { color: var(--fg); text-decoration: none; }

@media (max-width: 800px) {
  .docs { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem 1rem 3rem; }
  .docs-nav { position: static; }
}
/* Home activity feed (home-activity-feed design §7, 2026-08-22): the
   signed-in home page. Main + rail, the same shape as .branch-grid, so
   the two dashboards read as one system rather than two. */
main.home { max-width: 72rem; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 2rem; align-items: start; }
main.home h1 { margin-top: 0; }
.home-rail section { margin-bottom: 1.5rem; }
.home-rail h2 { margin: 0 0 0.5rem; font-size: 1rem; }

ul.feed { list-style: none; margin: 0; padding: 0; }
li.feed-group { padding: 0.75rem 0; border-top: 1px solid var(--border); }
ul.feed li.feed-group:last-child { border-bottom: 1px solid var(--border); }
ul.feed li.empty { color: var(--fg-muted); font-size: 0.9rem; padding: 0.75rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* The header line names who, where and when; the items below say what.
   Splitting them is what turns six rows into one readable card. */
.feed-head { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.feed-head .actor { font-weight: 600; }
/* A git author with no amadan account: shown, but never dressed up as
   an account — no link, no badge, muted. */
.feed-head .actor-git { font-weight: 600; color: var(--fg-muted); }
.feed-head .feed-repo { font-size: 0.9rem; }
.feed-head .when { margin-left: auto; color: var(--fg-muted); font-size: 0.8rem; white-space: nowrap; }

ul.feed-items { list-style: none; margin: 0.25rem 0 0; padding: 0 0 0 0.25rem; }
ul.feed-items li.activity-row { border-top: none; padding: 0.2rem 0; }
ul.feed-items li.activity-row:last-child { border-bottom: none; }
.feed-more { margin: 1rem 0; }

@media (max-width: 800px) {
  main.home { grid-template-columns: minmax(0, 1fr); }
}

/* Watch toggle on a public repo's header (home-activity-feed §8). */
.watch-form { margin: 0.5rem 0 0; }

