/* StudyKit site footer.
   One code-rendered footer for every public page. Scoped to .sk-footer so it
   cannot leak into the theme or the tool UI. */

/* The Blocksy footer widget area is empty (its only widget is a <style> tag with
   no markup). Hide the empty container rather than leaving a 1px rule and a
   second contentinfo landmark above the real footer. */
body #footer.ct-footer {
  display: none;
}

.sk-footer {
  --skf-bg:      #faf9f6;
  --skf-ink:     #111111;
  --skf-body:    #414141;
  --skf-muted:   #6c6862;
  --skf-rule:    #dedbd6;
  --skf-strong:  #c9c4bb;

  background: var(--skf-bg);
  border-top: 1px solid var(--skf-rule);
  color: var(--skf-body);
  font-family: "StudyKit Sans", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[data-sk-scheme="dark"] .sk-footer {
  --skf-bg:      #1b1826;
  --skf-ink:     #f1ecf7;
  --skf-body:    #cfc7dd;
  --skf-muted:   #a79fb8;
  --skf-rule:    #3d3650;
  --skf-strong:  #4c4466;
}

.sk-footer *,
.sk-footer *::before,
.sk-footer *::after { box-sizing: border-box; }

.sk-footer p,
.sk-footer ul,
.sk-footer h2 { margin: 0; padding: 0; }

.sk-footer ul { list-style: none; }

.sk-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  /* 24px, not 32px, so the columns line up with the theme content edge above
     (the page container is 1132px with its own padding, and 32px put the
     footer text 8px in from it). The narrow breakpoint matches the theme
     padding too. */
  padding: 0 24px;
}

/* The theme keeps a 20px gutter until its 1132px content column fits, then
   centres it. Matching that switch is what keeps the footer columns on the
   same edge as the page above at every width. */
@media (max-width: 1171px) {
  .sk-footer__inner { padding: 0 20px; }
}

.sk-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr);
  gap: 56px;
  padding: 52px 0 44px;
}

.sk-footer__mark {
  display: inline-block;
  color: var(--skf-ink);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-decoration: none;
}

.sk-footer__mark:hover { text-decoration: underline; text-underline-offset: 4px; }

.sk-footer__tagline {
  max-width: 34ch;
  margin-top: 12px !important;
  color: var(--skf-body);
  font-size: 14px;
  line-height: 1.65;
  text-wrap: pretty;
}

.sk-footer__all {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 18px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--skf-strong);
  color: var(--skf-ink);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}

.sk-footer__all span {
  display: inline-block;
  transition: transform 120ms ease;
}

.sk-footer__all:hover span { transform: translateX(3px); }

.sk-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

html body .sk-footer h2.sk-footer__head {
  color: var(--skf-muted);
  font-family: "StudyKit Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.sk-footer__head {
  margin-bottom: 14px !important;
  color: var(--skf-muted);
  font-family: "StudyKit Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sk-footer__list {
  display: grid;
  /* 1px, not 9px: the links below carry 4px of vertical padding for the tap
     target, and the gap gives back what the padding adds. */
  gap: 1px;
  font-size: 14px;
}

/* 17px-tall text links are below the 24px minimum target size (WCAG 2.5.8), and
   the footer carries twelve of them on every page. Padding-block plus the
   reduced grid gap above takes each to 25px without moving anything visible. */
html body .sk-footer__list a,
html body .sk-footer__base a {
  display: block;
  padding-block: 4px;
}

/* 24px is the floor, not the target: at 200% zoom a 24px link is 12 CSS
   pixels of hit area, so the standalone "All 44 tools" link gets 28. */
html body .sk-footer a.sk-footer__all {
  padding-block: 2px;
}

/* html prefix: the site's dark-scheme link rule is more specific than a single
   class, and would otherwise turn these links bright blue at small sizes. */
html body .sk-footer__list a {
  color: var(--skf-body);
  text-decoration: none;
}

html body .sk-footer a.sk-footer__mark,
html body .sk-footer a.sk-footer__all {
  color: var(--skf-ink);
}

html body .sk-footer__list a:hover {
  color: var(--skf-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.sk-footer a:focus-visible {
  outline: 2px solid var(--skf-ink);
  outline-offset: 3px;
  border-radius: 1px;
}

.sk-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 24px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--skf-rule);
  color: var(--skf-muted);
  font-size: 12.5px;
}

.sk-footer__meta { color: var(--skf-muted); }

@media (max-width: 900px) {
  .sk-footer__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding: 40px 0 34px;
  }

  .sk-footer__tagline { max-width: 48ch; }
}

@media (max-width: 760px) {

  .sk-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }
}

@media (max-width: 420px) {
  .sk-footer__base { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .sk-footer__all span { transition: none; }
}
