/* Name pages (/vornamen, /en/baby-names). Tokens and chips come from styles.css. */
.names { padding-bottom: 56px; }

.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-size: 0.875rem; color: var(--text-muted); }
.crumbs li { max-width: none; display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 0.5em; color: var(--border); }
.crumbs a { color: var(--text-muted); display: inline-flex; align-items: center; min-height: 44px; }
.crumbs [aria-current] { color: var(--text); font-weight: 700; }

.phead { padding-block: 8px 8px; }
.phead h1 { margin-bottom: 0.3em; }
.phead.name h1 { font-size: clamp(3.5rem, 1.6rem + 10vw, 7.5rem); line-height: 1; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.phead .lead { margin-top: 20px; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { max-width: none; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 2px solid var(--border);
  border-radius: 999px; color: var(--text); font: 700 0.9375rem var(--sans); text-decoration: none;
}
.tag:hover { background: var(--surface); }
.g-f::before, .g-m::before, .g-u::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; flex: none; }
.g-f::before { background: var(--primary); }
.g-m::before { background: var(--secondary-strong); }
.g-u::before { background: var(--secondary-strong); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }

.meaning { background: var(--surface); border-radius: 28px; border: 2px solid var(--secondary); box-shadow: 0 12px 32px var(--shadow); padding: 8px 24px 28px; margin-top: 32px; }
.meaning h2 { margin-top: 0.8em; font-size: 1.0625rem; font-family: var(--sans); font-weight: 700; color: var(--text-muted); }
.meaning p { margin: 0; font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem); line-height: 1.45; max-width: 36rem; }

.facts { margin: 40px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.facts > div { display: grid; align-content: start; gap: 4px; padding: 16px 20px; border-radius: 20px; background: var(--surface); box-shadow: 0 6px 16px var(--shadow); }
.facts dt { font-size: 0.875rem; font-weight: 700; color: var(--text-muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.block { margin-top: 48px; }
.block h2 { margin-top: 0; font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }
.block .sub { margin: 0 0 8px; font-size: 1rem; }
.plain { color: var(--text-muted); }

.tiles { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.tiles li { max-width: none; }
.tiles a {
  height: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 12px 20px;
  border-radius: 20px; background: var(--surface); box-shadow: 0 6px 16px var(--shadow); color: var(--text);
  font: 600 1.125rem var(--display); text-decoration: none;
}
.tiles a:hover { box-shadow: 0 0 0 2px var(--border); }
.tiles small { font: 400 0.8125rem var(--sans); color: var(--text-muted); }

.names-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.names-list li { max-width: none; }
.names-list a {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name tag" "mean mean" "rank rank"; align-content: start; gap: 4px 12px;
  height: 100%; padding: 14px 18px; min-height: 44px; border-radius: 20px; background: var(--surface); box-shadow: 0 6px 16px var(--shadow);
  border: 2px solid transparent; color: var(--text); text-decoration: none;
}
.names-list a:hover, .names-list a:focus-visible { border-color: var(--border); }
.names-list strong { grid-area: name; font: 600 1.375rem/1.2 var(--display); overflow-wrap: anywhere; }
.names-list .tg { grid-area: tag; display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 700; color: var(--text-muted); }
.names-list .mean {
  grid-area: mean; color: var(--text-muted); font-size: 0.9375rem; line-height: 1.4;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.names-list .rank { grid-area: rank; font-weight: 700; color: var(--primary-strong); }
.names-list .rank:first-child, .names-list strong + .tg + .mean + .rank { margin-top: 2px; }

/* Letter strip: square tiles, count below */
.names .chips { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(3.5rem, 1fr)); }
.names .chip { flex-direction: column; gap: 0; width: 100%; min-height: 56px; padding: 6px 0; border-radius: 14px; font: 600 1.375rem/1.2 var(--display); }
.names .chip small { font-size: 0.75rem; }
.names .chip:focus-visible { outline-offset: 2px; }

/* Popular hub: girls | boys side by side */
@media (min-width: 52rem) {
  .names.pair { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; align-content: start; }
  .names.pair > * { grid-column: 1 / -1; }
  .names.pair > .block:nth-of-type(1), .names.pair > .block:nth-of-type(2) { grid-column: auto; }
  .names.pair .names-list { grid-template-columns: 1fr; }
}

/* Centred moments: name hero and CTA */
.phead.name { text-align: center; }
.phead.name .tags { justify-content: center; }
.phead.name .lead { margin-inline: auto; }
.meaning { text-align: center; }
.meaning p { margin-inline: auto; }

.cta { margin-top: 64px; background: var(--surface); border-radius: 28px; box-shadow: 0 12px 32px var(--shadow); padding: 32px 24px 28px; text-align: center; }
.cta img { display: block; width: 180px; height: auto; margin: 0 auto 8px; }
.cta h2 { margin: 0 0 0.4em; font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }
.cta p { color: var(--text-muted); max-width: 42ch; margin-inline: auto; }
.cta .actions { justify-content: center; }
@media (min-width: 52rem) { .cta { padding: 48px; } }
