/* 
 * AXIOMHOST.NG EDITORIAL CSS SYSTEM
 * Version: 2026.01
 * Purpose: Unified editorial design system for knowledge graph pages
 */

/* Import Homepage Base */
@import url('homepage.css');

/* Typography Scale - Optimized for Reading */
:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --line-height-reading: 1.75;
  --line-height-tight: 1.4;
  
  /* Spacing System */
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  
  /* Content Width */
  --content-max: 780px;
  --reading-optimal: 17px;
  
  /* Colors - Subtle, Editorial */
  --bg-primary: #ffffff;
  --bg-alt: #f8fafc;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --border-subtle: #e2e8f0;
  --accent-neutral: #64748b;
}

/* Body - Reading Optimized */
body {
  font-family: var(--font-primary);
  font-size: var(--reading-optimal);
  line-height: var(--line-height-reading);
  color: var(--text-primary);
  background: var(--bg-primary);
}

/* Paragraph Constraints */
.content-container p,
.content-block p {
  max-width: 100%;
  margin-bottom: 1.5rem;
  max-height: 4 lines; /* Visual guide for paragraph length */
}

/* Section Pattern - Alternating Backgrounds */
.section {
  background: var(--bg-primary);
  padding: var(--space-8) 0;
}

.section-alt {
  background: var(--bg-alt);
  padding: var(--space-8) 0;
}

/* Section Header */
.section-header {
  max-width: var(--content-max);
  margin: 0 auto var(--space-8);
  padding: 0 var(--space-4);
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
  line-height: var(--line-height-tight);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0;
}

/* Content Container - Reading Width */
.content-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Content Grid */
.content-grid {
  display: grid;
  gap: var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.content-block {
  max-width: 100%;
}

/* AI Summary Box - Citation Optimized */
.ai-summary-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  padding: var(--space-6);
  margin: var(--space-8) 0;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.ai-summary-box h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
}

.ai-summary-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-summary-box li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  font-size: 1rem;
  line-height: var(--line-height-reading);
  color: var(--text-muted);
}

.ai-summary-box li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-neutral);
  font-weight: 600;
}

/* Related Resources Widget */
.related-resources {
  margin-top: var(--space-6);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.resource-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: var(--space-4);
}

.resource-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--space-4);
}

.resource-item h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.resource-item h3 a:hover {
  text-decoration: underline;
}

.resource-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: var(--line-height-reading);
}

/* FAQ Accordion - Collapsed by Default */
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: var(--space-4) 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  color: var(--accent-neutral);
}

.faq-answer {
  display: none; /* Collapsed by default */
  padding: 0 0 var(--space-6);
  font-size: 1rem;
  line-height: var(--line-height-reading);
  color: var(--text-muted);
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-icon {
  font-size: 1.5rem;
  color: var(--accent-neutral);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* Mobile-First Design */
@media screen and (max-width: 320px) {
  :root {
    --reading-optimal: 16px;
    --space-4: 0.75rem;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .resource-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .resource-grid {
    grid-template-columns: 1fr;
  }
}

/* Technical Tables */
.technical-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: 0.95rem;
}

.technical-table th,
.technical-table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.technical-table th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-alt);
}

.technical-table td {
  color: var(--text-muted);
}

/* Performance Metrics */
.metric-value {
  font-weight: 600;
  color: var(--text-primary);
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Hidden AI Context */
.ai-context {
  display: none;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 8px 16px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Focus States */
a:focus,
button:focus {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   Update Component - Infrastructure Updates
   ========================================================================== */

.update-card {
  background: var(--bg-primary);
  border: 2px solid var(--accent-color);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin: var(--space-8) 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

.update-card:hover {
  box-shadow: var(--shadow-md);
}

.update-card h3 {
  margin-top: 0;
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
  color: var(--text-primary);
}

.update-card p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-accent);
  text-decoration: none;
  font-weight: var(--font-medium);
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0.02));
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.read-more-link:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
  transform: translateY(-2px);
}

/* ==========================================================================
   Technical Tables - Accessible & Responsive
   ========================================================================== */

.technical-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: 0.95rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.technical-table caption {
  caption-side: top;
  text-align: left;
  padding: var(--space-4) 0;
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-base);
}

.technical-table th,
.technical-table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.technical-table th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-alt);
  position: sticky;
  top: 0;
  z-index: 10;
}

.technical-table td {
  color: var(--text-muted);
}

.technical-table tr:hover {
  background: var(--bg-tertiary);
}

.technical-table tr:last-child td {
  border-bottom: none;
}

/* Responsive Tables */
@media screen and (max-width: 768px) {
  .technical-table {
    font-size: 0.85rem;
  }

  .technical-table th,
  .technical-table td {
    padding: var(--space-3);
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
  }

}

/* Performance Metrics */
.metric-value {
  font-weight: 600;
  color: var(--text-primary);
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}
