/* The foot: the release line, the copyright notice, and the margin line above them.
 *
 * Copied from holding-site, which stays untouched:
 *   holding-site/assets/css/site.css          the foot, its column, and the narrow layout
 *   holding-site/assets/css/version-control.css the mark's size, the pull, the spent leaf,
 *                                               and the light over the release line
 * The declarations are carried as the source writes them. holding-site orders them in
 * cascade layers; banner-site declares none, so they stand unlayered here in the order
 * the source's layers and link order resolve them: site.css's components, then its
 * adaptive layer, then version-control.css. Every colour is a token from tokens.css.
 *
 * ONE ADAPTATION OF PLACEMENT. In holding-site the foot is the last child of a `.page`
 * that is held to 78rem and padded clamp(1.15rem,3.2vw,2.4rem) on the left and
 * clamp(1.5rem,5.2vw,4rem) on the right. banner-site's `.page` (base.css) is the full
 * width and unpadded, so the foot takes the same column itself, as margins, and its
 * edges land where the source's do at every width. */

/* THE MARGIN LINE, PUBLISHED AS ONE TREATMENT.
 *
 * The rule above the foot is holding-site's `.foot{border-top:1px solid
 * var(--border-hairline)}`: thickness 1px, style solid, colour token --border-hairline
 * (#1f2b3f in the dark palette, #d3d9e4 in the light), opacity 1 -- no opacity, blend
 * or gradient is applied to it anywhere in the source. It is named here as one
 * declaration. The wordmark underline in header.css no longer reads it: by the owner's
 * ruling that underline is 1px solid --border-strong, so it can be seen.
 *   --margin-line-width  1px
 *   --margin-line-style  solid
 *   --margin-line-color  var(--border-hairline)
 *   --margin-line        the three together, as a border shorthand */
:root{--margin-line-width:1px;--margin-line-style:solid;
  --margin-line-color:var(--border-hairline);
  --margin-line:var(--margin-line-width) var(--margin-line-style) var(--margin-line-color)}

/* The source column, given to the foot. */
.foot{--page-max:78rem;
  --page-pad-l:clamp(1.15rem,3.2vw,2.4rem);--page-pad-r:clamp(1.5rem,5.2vw,4rem);
  --page-side:calc((100% - min(var(--page-max),100%)) / 2);
  margin-left:calc(var(--page-side) + var(--page-pad-l));
  font-size:16.5px;line-height:1.6;-webkit-font-smoothing:antialiased}

/* ---------- site.css, the foot ---------- */
.foot{position:relative;z-index:2;border-top:var(--margin-line);
  --foot-shed:1rem;
  padding:calc(.9rem + var(--foot-shed) / 2) 0 calc(1.1rem + var(--foot-shed) / 2);
  display:flex;align-items:center;justify-content:flex-end;
  gap:1rem;flex-wrap:wrap;
  --foot-track:.02em;--foot-rule:0px;--foot-edge:clamp(.5rem,4.2vw - 1.25rem,2rem);
  margin-right:calc(var(--page-side) + var(--page-pad-r) + var(--foot-rule))}
.foot p{margin:0;font-size:.74rem;color:var(--text-faint);
  letter-spacing:var(--foot-track)}
.foot__meta{display:flex;flex-direction:column;align-items:flex-end;gap:0;
  text-align:right;
  margin-right:calc(-1 * (var(--foot-edge) + var(--foot-rule)))}

/* ---------- site.css, the release line ---------- */
/* The track is the width holding-site measured for its longest release, 19 characters.
 * banner-site's release line is 18, so it fits the same track and no edge moves. */
.rel{--rel-slot:1.35em;--rel-gap:.3em;--rel-chars:19;--rel-line:9.79em;
  --rel-track:.1em;display:grid;
  grid-template-columns:var(--rel-slot) var(--rel-line,calc(var(--rel-chars) * 1ch)) var(--rel-slot);
  grid-template-areas:"back line ahead";
  column-gap:var(--rel-gap);align-items:center;
  position:relative;isolation:isolate}
.rel>.step:first-child{grid-area:back}
.rel>.step:last-child{grid-area:ahead}
.step{display:inline-flex;align-items:center;justify-content:center;
  width:var(--rel-slot);height:var(--rel-slot);text-decoration:none;border-radius:50%;
  color:var(--text-faint);line-height:1}
.step:hover{color:var(--text-primary);background:var(--border-hairline)}
.step--none{pointer-events:none}
.rel__v{grid-area:line;justify-self:stretch;min-width:0;text-align:right;
  white-space:nowrap;letter-spacing:var(--rel-track);
  margin-right:calc(-1 * var(--rel-track))}
.foot__meta>.rel{margin-right:calc(-1 * var(--rel-blank))}
.foot__meta>p:not(.rel){margin-right:calc(-1 * var(--foot-track,.02em))}
.mark path{fill:none;stroke:var(--text-faint);stroke-linecap:round;
  stroke-linejoin:round}
.step:hover .mark path{stroke:var(--text-primary)}

/* ---------- site.css, the narrow layout ---------- */
/* At a phone the rule gives up the room instead of the gutter, and the foot keeps the
 * height it had. The source's 900px query moves nothing else in the foot. */
@media (max-width:900px){
  .foot{padding-bottom:calc(1.6rem + var(--foot-shed) / 2);
    --foot-rule:.6rem;--foot-edge:0px}
}

/* ---------- version-control.css ---------- */
.mark{display:block;width:var(--rel-mark,1em);height:var(--rel-mark,1em)}

.rel{--rel-mark:1em;--rel-reach:.98125;
  --rel-blank:calc((var(--rel-slot,1.35em) - var(--rel-mark)) / 2
    + var(--rel-mark) * (1 - var(--rel-reach)))}
.foot__meta>p.rel{margin-right:calc(-1 * var(--rel-blank))}

/* The leaf with nowhere to go. banner-site has one release, so both leaves stand spent:
 * the source's own drawing of a dead end, never a link. */
.step--none{pointer-events:none;--spent-ink:var(--text-faint)}
.step--none .mark{opacity:.55}
@supports (color:color-mix(in oklab,red,blue)){
  .step--none{--spent-ink:color-mix(in oklab,var(--text-faint),var(--surface-ground) 45%)}
  .step--none .mark{opacity:1}
}
.step--none .mark__blade{fill:var(--spent-ink,var(--text-faint,currentColor));stroke:none}
.step--none .mark__stalk{stroke:var(--spent-ink,var(--text-faint,currentColor))}
.step--none .mark__rib,
.step--none .mark__vein{stroke:var(--surface-ground,transparent)}

@media (forced-colors: active){
  .step--none .mark{opacity:1}
  .step--none .mark__blade{fill:GrayText;stroke:none}
  .step--none .mark__stalk{stroke:GrayText}
  .step--none .mark__rib,
  .step--none .mark__vein{stroke:Canvas}
}

/* The light that rises in the release line's letters as a hand nears it. The three
 * numbers it reads (--near, --ax, --ay) are written by assets/js/version-control.js. */
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  @supports (color:color-mix(in oklab,red,blue)) and
            ((background-clip:text) or (-webkit-background-clip:text)) {
    :root:not([data-appearance="light"]) .rel{
      --pool-r0:.6rem; --pool-r1:1.4rem; --pool-peak:1; --pool-midk:.52;
      --pool-stopn:58; --pool-ink:var(--text-primary);
      --pool-r:calc(var(--pool-r0) + var(--pool-r1) * var(--near,0));
      --pool-in:color-mix(in oklab,var(--text-faint),
        var(--pool-ink) calc(var(--near,0) * var(--pool-peak) * 100%));
      --pool-mid:color-mix(in oklab,var(--text-faint),
        var(--pool-ink) calc(var(--near,0) * var(--pool-midk) * 100%));
      --pool-clear:color-mix(in oklab,var(--pool-in) 0%,transparent);
      background-color:var(--text-faint);
      background-image:radial-gradient(circle var(--pool-r)
        at var(--ax,50%) var(--ay,50%),
        var(--pool-in) 0%,var(--pool-mid) calc(var(--pool-stopn) * 1%),
        var(--text-faint) 100%);
      -webkit-background-clip:text;background-clip:text;
      color:var(--pool-clear,var(--text-faint,currentColor))}

    :root:not([data-appearance="light"]) .rel .step{
      color:var(--pool-clear,var(--text-faint,currentColor))}
    :root:not([data-appearance="light"]) .rel .step:hover{color:var(--text-primary)}

    :root:not([data-appearance="light"]) .rel .step:not(.step--none) .mark path{
      stroke:var(--pool-mid,var(--text-faint,currentColor))}
    :root:not([data-appearance="light"]) .rel .step:hover .mark path{stroke:var(--text-primary)}

    :root:not([data-appearance="light"]) .rel .step--none{
      --spent-ink:color-mix(in oklab,var(--pool-mid),var(--surface-ground) 45%)}

    @media (forced-colors: active) {
      :root:not([data-appearance="light"]) .rel{background-image:none;
        background-color:transparent;color:var(--text-faint)}
      :root:not([data-appearance="light"]) .rel .step{color:var(--text-faint)}
      :root:not([data-appearance="light"]) .rel .step:not(.step--none) .mark path{
        stroke:currentColor}
    }

    :root:not([data-appearance="light"]) .rel:has(.step:focus-visible){--near:1}
  }
}
