    :root {
      --bg: #f8fafc;
      --card: #ffffff;
      --text: #1f2937;
      --muted: #6b7280;
      --primary: #0f172a;
      --accent: #2563eb;
      --border: #e5e7eb;
      --highlight: #fef3c7;
      --highlight2: #f8f9fa;
      --shadow: 0 4px 16px rgba(0,0,0,0.06);
      --radius: 16px;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Arial, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.6;
    }

    .layout {
      display: grid;
      grid-template-columns: 280px 1fr;
      min-height: 100vh;
    }

    .sidebar-container {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 24px;
      background: var(--primary);
      color: white;
      overflow-y: auto;
    }

    .sidebar h2 {
      margin-top: 0;
      font-size: 1.25rem;
    }

    .sidebar-links a {
      display: block;
      color: #dbeafe;
      text-decoration: none;
      padding: 10px 12px;
      margin: 6px 0;
      border-radius: 10px;
    }

    .sidebar-links a:hover {
      background: rgba(255,255,255,0.08);
    }

    .external-site-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    }


    .main {
      padding: 40px;
      max-width: 1100px;
    }

    .hero {
      background: var(--card);
      border-radius: var(--radius);
      padding: 32px;
      box-shadow: var(--shadow);
      margin-bottom: 24px;
    }

    .hero h1 {
      margin: 0;
      font-size: 2rem;
    }

    .subtitle {
      color: var(--muted);
      margin-top: 8px;
    }

    .update-box {
      background: var(--highlight);
      border-left: 5px solid #f59e0b;
      padding: 20px;
      border-radius: 12px;
      margin: 24px 0;
    }

    .side-note {
      background: var(--highlight2);
      border-left: 5px solid #adb5bd;
      padding: 20px;
      border-radius: 12px;
      margin: 24px 0;
      font-size: 0.9rem;
    }

    .section-card {
      background: var(--card);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 24px;
      margin-bottom: 20px;
    }

    details {
      border: 1px solid var(--border);
      border-radius: 12px;
      margin-top: 16px;
      overflow: hidden;
      background: white;
    }

    summary {
      padding: 16px 20px;
      font-weight: bold;
      cursor: pointer;
      background: #f9fafb;
    }

    .rule-content {
      padding: 20px;
      border-top: 1px solid var(--border);
    }

    .important-rule {
      background: #eff6ff;
      border-left: 4px solid var(--accent);
      padding: 16px;
      border-radius: 10px;
      margin: 16px 0;
    }

    ul.clean-list {
      padding-left: 20px;
    }

    ol.clean-list{
      padding-left: 5px;
    }

    ol.alpha-list{
      list-style-type: lower-alpha;
    }

    ol.roman-list{
      list-style-type: lower-roman;
    }

    .rule-text-container{
      display: flex;
      align-items: flex-start;
      gap: 12px;
    }

    .rule-row {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 10px;
    }
    .rule-no {
      font-weight: bold;
      min-width: 25px; /* Adjust this if you have 3-digit numbers like 101 */
      color: var(--primary);
      flex-shrink: 0;
    }
    .rule-text {
      flex: 1;
      line-height: 1.5;
    }

    #no-bull li {
      list-style-type: none;
      margin-bottom: 6px;
    }

    .download-container {
      display: flex;
      gap: 15px;
      margin-bottom: 30px;
      flex-wrap: wrap;
    }
    .download-btn {
      display: inline-flex;
      align-items: center;
      padding: 12px 20px;
      border-radius: 6px;
      text-decoration: none;
      font-weight: bold;
      font-size: 0.95rem;
      transition: transform 0.2s, background-color 0.2s;
      border: none;
      cursor: pointer;
    }
    .pdf-main {
      background-color: #2e7d32;
      color: white;
    }
    .pdf-sub {
      background-color: #1565c0;
      color: white;
    }

    .download-btn:hover {
      transform: translateY(-2px);
      filter: brightness(1.1);
      color: white; /* Ensures text stays white on hover */
    }

    .download-btn .icon {
      margin-right: 10px;
      font-size: 1.2rem;
    }

    .handbook-img{
        max-width: 100%; 
        height: auto; 
        display: block;
        margin: 15px auto; 
        border: 1px solid #ddd;
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);       
        cursor: pointer;
        transition: 0.3s;
    }

    .handbook-image:hover{
      opacity: 0.8;
      transform: scale(1.02);
    }

    .image-modal{
      display: none;
      position: fixed;
      z-index: 3000;
      padding-top: 50px;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0,0,0,0.9);
    }

    .modal-content{
      margin: auto;
      display: block;
      width: 80%;
      max-width: 1000px;
      border: 3px solid white;
      border-radius: 8px;
    }

    .close-modal{
      position: absolute;
      top: 15px;
      right: 25px;
      color: #f1f1f1;
      font-size: 60px;
      font-weight: bold;
      cursor: pointer;
      z-index: 3001;
      line-height: 1;
      user-select: none;
    }

    /* Handbook Table Styles */
    .handbook-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.9rem;
    background-color: white;
    }

    .handbook-table th {
    background-color: #2e7d32; /* GCL Green */
    color: white;
    text-align: left;
    padding: 10px;
    }

    .handbook-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    }

    /* Zebra striping for easy reading */
    .handbook-table tr:nth-child(even) {
    background-color: #f9f9f9;
    }

    /* Mobile Fix: Allow table to scroll sideways if too wide */
    .table-container {
    overflow-x: auto;
    display: block;
    }
    
    .text-center { text-align: center; }


   /* @media (max-width: 900px) {
      .layout {
        grid-template-columns: 1fr;
      }

      .sidebar {
        position: relative;
        height: auto;
      }

      .main {
        padding: 20px;
      }
    } */


/* 1. Desktop Layout (Default) */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar-container {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--primary);
  z-index: 100;
}

.menu-toggle, .close-btn { display: none; }

/* 2. Mobile Layout Fix */
@media (max-width: 768px) {
  .layout {
    display: block; /* Break the grid so main content is 100% width */
  }

  .sidebar-container {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    transform: translateX(-100%); /* Hide off-screen */
    transition: transform 0.3s ease;
    z-index: 2000;
  }

  .sidebar-container.active {
    transform: translateX(0); /* Slide in */
  }

  .menu-toggle {
    display: block;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    background: #2e7d32; /* GCL Green */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  }

  .close-btn {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    float: right;
  }

  .main {
    padding: 80px 20px 20px 20px; /* Space for the fixed menu button */
    width: 100%;
  }

  #handbook-sections {
    padding-top: 0; /* Reset previous padding fix */
  }
}