/* ============================================================================
 * support.css - the voluntary tip block.
 *
 * One copy, in the hub's assets, and it is linked from every page: the
 * generated topic pages, the thirty-seven subject shells, the hub's home
 * page. It has to look like the rest of the site - the same ink, the same
 * hairlines, the same radii - because a donation box that looks like it was
 * dropped in from somewhere else is the first thing that makes a free site
 * feel like a sales page.
 *
 * The colours come from the variables the rest of the site already defines,
 * with fallbacks, because the landing pages and the hub do not use the same
 * names for the same colour (--paper on one, --card on the other).
 *
 * The button is a real link with a real tap target: 44px of height, which is
 * the smallest size a thumb can hit without aiming.
 * ==========================================================================*/

.support {
  max-width: 820px;
  margin: 30px auto 44px;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--card, var(--paper, #fff));
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 10px);
  box-shadow: 0 1px 2px rgba(22, 32, 46, .04);
}

.support-text {
  flex: 1 1 340px;
  min-width: 0;
}

.support-lead {
  margin: 0 0 4px;
  font-size: .98rem;
  font-weight: 650;
  color: var(--ink, #16202e);
}

.support-note {
  margin: 0;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--ink-2, #47566b);
}

.support-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

.support-btn {
  display: inline-block;
  background: var(--ink, #16202e);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  font-size: .95rem;
  line-height: 1.35;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: 9px;
  text-align: center;
  white-space: nowrap;
}

.support-btn:hover,
.support-btn:focus-visible {
  background: var(--brand-2, #1b4b8f);
  color: #fff;
}

.support-btn:focus-visible,
.support-link:focus-visible {
  outline: 2px solid var(--brand-2, #1b4b8f);
  outline-offset: 2px;
}

.support-qr {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.support-qr img {
  width: 112px;
  height: 112px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
}

.support-qr-cap {
  /* 13px, not 12: the site's own type floor is 12.8px, and a caption is
     still text a student has to read. */
  font-size: .8125rem;
  line-height: 1.3;
  color: var(--ink-3, #5f6e82);
  text-align: center;
  max-width: 124px;
}

/* The one-line link, for a footer that already says something else. */
.support-link {
  color: var(--ink-2, #47566b);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.support-link:hover {
  color: var(--ink, #16202e);
}

/* The hub's home page: the same block, but as a band under the hero. It is
 * visible without being in the way of the subject grid. */
.support.strip {
  max-width: none;
  margin: 26px 0 8px;
  background: var(--wash, var(--bg, #f7f9fb));
  border-color: var(--line-2, #eef1f4);
  box-shadow: none;
}

/* On a phone the block becomes one column, and the button takes the whole
 * width so it cannot be missed or mis-tapped. */
@media (max-width: 640px) {
  .support {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    margin: 24px 0 32px;
  }

  .support-text {
    flex: 1 1 auto;
  }

  .support-actions {
    width: 100%;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 14px;
  }

  .support-btn {
    width: 100%;
  }

  .support-qr img {
    width: 104px;
    height: 104px;
  }
}
