* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #f9f9f9;
  color: #222;
  font-size: 18px;
}

.layout {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg, #0C9990); /* per-page color */
  color: #fff;
  padding: 32px 24px;

  box-shadow: 6px 0 24px rgba(0,0,0,0.35);
  position: relative;
  z-index: 2;

  /* min-height: 100vh;   /* force full height */
  height: 100%;
}

.sidebar h1 {
  margin-top: 0;
  font-size: 2rem;
  letter-spacing: 0.5px;
}

.sidebar p {
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}

.sidebar--placeholder {
  /* keeps the space + color so there’s no jump */
  background: #fff !important; 
}

#sidebar-holder {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;

  width: 260px;
  background: var(--sidebar-bg, #0C9990);
  box-shadow: 6px 0 24px rgba(0,0,0,0.35);
  z-index: 10;
}

/* Sidebar content just fills the holder */
#sidebar-holder .sidebar {
  background: transparent;
  width: 100%;
  height: 100%;
  padding: 32px 24px;
}

.nav { margin-top: 32px; }

.nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  margin: 10px 0;
  opacity: 0.9;
}

.nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Main content */
.content {
  flex: 1;
  padding: 60px 60px;
  background: #fff;
  position: relative;
  z-index: 1;
  margin-left: 260px;
}

.content h2 { margin-top: 0; font-size: 2.2rem; }
.content p { max-width: 700px; line-height: 1.7; color: #444; }
.section { margin-top: 40px; }

.footnote {
  position: relative;
  cursor: help;
  color: #050796;
  font-size: 0.75em;
  vertical-align: super;
  margin-left: 1px;
  margin-right: 0;
  line-height: 1;
}

.footnote-text {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 140%;
  transform: translateX(-50%);
  width: 220px;

  background: #111;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;

  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  z-index: 10;
}

/* show on hover or keyboard focus */
.footnote:hover .footnote-text,
.footnote:focus .footnote-text {
  display: block;
}

/* smart phones */
@media (max-width: 800px) {

  /* Stack instead of side-by-side */
  .layout {
    flex-direction: column;
  }

  /* Sidebar becomes a top bar */
  .sidebar {
    width: 100%;
    min-height: auto;
    box-shadow: none;
  }

  /* Reduce padding for small screens */
  .content {
    margin-left: 0;
    padding: 28px 20px;
  }

  /* Make text a bit smaller but readable */
  body {
    font-size: 16px;
  }

  /* Sidebar holder stops being fixed-left */
  #sidebar-holder {
    position: relative;   /* or: static */
    width: 100%;
    height: auto;
    box-shadow: none;
  }

  /* Sidebar content spacing */
  #sidebar-holder .sidebar {
    padding: 20px 18px;
    height: auto;
  }

  /* Optional: nav links can sit in a row on mobile */
  .nav a {
    display: inline-block;
    margin: 8px 10px 0 0;
  }
}
