.colours-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.85rem 0.4rem 0.4rem;
  background: #fff;
  color: #0f766e;
  font-weight: 750;
  box-shadow: 0 12px 28px rgba(15, 60, 55, 0.2);
  cursor: pointer;
  transition: transform 180ms ease;
}
.colours-btn img { height: 36px; width: 36px; }
.colours-btn:hover { transform: translateY(-3px); }
.colours-panel {
  position: fixed;
  right: 1rem;
  bottom: 4.6rem;
  z-index: 80;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(70vh, 28rem);
  overflow: auto;
  padding: 0.45rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(15, 60, 55, 0.2);
  transform-origin: bottom right;
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}
.colours.is-open .colours-panel {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s;
}
.colours-swatch {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 0.8rem;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
}
.colours-swatch:hover { background: #f3fbf9; }
.colours-dots { display: inline-flex; gap: 0.2rem; }
.colours-dots i {
  display: block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
}
.colours-copy { display: flex; flex-direction: column; }
.colours-copy strong { color: #134e4a; font-size: 0.92rem; }
.colours-copy small { color: #3f6f6a; }

body.has-pill-chrome {
  --sidebar-float-w: 248px;
  --sidebar-float-gap: 1rem;
  --sidebar-rail: calc(var(--sidebar-float-gap) + var(--sidebar-float-w) + var(--sidebar-float-gap));
}
body.has-pill-chrome.theme-school { padding-top: 7.4rem; }
body.has-pill-chrome .app-frame { min-height: 0; }
body.has-pill-chrome.no-sidebar { background: var(--page-bg, #fff); }

body.has-pill-chrome #sidebarMenu {
  top: calc(7.4rem + 0.65rem);
  left: var(--sidebar-float-gap);
  width: var(--sidebar-float-w);
  height: calc(100vh - 7.4rem - 1.5rem);
  background: #fff;
  color: #134e4a;
  border: 1px solid #d7efe9;
  border-radius: 1.35rem;
  box-shadow: 0 18px 40px rgba(15, 60, 55, 0.12);
  overflow: auto;
}
body.has-pill-chrome #sidebarMenu.sidebar {
  box-shadow: 0 18px 40px rgba(15, 60, 55, 0.12);
}
body.has-pill-chrome #sidebarMenu .sidebar-sticky { padding: 0.95rem 0.8rem 1.15rem; }
body.has-pill-chrome #sidebarMenu .sidebar-school {
  color: var(--header, #0f766e);
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.15rem 0.7rem 0.7rem;
}
body.has-pill-chrome #sidebarMenu .sidebar-control-bar { padding: 0 0.15rem 0.75rem; }
body.has-pill-chrome #sidebarMenu .sidebar-pin,
body.has-pill-chrome .sidebar-show-toggle {
  color: var(--header, #0f766e);
  background: #f3fbf9;
  border: 1px solid #d7efe9;
  border-radius: 999px;
  box-shadow: none;
}
body.has-pill-chrome #sidebarMenu .sidebar-pin:hover,
body.has-pill-chrome .sidebar-show-toggle:hover { background: #e7f7f4; }
body.has-pill-chrome .sidebar-show-toggle { box-shadow: 0 12px 28px rgba(15, 60, 55, 0.16); }
body.has-pill-chrome #sidebarMenu .nav-item + .nav-item { margin-top: 0.2rem; }
body.has-pill-chrome #sidebarMenu .nav-link {
  color: #134e4a;
  border-radius: 0.95rem;
  padding: 0.55rem 0.8rem;
  font-weight: 650;
}
body.has-pill-chrome #sidebarMenu .nav-link:hover,
body.has-pill-chrome #sidebarMenu .nav-link:focus {
  color: var(--header, #0f766e);
  background: #e7f7f4;
}
body.has-pill-chrome #sidebarMenu .nav-link.active {
  color: #fff;
  background: var(--header, #0f766e);
  font-weight: 750;
}
body.has-pill-chrome #sidebarMenu .sidebar-group {
  background: #f7fcfb;
  border: 1px solid #d7efe9;
}
body.has-pill-chrome #sidebarMenu .sidebar-group[aria-expanded="true"] {
  background: #e7f7f4;
  border-color: #b7e4db;
}
body.has-pill-chrome #sidebarMenu .sidebar-nested {
  margin: 0.35rem 0 0.2rem 0.35rem;
  padding: 0.25rem 0 0.25rem 0.55rem;
  border-left: 2px solid #d7efe9;
}
body.has-pill-chrome #sidebarMenu .sidebar-nested .nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 0.8rem;
  padding: 0.42rem 0.7rem;
}

@media (min-width: 861px) {
  body.has-pill-chrome:not(.no-sidebar):not(.sidebar-autohide) #sidebarMenu {
    position: fixed;
    flex: 0 0 var(--sidebar-float-w);
  }
  body.has-pill-chrome:not(.no-sidebar):not(.sidebar-autohide) .app-frame__main {
    margin-left: var(--sidebar-rail);
    width: calc(100% - var(--sidebar-rail));
    flex: 0 0 auto;
  }
  body.has-pill-chrome:not(.no-sidebar):not(.sidebar-autohide) .pill-strip-inner,
  body.has-pill-chrome:not(.no-sidebar):not(.sidebar-autohide) .pill-wrap {
    width: calc(min(1180px, 100% - var(--sidebar-rail)) - 2.5rem);
    margin-left: calc(var(--sidebar-rail) + max(0px, (100% - var(--sidebar-rail) - 1180px) / 2) + 1.25rem);
    margin-right: auto;
  }
  body.has-pill-chrome:not(.no-sidebar):not(.sidebar-autohide) .pill-footer {
    margin-left: var(--sidebar-rail);
  }
  body.has-pill-chrome:not(.no-sidebar):not(.sidebar-autohide) .pill-footer-main,
  body.has-pill-chrome:not(.no-sidebar):not(.sidebar-autohide) .pill-copy p {
    width: calc(min(1180px, 100%) - 2.5rem);
    margin-left: calc(max(0px, (100% - 1180px) / 2) + 1.25rem);
    margin-right: auto;
  }
  body.has-pill-chrome.sidebar-autohide #sidebarMenu {
    left: var(--sidebar-float-gap);
  }
}

body.edu-public.has-pill-chrome .pill-header .container,
body.edu-public.has-pill-chrome .pill-footer .container {
  max-width: 1140px;
  padding-top: 0;
  padding-bottom: 0;
}

@media (max-width: 991px) {
  body.has-pill-chrome.theme-school { padding-top: 6.6rem; }
  body.has-pill-chrome #sidebarMenu {
    top: calc(6.6rem + 0.65rem);
    height: calc(100vh - 6.6rem - 1.5rem);
    border-right: 0;
  }
}

@media (max-width: 860px) {
  body.has-pill-chrome #sidebarMenu {
    left: var(--sidebar-float-gap);
    width: min(84vw, 300px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .colours-btn,
  .colours-panel { transition: none; }
  .colours-btn:hover { transform: none; }
}
