/* Component styles */


/* Header Logo */
.header-logo {
  display: block;
  padding: var(--space-4);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

@media (prefers-color-scheme: dark) {
  .header-logo {
    color: var(--color-gray-100);
  }
  
  .header-logo:hover {
    color: var(--color-yellow-300);
  }
}

.header-logo-short {
  display: block;
}

.header-logo-full {
  display: none;
}

@media (min-width: 768px) {
  .header-logo-short {
    display: none;
  }
  
  .header-logo-full {
    display: block;
  }
}

/* Header Links */
.header-link {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.header-link--external {
  display: none;
}

@media (min-width: 768px) {
  .header-link--external {
    display: inline-block;
  }
}

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

/* Header Breadcrumb */
.header-breadcrumb {
  display: none;
  align-items: center;
  height: 3rem;
  gap: var(--space-4);
}

.header-breadcrumb--active {
  display: flex;
}

.header-breadcrumb-separator {
  color: var(--border-primary);
}

.header-breadcrumb-current {
  color: var(--text-secondary);
}

.header-breadcrumb-wrapper {
  display: flex;
  align-items: center;
  height: 3rem;
}

.header-breadcrumb-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--space-4);
  color: var(--link-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--border-primary);
  transition: all 0.15s ease;
}

.header-breadcrumb-link:hover {
  color: var(--link-hover);
  text-decoration-color: var(--border-secondary);
}

/* Constrained Width Content */
.constrained-content {
  max-width: var(--max-w-readable);
  width: 100%;
  margin: 0 auto;
}



/* Timestamp */
.timestamp {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm-height);
}


/* Homepage */
.homepage-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.homepage-intro {
  /* No default styles, relies on children */
}

.homepage-title {
  font-weight: 600;
  font-size: var(--text-3xl);
  line-height: var(--text-3xl-height);
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .homepage-title {
    font-size: var(--text-4xl);
    line-height: var(--text-4xl-height);
  }
}

@media (prefers-color-scheme: dark) {
  .homepage-title {
    color: var(--color-gray-100);
  }
}

.homepage-description {
  margin-top: var(--space-6);
}


/* Welcome Page */
.welcome-section {
  flex-grow: 1;
  align-items: stretch;
}

.welcome-container {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.welcome-content {
  display: flex;
  flex-direction: column-reverse;
  flex-wrap: nowrap;
  height: 100%;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
}

.welcome-header {
  text-align: center;
}

.welcome-title {
  font-size: var(--text-xl);
  line-height: var(--text-xl-height);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .welcome-title {
    font-size: var(--text-2xl);
    line-height: var(--text-2xl-height);
  }
}

.welcome-description {
  font-size: var(--text-lg);
  line-height: var(--text-lg-height);
}

@media (min-width: 768px) {
  .welcome-description {
    font-size: var(--text-xl);
    line-height: var(--text-xl-height);
  }
}

/* 404 Error Page */
.error-section {
  flex-grow: 1;
  align-items: stretch;
}

.error-container {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.error-content {
  display: flex;
  flex-direction: column-reverse;
  flex-wrap: nowrap;
  height: 100%;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
}

.error-header {
  text-align: center;
}

.error-title {
  font-size: var(--text-xl);
  line-height: var(--text-xl-height);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .error-title {
    font-size: var(--text-2xl);
    line-height: var(--text-2xl-height);
  }
}

.error-description {
  font-size: var(--text-lg);
  line-height: var(--text-lg-height);
}

@media (min-width: 768px) {
  .error-description {
    font-size: var(--text-xl);
    line-height: var(--text-xl-height);
  }
}

/* Topics Pages */
.topics-header {
  /* Default styles from parent */
}

.topics-title {
  font-weight: 600;
  font-size: var(--text-3xl);
  line-height: var(--text-3xl-height);
  color: var(--text-primary);
}

@media (min-width: 1024px) {
  .topics-title {
    font-size: var(--text-4xl);
    line-height: var(--text-4xl-height);
  }
}

@media (prefers-color-scheme: dark) {
  .topics-title {
    color: var(--color-gray-100);
  }
}

.topics-list {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.topic-title {
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: var(--text-xl-height);
  color: var(--text-primary);
}

@media (prefers-color-scheme: dark) {
  .topic-title {
    color: var(--color-gray-100);
  }
}

.topic-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.topic-posts {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Individual Topic Page */
.topic-intro {
  /* Default styles from parent */
}

.topic-page-title {
  font-weight: 600;
  font-size: var(--text-3xl);
  line-height: var(--text-3xl-height);
  color: var(--text-primary);
}

@media (min-width: 1024px) {
  .topic-page-title {
    font-size: var(--text-4xl);
    line-height: var(--text-4xl-height);
  }
}

@media (prefers-color-scheme: dark) {
  .topic-page-title {
    color: var(--color-gray-100);
  }
}

.topic-description {
  margin-top: var(--space-8);
}

.topic-posts-section {
  /* Default styles from parent */
}

.topic-posts-list {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
}

.topic-posts-list > * {
  border-top: 2px solid var(--color-gray-100);
}

.topic-posts-list > *:first-child {
  border-top: none;
}

@media (prefers-color-scheme: dark) {
  .topic-posts-list > * {
    border-top-color: var(--color-gray-700);
  }
}


/* Legal Pages */
.legal-header {
  /* Default styles from parent */
}

.legal-title {
  font-weight: 600;
  font-size: var(--text-3xl);
  line-height: var(--text-3xl-height);
  color: var(--text-primary);
}

@media (min-width: 1024px) {
  .legal-title {
    font-size: var(--text-4xl);
    line-height: var(--text-4xl-height);
  }
}

@media (prefers-color-scheme: dark) {
  .legal-title {
    color: var(--color-gray-100);
  }
}

.legal-updated {
  margin-top: var(--space-4);
  color: var(--color-gray-500);
  font-size: var(--text-sm);
  line-height: var(--text-sm-height);
}

@media (prefers-color-scheme: dark) {
  .legal-updated {
    color: var(--color-gray-300);
  }
}

.legal-content {
  margin-top: var(--space-8);
}