/* The site footer (docs/specs/version-footer.md, TICKET-326), on the brand tokens only. It closes the page the way the
   header opens it: header glass with the pink divider, muted text, the lime accent for the commit. */
.site-foot { margin-top: var(--space-6); border-top: 2px solid var(--color-pink); background: var(--color-header-glass);
  color: var(--color-text-muted); font: var(--text-sm)/1.5 var(--font-sans);
  padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom)); }
.site-foot[hidden] { display: none; }
.sf-inner { max-width: var(--page-width); margin: 0 auto; display: grid; gap: var(--space-2); }

/* the version: one tap target that opens the build details */
.sf-build { margin: 0; }
.sf-build summary { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-height: var(--tap-target);
  cursor: pointer; list-style: none; color: var(--color-text); }
.sf-build summary::-webkit-details-marker { display: none; }
/* the disclosure chevron leads the line, so it never wraps away from what it opens on a 390 px phone */
.sf-build summary::before { content: ""; flex: none; width: var(--space-2); height: var(--space-2); margin-right: var(--space-1);
  border-right: 2px solid var(--color-text-muted); border-bottom: 2px solid var(--color-text-muted); transform: rotate(-45deg); }
.sf-build[open] summary::before { transform: translateY(-2px) rotate(45deg); }
.sf-unknown { display: flex; align-items: center; min-height: var(--tap-target); }
.sf-env { padding: 0 var(--space-2); border-radius: var(--radius-pill); background: var(--color-accent-soft); color: var(--color-accent);
  font-size: var(--text-xs); font-weight: var(--weight-semibold); line-height: 1.8; }
.sf-version { font-weight: var(--weight-semibold); }
.sf-note { color: var(--color-text-muted); font-weight: var(--weight-medium); }
.sf-sha { font-family: var(--font-mono); color: var(--color-accent); }
.sf-details { margin-top: var(--space-1); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-line);
  border-radius: var(--radius-md); background: var(--card-fill); }
.sf-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-1) var(--space-3); margin: 0; }
.sf-rows dt { color: var(--color-text-muted); }
.sf-rows dd { margin: 0; color: var(--color-text); font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.8;
  overflow-wrap: anywhere; min-width: 0; }
.sf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }
.sf-status { margin: 0; }

/* the top: the brand on the left, the link columns on the right; stacked on a phone */
.sf-top { display: grid; gap: var(--space-6); grid-template-columns: max-content minmax(0, 1fr); padding: var(--space-4) 0; }
/* the build and credit lines under the email stay one line each on a wide screen; the brand column takes their width */
.sf-brand .sf-credit { white-space: nowrap; }
.sf-brand { display: grid; gap: var(--space-2); align-content: start; }
.sf-logo { margin: 0; font: 400 var(--text-xl)/1 var(--font-display); color: var(--color-pink); }
.sf-tagline { margin: 0; max-width: 34ch; }
.sf-mail { justify-self: start; display: inline-flex; align-items: center; min-height: var(--tap-target); color: var(--color-accent);
  text-decoration: underline; text-underline-offset: 3px; }
.sf-cols { display: grid; gap: var(--space-4) var(--space-6); grid-template-columns: repeat(3, max-content); justify-content: end; }
.sf-links a { white-space: nowrap; }   /* one line per link; the columns take their links' width */
.sf-col-title { margin: 0 0 var(--space-1); color: var(--color-text); font-size: var(--text-xs); font-weight: var(--weight-semibold);
  text-transform: uppercase; letter-spacing: 0.06em; }

/* links: quiet, each a full tap target, underlined on hover */
.sf-links { list-style: none; margin: 0; padding: 0; display: grid; }
.sf-links a { display: inline-flex; align-items: center; min-height: var(--tap-target); color: var(--color-text-muted);
  text-decoration: none; }
.sf-links a:hover, .sf-links a:focus-visible { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }

/* the bottom: copyright, the build, the credits */
.sf-bottom { display: grid; gap: var(--space-2); border-top: 1px solid var(--color-line); padding-top: var(--space-3); }
.sf-copy { margin: 0; color: var(--color-text); }
.sf-credit { margin: 0; font-size: var(--text-xs); }

/* under 1100 px the brand takes its own row above the columns, so its lines still fit on one line each */
@media (max-width: 1100px) {
  .sf-top { grid-template-columns: minmax(0, 1fr); }
  .sf-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: stretch; }
}
/* on a phone they wrap */
@media (max-width: 600px) {
  .sf-brand .sf-credit, .sf-links a { white-space: normal; }
}
@media (max-width: 480px) {
  .sf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the staging Feedback tab sits on the right edge (judge-ui.css): on a phone the footer keeps clear of it */
@media (max-width: 600px) {
  .site-foot { padding-right: calc(var(--space-6) + var(--space-3)); }
}
/* a printed handout or progress sheet carries no footer */
@media print { .site-foot { display: none; } }
