@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-page: #eef2f6;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(180deg, #eef2f6 0%, #dbeafe 50%, #3b82f6 100%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-logo img {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-logo svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.brand-logo span.accent {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.25rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

/* Page Layout Container */
.page-wrapper {
  max-width: 1140px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
}

/* Document Container Card */
.document-card {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 3.5rem 4rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Document Header */
.document-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.document-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.document-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.document-meta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.35rem 0.85rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
}

/* Two Column Layout */
.document-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3.5rem;
  align-items: start;
}

/* Table of Contents Sidebar */
.toc-sidebar {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding-right: 1rem;
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.toc-nav {
  position: relative;
  border-left: 2px solid #f1f5f9;
}

.toc-nav ul {
  list-style: none;
}

.toc-nav li {
  margin-bottom: 0.25rem;
}

.toc-nav a {
  display: block;
  padding: 0.4rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  font-weight: 400;
  line-height: 1.4;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all 0.15s ease;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.toc-nav a:hover {
  color: var(--text-main);
  background-color: #f8fafc;
}

.toc-nav a.active {
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
  background-color: var(--primary-light);
}

/* Main Content Area */
.content-area {
  min-width: 0;
  font-size: 0.975rem;
  color: #334155;
  line-height: 1.75;
}

.content-section {
  scroll-margin-top: 6.5rem;
  margin-bottom: 3rem;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-area h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  scroll-margin-top: 6.5rem;
}

.content-area h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1e293b;
  margin: 1.5rem 0 0.75rem;
  scroll-margin-top: 6.5rem;
}

.content-area p {
  margin-bottom: 1.2rem;
}

.content-area p strong {
  color: #0f172a;
}

.content-area ul, 
.content-area ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.content-area li {
  margin-bottom: 0.5rem;
}

.content-area a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

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

/* Styled Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.styled-table th {
  background-color: #f8fafc;
  color: #0f172a;
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.styled-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.styled-table tr:last-child td {
  border-bottom: none;
}

.styled-table tr:nth-child(even) {
  background-color: #fafafa;
}

/* Callout Box / Info Cards */
.info-card {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.info-card p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #ffffff;
  font-size: 0.875rem;
}

.site-footer a {
  color: #ffffff;
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .document-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .toc-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    padding-right: 0;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
    background: #f8fafc;
  }

  .toc-nav {
    border-left: none;
  }

  .toc-nav a {
    border-left: none;
    border-radius: 6px;
  }

  .document-card {
    padding: 2.5rem 2rem;
  }
}

@media (max-width: 640px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  .document-title {
    font-size: 1.85rem;
  }

  .document-card {
    padding: 1.75rem 1.25rem;
    border-radius: 12px;
  }
}

/* Performance Optimizations */
.content-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 300px;
}

