/* Nämly content pages (individual name pages + editorial hubs) — brand-matched
   static styling. Mirrors public/legal.css and the app's Phase 64 foundation:
   warm-apricot OKLCH palette, Fraunces (display) + Inter (body), light theme,
   rounded cards. Self-contained so each page works as a plain static file
   served by Firebase Hosting. */

:root {
  --background: oklch(0.981 0.008 75);
  --foreground: oklch(0.31 0.016 65);
  --card: oklch(0.997 0.003 75);
  --primary: oklch(0.755 0.135 62);
  --primary-soft: oklch(0.94 0.04 70);
  --muted-foreground: oklch(0.565 0.02 65);
  --border: oklch(0.922 0.008 70);
  --radius: 18px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 560;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2rem;
}

.brand .ly {
  color: var(--primary);
}

header {
  margin-bottom: 2.5rem;
}

.back-link {
  display: inline-block;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary);
}

/* Breadcrumb (Phase 38.1) — visible trail matching BreadcrumbList JSON-LD */
.crumbs {
  display: block;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.crumbs a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.crumbs a:hover {
  color: var(--primary);
}

.crumbs .crumb-sep {
  margin: 0 0.4rem;
  color: var(--muted-foreground);
  opacity: 0.6;
}

.crumbs [aria-current='page'] {
  color: var(--foreground);
}

/* Name hero */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 560;
  font-size: 2.75rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.gender-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--foreground);
}

.subtitle {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  margin-top: 0.6rem;
}

main {
  flex: 1;
}

section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 560;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

p {
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.05rem;
}

.meaning {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--foreground);
}

ul {
  margin-left: 1.25rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.75;
}

/* Style-tag chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-left: 0;
}

.chips li {
  margin-bottom: 0;
}

.chip {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  text-decoration: none;
  text-transform: capitalize;
}

.chip:hover {
  color: var(--primary);
  border-color: var(--primary);
  opacity: 1;
}

/* Related-names / hub grids of name cards */
.name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin-left: 0;
}

.name-grid li {
  margin-bottom: 0;
}

.name-card {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--foreground);
  transition: border-color 0.2s, transform 0.15s;
}

.name-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  opacity: 1;
}

.name-card .nm {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 560;
  font-size: 1.15rem;
  display: block;
}

.name-card .meta {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  display: block;
  margin-top: 0.15rem;
  text-transform: capitalize;
}

/* Hub index link lists */
.link-list {
  list-style: none;
  margin-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.link-list li {
  margin-bottom: 0;
}

.letter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin-left: 0;
}

.letter-grid li {
  margin-bottom: 0;
}

.letter-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 560;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--foreground);
}

.letter-tile:hover {
  border-color: var(--primary);
  color: var(--primary);
  opacity: 1;
}

/* Call to action */
.cta {
  margin: 2.5rem 0 0;
  padding: 1.75rem;
  background: var(--primary-soft);
  border-radius: var(--radius);
  text-align: center;
}

.cta h2 {
  margin-bottom: 0.5rem;
}

.cta-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--primary);
  color: oklch(0.99 0.005 75);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.cta-button:hover {
  opacity: 0.9;
}

footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

footer a {
  color: var(--muted-foreground);
}

footer a:hover {
  color: var(--primary);
}

.sep {
  opacity: 0.5;
}

@media (max-width: 480px) {
  .container {
    padding: 2rem 1.15rem;
  }
  h1 {
    font-size: 2.1rem;
  }
}
