/* Auteur Script Knowledge Base - Custom Design System */

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

:root {
  --as-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --as-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --as-accent-primary: #3b82f6;
  --as-accent-glow: rgba(59, 130, 246, 0.15);
  --as-gold: #f59e0b;
}

body {
  font-family: var(--as-font-sans);
  letter-spacing: -0.011em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

code, pre, kbd, samp {
  font-family: var(--as-font-mono) !important;
  font-variant-ligatures: contextual common-ligatures;
  font-feature-settings: "calt" 1, "liga" 1;
  font-size: 0.88em;
}

/* Navbar & Header Consistency across Light/Dark Themes */
.navbar {
  --bs-navbar-padding-y: 0.5rem;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  min-height: 56px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.quarto-dark .navbar, .quarto-dark .navbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-brand {
  font-weight: 700 !important;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  margin-top: 0;
  margin-bottom: 0;
}

/* Secondary Nav & Breadcrumb Normalization */
.quarto-secondary-nav {
  min-height: 42px;
}

.quarto-secondary-nav .breadcrumb {
  margin-bottom: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  background-color: transparent !important;
}

/* Sidebar styling */
.sidebar nav[role=doc-toc] ul>li>a, 
.sidebar-navigation .sidebar-item-text {
  font-size: 0.88rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.sidebar-navigation .sidebar-section-header {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-top: 1.25rem;
}

/* Tables refinement */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

table th {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem !important;
}

table td {
  padding: 0.75rem 1rem !important;
  font-size: 0.92rem;
  vertical-align: middle;
}

/* Code blocks & pre elements */
div.sourceCode, pre.sourceCode {
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

body.quarto-dark div.sourceCode, body.quarto-dark pre.sourceCode,
.quarto-dark div.sourceCode, .quarto-dark pre.sourceCode {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Callouts modernizing */
.callout {
  border-radius: 8px !important;
  border-left-width: 4px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

/* Math block responsive styling & horizontal overflow scrolling */
.math.display,
span.math.display,
div.math.display,
.katex-display,
.MathJax_Display,
mjx-container[display="true"],
mjx-container {
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
}

span.math.display,
.math.display {
  display: block !important;
  padding: 0.5rem 0 !important;
  margin: 1rem 0 !important;
}

mjx-container[display="true"] {
  padding: 0.25rem 0 !important;
  margin: 0 !important;
}

/* Landing page hero card enhancements */
.panel-tabset .nav-tabs {
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

body.quarto-dark .panel-tabset .nav-tabs,
.quarto-dark .panel-tabset .nav-tabs {
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.panel-tabset .nav-link {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Modern Card Design System for Knowledge Base Explorer & Pillars */
.kb-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 1.35rem 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: rgba(59, 130, 246, 0.35);
}

body.quarto-dark .kb-card, .quarto-dark .kb-card {
  background: rgba(30, 34, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.quarto-dark .kb-card:hover, .quarto-dark .kb-card:hover {
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.kb-card h3, .kb-card h4 {
  margin-top: 0 !important;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kb-card p {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

body.quarto-dark .kb-card p, .quarto-dark .kb-card p {
  color: #9ca3af;
}

.kb-card ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
}

.kb-card ul li {
  margin-bottom: 0.3rem;
}

/* Quarto Grid Spacing & Card Vertical Rhythm */
.grid {
  margin-top: 1.25rem;
  margin-bottom: 1.75rem;
}

/* Pillar Card Styles */
.pillar-card {
  background: linear-gradient(180deg, rgba(243, 244, 246, 0.7) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 1.25rem;
  height: 100%;
}

.pillar-card p:last-child,
.pillar-card ul:last-child {
  margin-bottom: 0;
}

body.quarto-dark .pillar-card, .quarto-dark .pillar-card {
  background: linear-gradient(180deg, rgba(30, 34, 42, 0.9) 0%, rgba(20, 23, 30, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pillar-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  margin-bottom: 0.5rem;
}

body.quarto-dark .pillar-badge, .quarto-dark .pillar-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

/* Hero Section */
.hero-prologue {
  font-size: 1.08rem;
  line-height: 1.7;
  color: #374151;
}

body.quarto-dark .hero-prologue, .quarto-dark .hero-prologue {
  color: #d1d5db;
}

/* Workflow Pipeline Banner Component */
.workflow-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.85) 0%, rgba(240, 253, 244, 0.85) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
}

body.quarto-dark .workflow-pipeline {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(20, 35, 30, 0.7) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.pipeline-node {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

body.quarto-dark .pipeline-node {
  background: rgba(30, 34, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.pipeline-node-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #1e293b;
}

body.quarto-dark .pipeline-node-title {
  color: #f1f5f9;
}

.pipeline-node-sub {
  font-size: 0.76rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 0.15rem;
}

body.quarto-dark .pipeline-node-sub {
  color: #94a3b8;
}

.pipeline-arrow {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--as-accent-primary);
  display: flex;
  align-items: center;
}

.quote-highlight {
  font-family: var(--as-font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: #2563eb;
}

body.quarto-dark .quote-highlight, .quarto-dark .quote-highlight {
  color: #60a5fa;
}

/* Specification Metadata Header Grid */
.spec-header-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem 1.25rem;
  padding: 0.85rem 1.25rem;
  margin: 1.25rem 0 1.75rem 0;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.quarto-dark .spec-header-grid, .quarto-dark .spec-header-grid {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.7);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.spec-header-item {
  display: block;
}

.spec-header-item p {
  margin: 0;
}

.spec-header-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.2rem;
}

body.quarto-dark .spec-header-label, .quarto-dark .spec-header-label {
  color: #94a3b8;
}

.spec-header-val {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
}

body.quarto-dark .spec-header-val, .quarto-dark .spec-header-val {
  color: #f8fafc;
}

.spec-header-val a {
  text-decoration: none;
  color: var(--as-accent-primary);
}

body.quarto-dark .spec-header-val a {
  color: #60a5fa;
}

.spec-header-val a:hover {
  text-decoration: underline;
}

/* Video Wrapper & Top-Right Overlay Link */
.video-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #000;
  margin: 1.5rem auto 0.5rem auto;
}

body.quarto-dark .video-wrapper,
.quarto-dark .video-wrapper {
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.video-wrapper p {
  margin: 0;
}

.video-wrapper .quarto-video {
  margin-bottom: 0;
}

.video-wrapper video {
  border-radius: 12px;
  display: block;
  width: 100%;
}

.video-overlay-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--as-font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  user-select: none;
}

.video-overlay-link {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--as-font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.video-overlay-link:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-1px);
  text-decoration: none;
}

@media (max-width: 576px) {
  .video-overlay-badge,
  .video-overlay-link {
    top: 0.5rem;
    font-size: 0.68rem;
    padding: 0.2rem 0.45rem;
    gap: 0.25rem;
  }
  .video-overlay-badge {
    left: 0.5rem;
  }
  .video-overlay-link {
    right: 0.5rem;
  }
}



