/* Links page – category cards with external links (used by links.html).
   !important only where the site's style.css forces sizes/spacing on sections, headings and lists. */

/* ---------- Jump chips ---------- */
.link-jump { margin: 0 0 28px; }
.link-jump ul {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin: 0 !important; padding: 0 !important; list-style: none;
}
.link-jump li { margin: 0 !important; padding: 0 !important; }
.link-jump li::before { content: none !important; }
.link-jump a {
  display: inline-flex; align-items: center; min-height: 36px;
  padding: 6px 14px;
  font-size: 14px; font-weight: 600; line-height: 1.2;
  color: #1b3a6b; text-decoration: none;
  background: #eef2f7; border: 1px solid #d5deea; border-radius: 999px;
}
.link-jump a:hover { background: #dfe6ef; text-decoration: underline; }
.link-jump a:focus-visible { outline: 2px solid #1b3a6b; outline-offset: 2px; }

/* ---------- Card layout (masonry: cards pack into columns, no empty gaps) ---------- */
.link-grid {
  column-width: 340px;
  column-gap: 24px;
}

.link-card {
  display: inline-block;                 /* with break-inside, keeps a card in one column */
  width: 100%;
  break-inside: avoid;
  padding: 0 !important;                 /* site style.css pads every <section> by 60px */
  margin: 0 0 24px !important;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d5deea;
  border-top: 4px solid #1b3a6b;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(16, 36, 70, .06);
  scroll-margin-top: 120px;              /* keeps the heading clear of the sticky header after a jump */
}

.link-card-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 !important;
  padding: 14px 18px !important;
  font-size: 18px !important; font-weight: 700 !important; line-height: 1.3 !important;
  color: #1b3a6b !important;
  background: #f4f7fb;
  border-bottom: 1px solid #e3e9f1;
}
.link-card-title::before {               /* small "globe" mark */
  content: ""; flex: 0 0 20px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b3a6b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.5 3.8 5.5 3.8 9s-1.3 6.5-3.8 9c-2.5-2.5-3.8-5.5-3.8-9S9.5 5.5 12 3z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.link-count {
  margin-left: auto;
  min-width: 28px; padding: 2px 9px;
  font-size: 13px; font-weight: 700; text-align: center;
  color: #fff; background: #1b3a6b; border-radius: 999px;
}

/* ---------- Link list ---------- */
.link-list { margin: 0 !important; padding: 6px 0 !important; list-style: none; }
.link-list li { margin: 0 !important; padding: 0 !important; border-bottom: 1px solid #eef1f5; }
.link-list li:last-child { border-bottom: 0; }
.link-list li::before { content: none !important; }

.link-list a {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px;
  padding: 10px 18px;
  color: #1a1a1a; text-decoration: none;
}
.link-list a:hover { background: #f4f7fb; }
.link-list a:hover .link-name { text-decoration: underline; color: #1b3a6b; }
.link-list a:focus-visible { outline: 2px solid #1b3a6b; outline-offset: -2px; background: #f4f7fb; }

.link-text { flex: 1 1 auto; min-width: 0; }
.link-name {
  display: block;
  font-size: 16px; font-weight: 600; line-height: 1.35;
  color: #1b3a6b;
}
.link-url {
  display: block; margin-top: 2px;
  font-size: 13px; line-height: 1.3;
  color: #4a5563;                         /* 7.5:1 on white */
  overflow-wrap: anywhere;
}
.link-list a::after {                    /* external-link arrow */
  content: ""; flex: 0 0 16px; height: 16px; opacity: .7;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b3a6b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") no-repeat center / contain;
}
.link-list a:hover::after { opacity: 1; }

abbr[title] { text-decoration: none; cursor: help; }
