/* =========================================================
   1. CORE STRUCTURE
   ========================================================= */
   html, body {
    margin: 0; padding: 0; height: 100%; width: 100%;
    font-family: var(--font-main);
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    overflow: hidden; 
  }
  
  /* =========================================================
     2. HEADER SKELETON
     ========================================================= */
  header {
    flex: 0 0 auto;
    height: 75px;
    padding: 0 30px;
    background: var(--bg-dark);
    border-bottom: 2px solid var(--accent-gold);
    display: grid; 
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  }
  
  header::before { content: ""; }
  
  .header-title {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    font-size: 18px;
    /* Change this from var(--parchment) to var(--header-text) */
    color: var(--header-text); 
    text-shadow: none; /* Removed the heavy shadow for the 'Safe' theme */
  }
  
  .header-title span {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    letter-spacing: 1px;
  }
  
  .header-nav {
    display: flex;
    justify-content: flex-end; 
    gap: 12px;
  }
  
  .header-nav a {
    background: var(--nav-btn-bg);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold) !important;
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .header-nav a:hover {
    background: var(--nav-btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 0 8px var(--nav-shadow);
  }
  
  .header-nav a:active {
    transform: scale(0.95);
    background: var(--accent-gold);
    color: var(--bg-dark) !important;
  }
  
  .hamburger { display: none; }
  
  /* =========================================================
     3. MAIN CONTENT SKELETON
     ========================================================= */
  main {
    flex: 1 1 auto;
    overflow-y: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  
  /* =========================================================
     4. FOOTER SKELETON
     ========================================================= */
  footer {
    flex: 0 0 auto;
    display: flex; 
    flex-direction: column; 
    background: var(--map-navy);
    border-top: 2px solid var(--border-stone);
    background: var(--footer-bg); /* Points to the new skin variable */
  }
  
  .footer-row-main {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 15px;
    gap: 20px;
  }
  
  .footer-row-main a {
    background: var(--footer-btn-bg);
    border: 1.5px solid var(--accent-gold);
    /* This ensures the text color is controlled by the skin */
    color: var(--footer-link-color) !important; 
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .footer-row-main a:hover {
    background: var(--footer-btn-hover);
    box-shadow: 0 0 10px var(--nav-shadow);
    transform: translateY(-1px);
  }
  
  .footer-row-main a:active {
    transform: scale(0.95);
    background: var(--accent-gold);
    color: #000;
  }
  
  .footer-ribbon-sub {
    width: 100%;
    border-top: 1px solid var(--ribbon-border);
    padding: 6px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    background: var(--ribbon-bg);
  }
  
  .footer-ribbon-sub a, 
  .footer-copy {
    color: var(--accent-gold) !important;
    text-decoration: none;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
  }
  
  .footer-ribbon-sub a:hover {
    opacity: 1;
    text-decoration: underline;
  }
  
  /* =========================================================
     5. MOBILE RESPONSIVE SKELETON
     ========================================================= */
  @media (max-width: 800px) {
    header {
      display: flex; 
      justify-content: space-between;
      height: 60px;
      padding: 0 15px;
      background: var(--header-bg);
    }
    
    header::before { display: none; } 
    
    .header-nav {
      display: none; 
      flex-direction: column;
      position: absolute;
      top: 60px;
      right: 0;
      background: var(--bg-dark);
      border: 1px solid var(--accent-gold);
      padding: 20px;
    }
    
    .header-nav.active { display: flex; }
    .hamburger {
      display: block;
      background: none;
      border: 1px solid var(--accent-gold); /* The 'Skin' determines the color */
      color: var(--accent-gold);
      font-size: 24px;
      cursor: pointer;
      padding: 4px 10px;
      border-radius: 4px;
      line-height: 1;
      transition: all 0.2s ease;
    }
    
    .hamburger:active {
      transform: scale(0.9);
      background: var(--nav-btn-bg);
    }
  }

  /* =========================================================
   SCROLLBAR SKELETON (Fatter & Tactical)
   ========================================================= */

/* Webkit Browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 14px; /* Increased from 8px for a bolder look */
}

::-webkit-scrollbar-track {
  background: var(--bg-dark); 
  border-left: 1px solid var(--border-stone); /* Adds a subtle structural line */
}

::-webkit-scrollbar-thumb {
  background: var(--accent-gold); 
  border-radius: 4px; /* Slightly more "square" than pill-shaped for a rugged feel */
  /* This 3px border creates the "gap" between the bar and the edge */
  border: 3px solid var(--bg-dark); 
}

::-webkit-scrollbar-thumb:hover {
  background: #e69500; /* A slightly brighter pop on hover */
}

/* Firefox Support */
* {
  scrollbar-width: auto; /* Reverted from 'thin' to default 'auto' width */
  scrollbar-color: var(--accent-gold) var(--bg-dark);
}