/* LingoFruit Chinese · 灵果中文 — Credits & Licences (/credits/)
 * Layered over /tokens.css and /site.css. */

.credits-hero h1 .zh-title {
  color: var(--accent-mid);
  font-family: var(--font-zh);
  font-size: 0.6em;
  font-weight: 500;
}

.credits-section {
  padding: var(--s-6) 0 var(--s-2);
}

.credits-section + .credits-section {
  border-top: 1px solid var(--rule);
  margin-top: var(--s-6);
}

.credits-section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h2);
  letter-spacing: -0.02em;
  margin: var(--s-2) 0 var(--s-3);
  color: var(--ink);
}

.credits-intro {
  max-width: 68ch;
  color: var(--ink-2);
  margin: 0 0 var(--s-5);
}

.ownership-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}

.own-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}

.own-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h3);
  margin: 0 0 var(--s-3);
  color: var(--ink);
}

.own-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-2);
  display: grid;
  gap: var(--s-2);
  font-size: var(--text-sm);
}

.own-card li strong {
  color: var(--ink);
}

/* ---- Dataset & library cards ---- */
.credit-list {
  display: grid;
  gap: var(--s-4);
}

.credit-list > * { min-width: 0; }

.credit-card {
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}

.credit-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule-soft);
}

.credit-head h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h3);
  margin: 0;
  color: var(--ink);
}

.licence-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-rule);
  border-radius: var(--r-sm);
  padding: 3px 9px;
  white-space: nowrap;
}

.credit-meta {
  display: grid;
  gap: var(--s-2);
  margin: 0;
  font-size: var(--text-sm);
}

.credit-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--s-3);
  align-items: baseline;
}

.credit-row dt {
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.credit-row dd {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.6;
}

.credit-row dd a {
  color: var(--accent);
  font-weight: 500;
}

.credit-row dd code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--ink);
}

.lib-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
}

.lib-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.lib-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
}

.lib-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h3);
  margin: 0;
  color: var(--ink);
}

.lib-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: 1.55;
}

.lib-links {
  margin-top: auto;
  padding-top: var(--s-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  font-size: var(--text-xs);
  font-weight: 600;
}

.lib-links a {
  color: var(--accent);
}

@media (max-width: 820px) {
  .ownership-grid,
  .lib-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .credit-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .credit-card,
  .own-card,
  .lib-card {
    padding: var(--s-4);
  }
}

@media (max-width: 600px) {
  .credit-card a,
  .credit-card code,
  .credit-card .lic {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
