/* ==========================================================================
   Post licence notice — a tinted block inside the article card (upstream's
   `license-container`, `--license-block-bg`)

   The notice is plain HTML (`h2`, `dl`/`dt`/`dd`, `a`), so the browser's own
   rules would otherwise leak in: heading margins, the 40px `dd` indent and the
   underlined link. Each element starts from `all: initial` and re-declares
   only what it needs — the title needs an explicit `display: block` because
   the initial `display` is `inline`.
   ========================================================================== */
.post-license {
  position: relative; overflow: hidden; margin-top: 2rem;
  padding: 1.4rem 1.5rem; border-radius: var(--radius-md);
  background: var(--btn-regular-bg);
}
.license-watermark {
  position: absolute; right: -1.2rem; bottom: -2rem;
  color: var(--primary); opacity: 0.08; pointer-events: none;
}
:root.dark .license-watermark { opacity: 0.12; }

.post-license .license-title,
.post-license .license-url,
.post-license .license-fields,
.post-license .license-field,
.post-license .license-field dt,
.post-license .license-field dd {
  all: initial;
  box-sizing: border-box;
  display: block;
  font-family: inherit;
  color: var(--deep-text);
}
.post-license .license-title { font-size: 1.15rem; font-weight: 700; line-height: 1.4; }
.post-license .license-url {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.5rem;
  font-size: 0.85rem; color: var(--content-meta); word-break: break-all; cursor: pointer;
}
.post-license .license-url:hover { color: var(--primary); }
.post-license .license-url span { display: inline; }
.post-license .license-fields {
  display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem;
}
/* upstream lays the three fields out in a row from sm up */
@media (min-width: 640px) {
  .post-license .license-fields { flex-direction: row; gap: 1.5rem; }
  .post-license .license-field { flex: 1 1 0; min-width: 0; }
}
.post-license .license-field { display: flex; flex-direction: column; gap: 0.15rem; }
.post-license .license-field dt { font-size: 0.78rem; color: var(--content-meta); }
.post-license .license-field dd { font-size: 0.95rem; font-weight: 600; }
.post-license .license-field dd a {
  all: initial;
  font: inherit; font-weight: 600; color: var(--primary); cursor: pointer;
}
.post-license .license-field dd a:hover { text-decoration: underline; }

/* ==========================================================================
   Pagination
   Upstream's row of square card buttons: chevrons for prev/next, a filled
   primary square for the current page, and ellipsis buttons that turn into a
   jump-to-page input (see partial/pagination.ejs). Below lg the row collapses
   to prev | current / total | next.
   ========================================================================== */
.pagination { display: flex; justify-content: center; }
.pagination-mobile { display: flex; align-items: center; gap: 0.75rem; padding: 0 1rem; }
.pagination-desktop { display: none; align-items: center; gap: 0.75rem; }
@media (min-width: 1024px) {
  .pagination-mobile { display: none; }
  .pagination-desktop { display: flex; }
}
@media (max-width: 640px) { .pagination-mobile { padding: 0 0.5rem; } }
@media (max-width: 480px) { .pagination-mobile { padding: 0 0.25rem; } }

.pagination-btn,
.pagination-num,
.pagination-jump,
.pagination-count {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; flex: 0 0 auto;
  border: none; border-radius: var(--radius-lg);
  background: var(--card-bg); color: var(--text-75);
  font-size: 1rem; font-weight: 700;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.pagination-btn { color: var(--primary); }
.pagination-btn:hover,
.pagination-num:hover,
.pagination-jump:hover,
.pagination-count:hover { background: var(--btn-card-bg-hover); }
.pagination-btn:active,
.pagination-num:active,
.pagination-jump:active { background: var(--btn-card-bg-active); transform: scale(0.85); }
.pagination-num.current { background: var(--primary); color: #fff; }
:root.dark .pagination-num.current { color: rgb(0 0 0 / 0.7); }
.pagination-btn.disabled { color: var(--text-30); opacity: 0.5; pointer-events: none; }
.pagination-jump { padding: 0; cursor: pointer; color: var(--text-75); }
.pagination-jump:hover { color: var(--primary); }

/* mobile: current / total inside one card; the current number is a jump button */
.pagination-count { width: auto; padding: 0 1rem; gap: 0.375rem; }
.pagination-jump-current {
  border: none; background: transparent; padding: 0 0.1rem;
  color: var(--primary); font-size: 1rem; font-weight: 700;
}
.pagination-count-sep { font-size: 0.875rem; color: var(--text-50); }
.pagination-count-total { font-size: 1rem; font-weight: 700; color: var(--text-75); }

/* the jump input takes the place of the button it replaces */
.pagination-jump-input {
  border: none; outline: none; background: transparent; padding: 0;
  color: var(--primary); font: inherit; font-weight: 700; text-align: center;
}
.pagination-desktop .pagination-jump-input {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-lg); background: var(--card-bg);
}
.pagination-desktop .pagination-jump-input:focus { box-shadow: inset 0 0 0 2px var(--primary); }
.pagination-mobile .pagination-jump-input { height: 1.75rem; border-bottom: 2px solid var(--primary); }

