/* The Square9 credit under the footer: the stamp Square9 puts on every site it makes (Antony, topic 149 msg 6147,
   3 Nov 2026). It is the Square9 site's button: a face, a hard block 6px behind it with no blur, 12px corners. On hover
   or press the face moves onto its block.
   The look (msg 6488: "White with a thin black line on everything"): a white face with a 2px ink line inside its edge,
   Sleekit's ink block behind it, and black drawings. README.md lists the other looks Antony was shown.
   Its size is the Square9 button's (msg 6271), measured on the Square9 test link: 51px high, 24px each side. One line
   of two drawings, 8px apart (a Square9 button's gap between its label and an icon): "A product of", Tanker at 19px
   with a Square9 button's 0.08em tracking, drawn as outlines so no font file ships, its 14.25px capitals where a
   Square9 button's sit, 17.75px to 32px down the face; then Square9's real logo, the constructed lockup with its tile
   and wordmark as drawn (msgs 6510 and 6513, 4 Nov: "Prefer the actual logo used in the buttons"; never the tile
   beside a separately spaced SQUARE9). The logo is bigger than the label (msg 6517: "the logo needs to be bigger whilst
   keeping the button the same"), 26px high, its capitals' middle on the label's.
   Its space (topic 625 msg 6546, 4 Nov: "standardise spacing above and below the button so that it sits perfectly"):
   32px of clear space above the face, counted from the last ink above it, and 32px below the block, to the page's
   end, at every width, as on every Square9 site. One number, --square9-credit-space. The block hangs 6px out of the
   link, so the bottom padding adds it. --square9-credit-slack is the room the page already leaves under its last ink
   (a link's padding, the rest of its line); it comes off the top, and Sleekit's pages set it at the end of this file.
   A site changes only the custom properties on .square9-credit. Every selector for the stamp itself starts with
   .square9-credit, so these rules win over the old copy in styles.css whatever order the stylesheets load in. */
.square9-credit {
  --square9-credit-face: #ffffff;               /* white; the black words on it: 21:1 */
  --square9-credit-block: #191919;              /* Sleekit's --ink; against the page: 17:1 */
  --square9-credit-edge: 0 0 0 2px #191919;     /* the thin ink line inside the face's edge */
  --square9-credit-art: none;                   /* the drawings are black; invert(1) draws them white */
  --square9-credit-ring: #191919;               /* Sleekit's focus ring: 2px of ink */
  --square9-credit-ring-width: 2px;
  --square9-credit-offset: 6px;                 /* the block behind the face, and how far the face moves on hover */
  --square9-credit-tuck: 1px;                   /* how far the block tucks in under the pressed face, so no dark edge shows round its corners */
  --square9-credit-radius: 12px;                /* Square9's corners */
  --square9-credit-press: 120ms;
  --square9-credit-text: 19.52px;               /* "A product of": Tanker at 19px, capitals 14.25px */
  --square9-credit-logo: 26px;                  /* Square9's logo, tile and wordmark as drawn: its height (msg 6517). Its
                                                   capitals are 18.98px. Change this one number to resize it; it stays
                                                   centred on the label's capitals. */
  --square9-credit-gap: 8px;                    /* between the label and the logo: a Square9 button's gap between its label and an icon */
  --square9-credit-lift: 1.07px;                /* moves the label up onto a Square9 button's capital lines */
  /* moves the logo up so its capitals' middle is the label's, 24.88px down the face. Both drawings have their capitals
     from 0.158 to 0.888 of their height, so their middle is 0.023 of the height below the drawing's own middle; flex
     centring puts the drawings' middles together, and this takes off the difference (1.22px at 26px) */
  --square9-credit-logo-lift: calc(var(--square9-credit-lift) + (var(--square9-credit-logo) - var(--square9-credit-text)) * 0.023);
  --square9-credit-space: 32px;                 /* clear space above the face and below the block (msg 6546) */
  --square9-credit-slack: 0px;                  /* the room the page leaves under its last ink, taken off the top */
  display: flex;
  justify-content: center;
  padding: calc(var(--square9-credit-space) - var(--square9-credit-slack)) 0 calc(var(--square9-credit-space) + var(--square9-credit-offset));
}
.square9-credit .square9-credit__link {
  position: relative;
  display: inline-flex;
  border-radius: var(--square9-credit-radius);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
/* the block stays where it is, so the pointer never loses the link as the face moves */
.square9-credit .square9-credit__link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--square9-credit-block);
  transform: translate(var(--square9-credit-offset), var(--square9-credit-offset));
}
.square9-credit .square9-credit__card {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--square9-credit-gap);
  box-sizing: border-box;
  min-height: 51px;                             /* the Square9 button's height: 16 + 19 + 16 */
  padding: 0 24px;
  border: 0;
  border-radius: inherit;
  background: var(--square9-credit-face);
  box-shadow: inset var(--square9-credit-edge);
  transition: transform var(--square9-credit-press);
}
/* the label's box has the logo's proportions (capitals from 0.158 to 0.888 of its height), so the two line up by their
   capitals' middles */
.square9-credit .square9-credit__label,
.square9-credit .square9-credit__logo {
  position: relative;
  top: calc(-1 * var(--square9-credit-lift));
  display: block;
  height: var(--square9-credit-text);
  width: auto;
  filter: var(--square9-credit-art);
}
.square9-credit .square9-credit__logo {
  top: calc(-1 * var(--square9-credit-logo-lift));
  height: var(--square9-credit-logo);
}
.square9-credit .square9-credit__link:hover .square9-credit__card,
.square9-credit .square9-credit__link:active .square9-credit__card {
  transform: translate(var(--square9-credit-offset), var(--square9-credit-offset));
}
.square9-credit .square9-credit__link:hover::before,
.square9-credit .square9-credit__link:active::before {
  inset: var(--square9-credit-tuck);
}
/* the ring clears the block by 2px, as on the Square9 site's buttons */
.square9-credit .square9-credit__link:focus-visible {
  outline: var(--square9-credit-ring-width) solid var(--square9-credit-ring);
  outline-offset: calc(var(--square9-credit-offset) + 2px);
  border-radius: var(--square9-credit-radius);
}
@media (prefers-reduced-motion: reduce) {
  .square9-credit .square9-credit__card { transition: none; }
}
/* Sleekit's pages: what each kind leaves above the stamp, so the space from the footer's last ink to the face is
   --square9-credit-space and nothing else (msg 6546; measured 4 Nov before this: 45 to 74px above, 26px below).
   The text pages (Help, Privacy, Terms, Download, Buy, Compare and the comparisons): their footer's own bottom padding
   (24px on a phone, 48px wider) goes, and its last line, the underlined support address, ends 2px under its ink. */
.site-footer:has(+ .square9-credit) { padding-bottom: 0; }
.site-footer + .square9-credit { --square9-credit-slack: 2px; }
/* The home page (the One screen): its foot sits at the bottom of a sheet the height of the screen, so its padding
   stays, to keep the first screen as it is, and comes off the stamp's instead: the foot's bottom padding, plus its
   links' 4px padding less the 3px their descenders hang below the line (one.css .foot, .foot-nav a).
   The rebuilt pages (.frame, shared/pages.css) end in the same foot, so they take the same slack. */
.sheet + .square9-credit,
.frame + .square9-credit { --square9-credit-slack: calc(var(--group) + var(--tight) - 3px); }
@media (max-width: 760px) {
  .sheet + .square9-credit,
  .frame + .square9-credit { --square9-credit-slack: calc(max(var(--group), env(safe-area-inset-bottom)) + var(--tight) - 3px); }
}
