/* CreesPop public site — sidebar v2-light */
:root {
  --void: #f7faf7;
  --sidebar: #eef3ef;
  --fg: #142118;
  --tx: #1a2420;
  --dim: #2f4f3c;
  --accent: #0b6b3c;
  --line: rgba(20, 32, 24, 0.16);
  --hover: rgba(11, 107, 60, 0.08);
  --active: rgba(11, 107, 60, 0.14);
  --focus: #0b6b3c;
  --scrim: rgba(20, 32, 24, 0.32);
  --drawer-shadow: 8px 0 28px rgba(20, 32, 24, 0.16);
  --side-w: 256px;
  --top-h: 56px;
  --pad: 20px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html {
  background: var(--void);
  color: var(--tx);
  font-family: var(--font);
  color-scheme: light;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
body.layout {
  display: flex;
  flex-direction: column;
}
.shell {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.skip {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--void);
  background: var(--fg);
}
.skip:focus {
  position: relative;
  left: auto;
  top: auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  min-height: 44px;
  padding: 10px 16px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  flex: 0 0 auto;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.topbar { display: none; }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--scrim);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.scrim[hidden] { display: none; }

#sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: var(--side-w);
  height: auto;
  align-self: stretch;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 28px var(--pad) 24px;
  overflow-y: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.2;
}
.brand span {
  font-style: normal;
  color: var(--accent);
}
.brand-top { margin-left: auto; padding: 0 12px; font-size: 14px; }
.brand[aria-current="page"] { /* wordmark is home; no extra chrome */ }

.side-head {
  margin: 0 0 36px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

nav ul { list-style: none; margin: 0; padding: 0; }

.section-btn,
.sub-btn,
.sub a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--tx);
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  border-radius: 4px;
}

.section-btn {
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.sub-btn { justify-content: space-between; gap: 12px; }
.sub-btn,
.sub a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--tx);
}

.section-btn:hover,
.sub-btn:hover,
.sub a:hover { background: var(--hover); color: var(--fg); }
.section-btn:active,
.sub-btn:active,
.sub a:active { background: var(--active); }

.sub a[aria-current="page"],
a.section-btn[aria-current="page"] {
  color: var(--fg);
  background: var(--hover);
  box-shadow: inset 2px 0 0 var(--accent);
}

.nav-block + .nav-block { margin-top: 12px; }

.section-btn:focus-visible,
.sub-btn:focus-visible,
.sub a:focus-visible,
.brand:focus-visible,
.menu-btn:focus-visible,
.skip:focus-visible,
.scrim:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.skip:focus-visible { outline-offset: -2px; outline-color: var(--void); }

.chev {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  flex: none;
}
.section-btn[aria-expanded="true"] .chev,
.sub-btn[aria-expanded="true"] .chev { transform: translateY(2px) rotate(225deg); }

.sub { margin: 4px 0 0; padding: 0 0 0 8px; }
.sub[hidden] { display: none; }
.sub-nested { margin: 2px 0 0 10px; padding-left: 8px; border-left: 1px solid var(--line); }
.sub-nested a { font-size: 13.5px; }

#main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: auto;
  background: var(--void);
}
#main:focus { outline: none; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.bars,
.bars::before,
.bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  content: "";
}
.bars::before { position: absolute; top: -6px; }
.bars::after { position: absolute; top: 6px; }

body.no-scroll { overflow: hidden; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .topbar {
    display: flex;
    align-items: center;
    flex: 0 0 var(--top-h);
    height: var(--top-h);
    z-index: 40;
    padding: 0 8px;
    margin: 0;
    background: var(--sidebar);
    border-bottom: 1px solid var(--line);
  }
  #main { flex: 1 1 auto; min-height: 0; }
  #sidebar {
    position: fixed;
    top: var(--top-h);
    left: 0;
    bottom: 0;
    height: auto;
    width: min(var(--side-w), 86vw);
    z-index: 30;
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, visibility 0s linear 0.28s;
  }
  #sidebar.is-open {
    transform: none;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.28s ease, visibility 0s;
    box-shadow: var(--drawer-shadow);
  }
}

@media (min-width: 861px) {
  .topbar { display: none; }
  .scrim { display: none !important; }
  #sidebar {
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sidebar,
  #sidebar.is-open { transition: none !important; }
}
