    /* Base */
    * { box-sizing: border-box; margin: 0; padding: 0; }
    
    body { 
/*       font-family: system-ui, -apple-system, sans-serif;
 */      background: #fafafa;
      color: #1a1a1a;
      line-height: 1.6;
    }

    /* Layout: sidebar + main content */
    .layout {
      display: flex;
      min-height: 100vh;
    }

    /* Floating sidebar */
    .sidebar {
      position: fixed;
      left: 0;
      top: 0;
      width: 320px;
      height: 100vh;
      background: #fff;
      border-right: 1px solid #e0e0e0;
      padding: 6rem 1.5rem 2rem;
      overflow-y: auto;
      z-index: 10;
    }

    /* Sidebar header */
    .sidebar-header {
      margin-bottom: 1.5rem;
      padding-bottom: 1rem;
      border-bottom: 1px solid #e0e0e0;
    }

    .sidebar-header h2 {
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.15em;
      color: #999;
      text-transform: uppercase;
    }

    /* Doc links in sidebar */
    .doc-link {
      display: block;
      padding: 0.75rem 1rem;
      margin: 0.25rem 0;
      border-radius: 6px;
      color: #555;
      font-size: 0.9rem;
      cursor: pointer;
      transition: all 0.15s ease;
      border-left: 3px solid transparent;
    }

    .doc-link:hover {
      background: #f5f5f5;
      color: #1a1a1a;
    }

    .doc-link.active {
      background: #f0f0f0;
      color: #1a1a1a;
      border-left-color: #1a1a1a;
      font-weight: 500;
    }

    /* Main content area - offset for sidebar */
    .main {
      margin-left: 320px;
      flex: 1;
      padding: 2rem 3rem 6rem;
      max-width: 800px;
    }

    /* Content area */
    #content {
      min-height: 50vh;
    }

    /* Empty state */
    .empty-state {
      text-align: center;
      padding: 6rem 2rem;
      color: #999;
    }

    .empty-state p {
      font-size: 1.1rem;
      margin-bottom: 0.5rem;
    }

    .empty-state small {
      font-size: 0.85rem;
    }

    /* Article cards */
    .article {
      background: #fff;
      border: 1px solid #e0e0e0;
      border-radius: 12px;
      padding: 2rem;
      margin-bottom: 1.5rem;
      box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }

    .article::before {
      content: "ARTICLE";
      display: block;
      font-size: 0.65rem;
      font-weight: 600;
      letter-spacing: 0.12em;
      color: #999;
      margin-bottom: 0.75rem;
      text-transform: uppercase;
    }

    .article h2 {
      font-size: 1.5rem;
      font-weight: 600;
      color: #1a1a1a;
      margin-bottom: 1rem;
      line-height: 1.3;
    }

    .article p {
      color: #555;
      margin-bottom: 1rem;
      line-height: 1.7;
    }

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

    /* Loading & error states */
    .loading {
      text-align: center;
      padding: 3rem;
      color: #999;
      font-size: 0.9rem;
    }

    .error {
      background: #fff5f5;
      border: 1px solid #fc8181;
      color: #c53030;
      padding: 1rem 1.25rem;
      border-radius: 8px;
      font-size: 0.9rem;
    }

    /* Mobile: sidebar becomes overlay */
    @media (max-width: 768px) {
      .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 260px;
      }
      
      .sidebar.open {
        transform: translateX(0);
      }
      
      .main {
        margin-left: 0;
        padding: 2rem 1.5rem;
      }
      
      .menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 100;
        background: #fff;
        border: 1px solid #e0e0e0;
        padding: 0.5rem;
        border-radius: 6px;
        cursor: pointer;
      }
    }

    @media (min-width: 769px) {
      .menu-toggle {
        display: none;
      }
    }


    //SIDEBAR SLIDE AWAY
    /* Add to sheet.css */

/* Auto-hiding sidebar for desktop */
@media (min-width: 769px) {
  .sidebar {
    transform: translateX(calc(-100% + 20px)); /* Peek 20px */
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.9;
  }
  
  .sidebar:hover,
  .sidebar.active {
    transform: translateX(0);
    opacity: 1;
  }
  
  /* Visual hint that sidebar exists */
  .sidebar::after {
    content: "›";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  
  .sidebar:hover::after,
  .sidebar.active::after {
    opacity: 0;
  }
  
  /* Adjust main content to use full width when sidebar hidden */
  .main {
    margin-left: 20px; /* Just the peek amount */
    transition: margin-left 0.3s ease;
  }
  
  .sidebar:hover ~ .main,
  .sidebar.active ~ .main {
    margin-left: 320px;
  }
}


//SHEET SWITCHER
 /* Sheet switcher in sidebar */
        .sheet-switcher {
            margin-bottom: 1rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid #e0e0e0;
        }

        .sheet-switcher input {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 0.75rem;
            font-family: monospace;
            margin-bottom: 0.5rem;
        }

        .sheet-switcher input::placeholder {
            color: #999;
        }

        .sheet-switcher button {
            width: 100%;
            padding: 0.5rem;
            background: #1a1a1a;
            color: #fff;
            border: none;
            border-radius: 4px;
            font-size: 0.75rem;
            cursor: pointer;
            transition: background 0.2s;
        }

        .sheet-switcher button:hover {
            background: #333;
        }

        .sheet-switcher button:disabled {
            background: #999;
            cursor: wait;
        }


        /* Add to sheet.css */

/* Sidebar hide/show transition */
.sidebar {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sidebar.is-hidden {
  transform: translateX(calc(-100% + 20px)); /* Keep 20px peek visible */
  opacity: 0.9;
}

/* On mobile, don't auto-hide (use manual toggle instead) */
@media (max-width: 768px) {
  .sidebar.is-hidden {
    transform: translateX(-100%);
  }
}

//new markedown styles , youtube, article blocks
/* Add to sheet.css */

/* Article structure */
.article .doc-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 0.5rem;
}

.article .meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.article .status {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background: #f0f0f0;
}

.article .status.published {
  background: #d4edda;
  color: #155724;
}

.article .status.draft {
  background: #fff3cd;
  color: #856404;
}

.article .tags {
  display: flex;
  gap: 0.5rem;
}

.article .tag {
  color: #2563eb;
}

/* Content blocks */
.article .content > * {
  margin: 1.25rem 0;
}

.article .subtitle {
  font-size: 1.25rem;
  font-style: italic;
  color: #444;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5rem;
}

.article h3 {
  font-size: 1.375rem;
  margin-top: 2rem;
}

.article h4 {
  font-size: 1.125rem;
}

/* Embeds */
.embed-container {
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
}

.embed-youtube {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.embed-youtube iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.embed-image {
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.embed-image img {
  max-width: 100%;
  max-height: 400px;
  height: auto;
  object-fit: contain;
  display: block;
}

.embed-website {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.embed-website:hover {
  background: #e8e8e8;
}

.embed-website .favicon {
  width: 32px;
  height: 32px;
  background: #ddd;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.embed-website .info {
  flex: 1;
  min-width: 0;
}

.embed-website .domain {
  font-size: 0.875rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.table-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table-container th,
.table-container td {
  padding: 0.75rem;
  border: 1px solid #ddd;
  text-align: left;
}

.table-container th {
  background: #f5f5f5;
  font-weight: 600;
}

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

/* Inline code */
code {
  background: #f4f4f4;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}

pre {
  background: #f4f4f4;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}