/**
 * Shared font and typography styles for directory N.
 * All modules (bio, books, etc.) must use these variables for consistency.
 * Link this file first, then module-specific stylesheets.
 */
:root {
  /* Font stack – identical for all N modules */
  --n-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Base typography */
  --n-font-size-base: 15px;
  --n-font-size-1rem: 1rem;
  --n-line-height: 1.5;

  /* Font sizes */
  --n-font-size-xs: 0.8125rem;
  --n-font-size-sm: 0.875rem;
  --n-font-size-md: 1rem;
  --n-font-size-lg: 1.125rem;
  --n-font-size-xl: 1.25rem;
  --n-font-size-2xl: 1.5rem;
  --n-font-size-section: 1.15rem;
  --n-font-size-card-title: 0.9375rem;
  --n-font-size-meta: 0.9rem;
  --n-font-size-pagination: 0.9375rem;

  /* Heading hierarchy: H1 > H2 > H3 > H4 > H5 > H6 (used for all pages in n/) */
  --n-heading-h1: 1.75rem;
  --n-heading-h2: 1.5rem;
  --n-heading-h3: 1.15rem;
  --n-heading-h4: 1.125rem;
  --n-heading-h5: 1rem;
  --n-heading-h6: 0.9375rem;

  /* Font weights */
  --n-font-weight-normal: 400;
  --n-font-weight-medium: 500;
  --n-font-weight-semibold: 600;
  --n-font-weight-bold: 700;

  /* Text colors */
  --n-color-text: #1a1a1a;
  --n-color-text-heading: #111;
  --n-color-text-body: #333;
  --n-color-text-secondary: #555;
  --n-color-text-muted: #666;
  --n-color-text-meta: #64748b;
  --n-color-link: #0366d6;
  --n-color-link-hover: #2563eb;
  --n-color-price: #0f172a;
}

/* Base scope for N content – apply when modules live inside #main-content or own wrapper */
#main-content,
.author-bio-main-section,
.author-bio-wrapper,
#author-books {
  font-family: var(--n-font-family);
  font-size: var(--n-font-size-base);
  line-height: var(--n-line-height);
  color: var(--n-color-text);
}

/* Heading hierarchy: base sizes for h1–h6 so H1 > H2 > H3 > H4 > H5 > H6 everywhere in n/ */
#main-content h1,
.publisher-main-section h1,
.index-main h1,
.book-detail h1,
.author-bio-wrapper h1,
#author-books h1,
.author-books h1 {
  margin: 0;
  font-size: var(--n-heading-h1);
  font-weight: var(--n-font-weight-bold);
  letter-spacing: -0.02em;
  color: var(--n-color-text-heading);
}

#main-content h2,
.publisher-main-section h2,
.index-main h2,
.book-detail h2,
.author-bio-wrapper h2,
#author-books h2,
.author-books h2 {
  margin: 0;
  font-size: var(--n-heading-h2);
  font-weight: var(--n-font-weight-bold);
  letter-spacing: -0.02em;
  color: var(--n-color-text-heading);
}

#main-content h3,
.publisher-main-section h3,
.index-main h3,
.book-detail h3,
.author-bio-wrapper h3,
#author-books h3,
.author-books h3 {
  margin: 0;
  font-size: var(--n-heading-h3);
  font-weight: var(--n-font-weight-bold);
  color: var(--n-color-text-heading);
}

#main-content h4,
.publisher-main-section h4,
.index-main h4,
.book-detail h4,
.author-bio-wrapper h4,
#author-books h4,
.author-books h4 {
  margin: 0;
  font-size: var(--n-heading-h4);
  font-weight: var(--n-font-weight-bold);
  color: var(--n-color-text-heading);
}

#main-content h5,
.publisher-main-section h5,
.index-main h5,
.book-detail h5,
.author-bio-wrapper h5,
#author-books h5,
.author-books h5 {
  margin: 0;
  font-size: var(--n-heading-h5);
  font-weight: var(--n-font-weight-bold);
  color: var(--n-color-text-heading);
}

#main-content h6,
.publisher-main-section h6,
.index-main h6,
.book-detail h6,
.author-bio-wrapper h6,
#author-books h6,
.author-books h6 {
  margin: 0;
  font-size: var(--n-heading-h6);
  font-weight: var(--n-font-weight-bold);
  color: var(--n-color-text-heading);
}

/* H1: author bio name (author_id.php) – same as book.php .book-detail-title; must beat #main-content h1 */
#main-content .author-bio-wrapper .author-bio .author-bio-name {
  margin: 0 0 1rem;
  font-size: var(--n-heading-h1);
  font-weight: var(--n-font-weight-bold);
  letter-spacing: -0.02em;
  color: var(--n-color-text-heading);
  line-height: 1.25;
}

/* H2: books section title */
.author-books-title {
  margin: 0;
  font-size: var(--n-heading-h2);
  font-weight: var(--n-font-weight-bold);
  letter-spacing: -0.02em;
  color: var(--n-color-text-heading);
}

/* Shared H3 section heading (bio sections) */
.author-bio-wrapper .author-bio .author-bio-section-title {
  font-size: var(--n-heading-h3);
  font-weight: var(--n-font-weight-bold);
  color: var(--n-color-text-heading);
}

/* Shared H3 card title (books list item title – smaller for layout, still H3) */
.author-books-item h3.author-books-title-book {
  margin: 0;
  font-size: var(--n-font-size-card-title);
  font-weight: var(--n-font-weight-semibold);
  line-height: 1.35;
  font-family: var(--n-font-family);
}
