/* ==========================================================================
   DOCS PAGE STYLES (Redesigned & Modernized)
   ========================================================================== */

.pb-0 {
  padding-bottom: 0;
}
.text-center {
  text-align: center;
}

.documentation-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 4rem;
}
@media (min-width: 768px) {
  .documentation-layout {
    flex-direction: row;
    gap: 4rem;
    align-items: stretch;
  }
}

/* Sidebar Navigation */

/* Mobile Docs Toggle & Accordion (<768px) */
.mobile-docs-toggle {
  display: none;
}

@media (max-width: 767px) {
  .mobile-docs-toggle {
    display: flex;
    align-items: center;
    /* Removed width: 100% to prevent overflow, let flex stretch it naturally */
    box-sizing: border-box;
    margin: 0 0.375rem; /* MATCHES .doppel-shell padding exactly so it aligns with .doppel-core */
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
    margin-bottom: -1rem;
    font-family: inherit;
  }
  
  .mobile-docs-toggle span {
    flex-grow: 1;
    text-align: left;
    margin-left: 0.75rem;
  }
  
  .mobile-docs-toggle .chevron-icon {
    transition: transform 0.3s ease;
  }
  
  .mobile-docs-toggle[aria-expanded="true"] .chevron-icon {
    transform: rotate(180deg);
  }
  
  .documentation-sidebar {
    display: none;
  }
  
  .documentation-sidebar.is-open {
    display: block;
    animation: docsSidebarFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0.375rem 0 0.375rem;
  }
}

@keyframes docsSidebarFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.documentation-sidebar {
  width: 100%;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .documentation-sidebar {
    width: 260px;
  }
}

.sidebar-sticky {
  position: static;
  max-height: none;
  padding-right: 0;
}
@media (min-width: 768px) {
  .sidebar-sticky {
    position: sticky;
    top: 7rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    padding-right: 0.5rem;
  }
}

.sidebar-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .sidebar-nav {
    flex-direction: column;
    flex-wrap: nowrap;
  }
}

.sidebar-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: all 0.25s var(--ease-fluid);
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  background: var(--neutral);
  border: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}
@media (min-width: 768px) {
  .sidebar-link {
    font-size: 0.95rem;
    padding: 0.6rem 0.85rem 0.6rem 1rem;
    background: transparent;
    border: none;
    border-left: 2px solid transparent;
  }
}

.nav-num {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-right: 0.6rem;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
  color: var(--text-main);
  background: var(--neutral);
  transform: translateX(3px);
}

.sidebar-link:hover .nav-num {
  opacity: 0.8;
}

.sidebar-link.active {
  color: var(--text-main);
  font-weight: 600;
  border-color: var(--accent);
}
@media (min-width: 768px) {
  .sidebar-link.active {
    background: rgba(99, 102, 241, 0.12);
    border-left: 3px solid var(--accent);
    box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.05);
  }
}

.sidebar-link.active .nav-num {
  opacity: 1;
  color: var(--accent);
  font-weight: 700;
}

/* Main Content Area */
.documentation-content {
  flex-grow: 1;
  min-width: 0;
}

.content-core {
  padding: 1.25rem 1rem;
}
@media (min-width: 480px) {
  .content-core {
    padding: 2rem;
  }
}
@media (min-width: 1024px) {
  .content-core {
    padding: 4rem;
  }
}

.documentation-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
  scroll-margin-top: 6rem;
}

.documentation-section:first-child {
  padding-top: 0;
}

.section-badge {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.documentation-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
@media (min-width: 480px) {
  .documentation-section h2 { font-size: 1.85rem; }
}
@media (min-width: 768px) {
  .documentation-section h2 { font-size: 2.25rem; }
}

.documentation-section h3 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.documentation-section p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 65ch;
  text-wrap: pretty;
}

.documentation-section code,
.styled-list code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.9em;
  background: var(--neutral);
  color: #38bdf8;
  padding: 0.2em 0.5em;
  border-radius: 0.35em;
  border: 1px solid var(--hairline);
}

.styled-list {
  color: var(--text-muted);
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.styled-list li {
  margin-bottom: 0.75rem;
}

.styled-list li strong {
  color: var(--text);
}

/* Tool Pills */
.tool-pills {
  display: flex;
  gap: 0.75rem;
  flex-direction: column;
  width: 100%;
  margin-top: 1.5rem;
}
@media (min-width: 480px) {
  .tool-pills {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
  }
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0.6rem;
  background: #14151a;
  border: 1px solid var(--hairline);
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease-snappy), border-color 0.2s ease, background-color 0.2s ease;
}
@media (min-width: 480px) {
  .tool-pill {
    width: auto;
    justify-content: flex-start;
  }
}

.tool-pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
}

.tool-icon {
  color: var(--accent);
}

/* Terminal & Code Blocks */
.code-step {
  margin-top: 1.5rem;
}

.step-label {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
}

.terminal-block {
  background: #0d0e12;
  border: 1px solid var(--hairline);
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.25rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.terminal-block:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.2rem;
  background: #15161c;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-family);
  font-weight: 500;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 8px #6366f1;
  display: inline-block;
}

.output-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.terminal-badge {
  font-size: 0.72rem;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-copy {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 0.45rem;
  font-size: 0.75rem;
  font-family: var(--font-family);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: var(--neutral);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-copy.copied {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #10b981;
}

.terminal-block pre {
  padding: 1.25rem;
  overflow-x: auto;
  margin: 0;
  line-height: 1.6;
}

.terminal-block pre code {
  background: none;
  border: none;
  padding: 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  color: #e2e8f0;
  font-size: 0.95rem;
  display: block;
}

.output-block pre code {
  color: #a1a1aa;
}

/* Callouts / Notes */
.callout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-left: 4px solid var(--accent);
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  align-items: flex-start;
}
@media (min-width: 480px) {
  .callout {
    flex-direction: row;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
  }
}

.callout-icon {
  color: var(--accent);
  flex-shrink: 0;
  padding-top: 0.1rem;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.callout-content strong {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.callout-content p {
  margin: 0;
  font-size: 0.96rem;
  color: #cbd5e1;
  line-height: 1.6;
  max-width: none;
}

.timeline-steps {
  position: relative;
  margin-top: 2.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--hairline);
  margin-left: 1rem;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2.25rem;
}

.timeline-item.last-item {
  padding-bottom: 0;
}

.timeline-number {
  position: absolute;
  left: -1.5rem;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  transform: translateX(-50%);
  background: var(--secondary);
  border: 2px solid var(--accent);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-glow), 0 0 0 6px var(--background);
  transition: transform 0.2s var(--ease-snappy), background 0.2s ease;
}

.timeline-item:hover .timeline-number {
  transform: translateX(-50%) scale(1.08);
  background: #232430;
}

.finish-badge {
  background: var(--accent);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.65), 0 0 0 6px var(--background);
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.timeline-example {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #14151b;
  padding: 0.4rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid var(--hairline);
  font-size: 0.92rem;
  margin-top: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.example-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.timeline-desc {
  font-size: 0.95rem !important;
  color: var(--text-muted);
  margin-bottom: 0 !important;
}

.documentation-divider {
  border: 0;
  height: 1px;
  background: var(--hairline-subtle);
  margin: 3rem 0;
}

/* Responsive max-width blocks removed in favor of mobile-first */

/* Responsive overrides for Docs */
@media (max-width: 1023px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 50;
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
}
/* Prevent aggressive split border from overflowing */
.dual-boot-card, .split-border {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
/* Ensure touch targets for nav links */
.sidebar-nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
}
