/* Monetization hub pages + shared donate CTA */

.btn-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.95rem;
  border: none;
  border-radius: 2px;
  background: #c1121f;
  color: #fff;
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-donate:hover {
  background: #a50e1a;
  color: #fff;
}

.btn-donate-lg {
  padding: 0.85rem 1.35rem;
  font-size: 1.05rem;
  margin-top: 0.75rem;
}

.btn-donate-disabled {
  opacity: 0.72;
  cursor: default;
  pointer-events: none;
}

.mast-donate {
  align-self: flex-end;
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
}

.donate-inline {
  margin: 0.75rem 0 0;
}

.mono-foot-links {
  margin: 0.35rem 0 5.5rem;
  text-align: center;
  font-size: 0.78rem;
}

.mono-foot-links a {
  color: var(--teal, #0f766e);
  text-decoration: none;
}

.mono-foot-links a:hover {
  text-decoration: underline;
}

.page-hub .hub-top {
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  flex: 1 1 auto;
  justify-content: center;
}

.site-nav-link {
  color: var(--muted, #5c6170);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 550;
}

.site-nav-link:hover,
.site-nav-link[aria-current="page"] {
  color: var(--ink, #12141a);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hub-shell {
  position: relative;
  z-index: 1;
  isolation: isolate;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.hub-card {
  background: rgba(243, 239, 230, 0.92);
  border: 1px solid var(--line, rgba(18, 20, 26, 0.12));
  border-radius: 4px;
  padding: 1.35rem 1.25rem 1.5rem;
}

.hub-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c1121f;
}

.hub-card h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display, Syne, sans-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hub-card h2 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1.05rem;
}

.hub-lead {
  margin: 0 0 1rem;
  color: var(--muted, #5c6170);
  font-size: 1.02rem;
  line-height: 1.5;
}

.hub-list {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  line-height: 1.55;
}

.hub-tools {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.hub-tools li {
  border: 1px solid var(--line, rgba(18, 20, 26, 0.12));
  background: rgba(255, 255, 255, 0.55);
  padding: 0.55rem 0.7rem;
  font-weight: 600;
}

.hub-tiers {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.hub-tiers > div {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line, rgba(18, 20, 26, 0.12));
  background: rgba(255, 255, 255, 0.5);
}

.hub-tiers strong {
  font-size: 0.95rem;
}

.hub-tiers span {
  font-size: 0.85rem;
  color: var(--muted, #5c6170);
}

.hub-note {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--muted, #5c6170);
}

.license-link {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
}
.license-link a {
  color: var(--teal, #0f766e);
}

/* Code / legal blocks: contain overflow so footer cannot paint over spilled text */
.hub-code {
  display: block;
  position: relative;
  z-index: 0;
  isolation: isolate;
  margin: 0.75rem 0 0;
  padding: 0.85rem 0.9rem;
  max-width: 100%;
  overflow: auto;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line, rgba(18, 20, 26, 0.12));
  border-radius: 2px;
}

.license-full {
  max-height: 28rem;
  overflow: auto;
  overscroll-behavior: contain;
}

/* Hub pages: footer in normal flow below the card (no library dock clearance) */
.page-hub .foot {
  position: relative;
  z-index: 1;
  margin-top: 0;
  clear: both;
}

.page-hub .foot .mono-foot-links {
  margin: 0.35rem 0 0;
}

@media (max-width: 640px) {
  .hub-tools {
    grid-template-columns: 1fr;
  }
  .site-nav {
    justify-content: flex-start;
    width: 100%;
    order: 3;
  }
}
