body {
  background-color: lightgrey;
  margin: 8px;
  font-size: 18px;
  font-family: "MS Gothic", monospace;
  line-height: 1.4;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  image-rendering: pixelated;
  height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}



a {
  color: darkred; /* Classic link color */
  text-decoration: none; /* Removes the default underline */
  padding: 2px 5px;
  border: 1.5px dotted grey;
}

a:hover {
  background-color: darkred;
  color: white;

  cursor: pointer;

  border: 1.5px dotted white;
}

/* Menu items — compact to fit text, anchor for floating descriptions */
li.menu-item {
  display: table;
  position: relative;
  width: auto;
  margin-bottom: 5px;
}


/* Tree View Container */
.tree-view {
  list-style-type: none;
  padding-left: 20px;
}

/* 1. Remove horizontal branches from all top-level items */
.tree-view > li::before {
  content: none !important;
}

/* 1. Remove the border and gap from the UL container */
.tree-view ul {
  list-style-type: none;
  padding-left: 0;
  margin-left: 15px; /* Aligns the line under the summary box */
  margin-top: -4px;   /* Pulls the line up to touch the summary box */
  border-left: 10px;  /* Removed so we can control it on the items */
}

/* 2. Update vertical segments to include top padding */
.tree-view ul li {
  position: relative;
  padding-left: 20px;
  border-left: 1px dotted #808080;
  margin: 0;
  /* ADDED: padding-top pushes the box down while keeping the vertical line */
  padding-top: 17px;    
  padding-bottom: 10px; 
}

/* 3. Remove the "tail" from the last item in every list */
.tree-view ul li:last-child {
  border-left: 1px dotted transparent;
}

/* 3. Adjust the "cap" height for the last item */
.tree-view ul li:last-child::after {
  content: "";
  position: absolute;
  top: 0;
  left: -1px;
  /* UPDATED: Increased to 27px to reach the new lower branch position */
  height: 27px; 
  border-left: 1px dotted #808080;
}




/* 4. Lower the horizontal branch connection point */
.tree-view ul li::before {
  content: "";
  position: absolute;
  /* UPDATED: Changed from 12px to 27px to stay centered on the lower box */
  top: 27px;        
  left: 0;
  width: 20px;
  border-top: 1px dotted #808080;
}

/* 6. Tighten the summary box to the tree */
summary {
  display: table;
  padding: 2px 2px;
  text-decoration: none;         /* Remove standard underline */
  border-bottom: 1px dotted #808080; 
  display: inline-block;         /* Ensures the border wraps the text tightly */
  line-height: 1;
  cursor: pointer;
  margin-bottom: 5px; /* Ensures the trunk starts right below the box */
}

//* Hide default browser arrows */
summary { 
  list-style: none; 
}
summary::-webkit-details-marker { 
  display: none; 
}

/* The 'Closed' state symbol */
summary::before {
  content: "+";
  font-family: monospace; /* Keeps the character width consistent */
  color: darkred;
  margin-right: 5px;
}

/* The 'Open' state symbol */
details[open] > summary::before {
  content: "-";
  color: darkred; /* Optional: highlights the symbol when active */
}



/* 4. Ensure the parent list items stay positioned correctly */
.tree-view li {
  list-style-type: none;
  position: relative;
}





/* Optional: Change the border color when the folder is hovered */
summary:hover {
  background-color: darkred;
  color: white;

  cursor: pointer;

  border: 1.5px dotted white;
}


/* Create the side-by-side layout */
.main-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  margin-top: 6px;
  flex: 1;
  align-items: start;
}

/* Layout Container */
.desktop-container {
  display: flex;
  gap: 20px;
  height: 90vh;
}

.sidebar {
  min-width: 180px;
  max-width: 300px;
}

/* The Content Container on the right */
.content-window {
  flex-grow: 1;
  padding: 10px 16px 10px 200px;
  color: black;
  min-height: 450px;
}

#sidebar-status {
  font-size: 0.75em;
  color: #444;
  background: #d4d0c8;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  padding: 2px 6px;
  min-height: 1.6em;
  margin-top: 12px;
  white-space: normal;
}

footer {
  font-size: 0.75em;
  color: #666;
  padding: 12px 8px 24px;
  margin-top: 8px;
}

footer a {
  color: #666;
  border: none;
  padding: 0;
  text-decoration: none;
}

footer a:hover {
  background-color: transparent;
  color: darkred;
  border: none;
}



/* Link Button Styling */
.link-button {
  display: inline-block;
  color: darkred;
  text-decoration: none;
  padding: 2px 6px;
  border: 1px dotted #808080;
  background: none;
  cursor: pointer;
}

.link-button:hover {
  background-color: darkred;
  color: white;
  border: 1px dotted white;
}

/* Retro Typography */
.retro-font {
  font-family: 'MS UI Gothic', monospace;
  font-size: 20px;
}

hr {
  border: none;
  border-top: 1px dotted #808080;
  height: 0;
  margin: 20px 0;
  max-width: 860px;
}

.answer-zone {
  margin: 20px 0;
  display: flex;
  gap: 10px;
}

.question-text {
  font-size: 1.1em;
  min-height: 60px;
}

.assessment-container {
  max-width: 860px;
}

.assessment-container hr {
  border: none;
  border-top: 1px dotted #808080;
  margin: 15px 0;
}



.save-load-zone {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
