/* The foot of the board index (Pages/Online/_IndexFoot.cshtml): who is online, today's
   birthdays and the totals. Variables from site.css only.

   Phone first: the boxes stack under the boards, each a <details> whose heading row is a
   44 px target with its one-line summary at the right ("12 online"). From 960 px the
   online box takes the wide column and the others stack beside it. */
.index-foot { display: grid; gap: 16px; margin-top: 16px; }

.foot-head {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px;
  background: var(--head-fill); cursor: pointer; list-style: none;
}
.foot-head::-webkit-details-marker { display: none; }
/* The fold's own mark: a chevron that turns when open. */
.foot-head::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-left: 2px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform var(--ease);
}
details[open] > .foot-head::after { transform: rotate(45deg); }
details[open] > .foot-head { border-bottom: 1px solid var(--line); }
.foot-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.foot-title {
  display: flex; align-items: center; gap: 10px; flex: 1 1 auto; margin: 0;
  color: var(--label); font-size: 14px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.foot-title::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.foot-sum { flex: none; color: var(--muted); font-size: 14px; }

.foot-body { display: grid; gap: 12px; padding: 14px 16px 16px; }
.foot-line { margin: 0; color: var(--ink); }
.foot-note { margin: 0; color: var(--muted); font-size: 14px; }

/* People: a face and a name, each a 44 px target, wrapping. */
.foot-people { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; padding: 0; list-style: none; }
.foot-person {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px 0 6px;
  border-radius: var(--radius-round); color: var(--ink); font-weight: 500; text-decoration: none;
  overflow-wrap: anywhere; transition: background-color var(--ease), color var(--ease);
}
.foot-person:hover { background: var(--surface-alt); color: var(--accent); }
.foot-person:hover .foot-name { text-decoration: underline; }
.foot-person:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.foot-person .avatar { flex: none; }
.foot-more { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--muted); font-size: 14px; }

/* The totals: three numbers side by side, a label under each. */
.foot-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.foot-totals > div {
  display: flex; flex-direction: column-reverse; gap: 2px; padding: 10px 12px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-chip); background: var(--surface-alt);
}
.foot-totals dt { color: var(--muted); font-size: 13px; }
.foot-totals dd { margin: 0; color: var(--ink); font-family: var(--font-heading); font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.foot-newest { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; color: var(--muted); font-size: 14px; }

@media (min-width: 768px) {
  .index-foot { margin-top: 20px; }
  .foot-head, .foot-body { padding-left: 22px; padding-right: 22px; }
  .foot-title { font-size: 15px; }
}

@media (min-width: 960px) {
  .index-foot { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  .foot-online { grid-row: span 2; }
  /* Who is online switched off by the owner: the other boxes share the row. */
  .index-foot-narrow { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  /* Open on a desktop, nothing to fold: the heading is a heading. */
  .foot-head { cursor: default; }
  .foot-head::after { display: none; }
}
