:root {
  --ip-shell-paper: var(--paper, var(--surface-page, #f7f1e4));
  --ip-shell-ink: var(--ink, var(--text-primary, #1a140e));
  --ip-shell-muted: var(--ink-3, var(--text-muted, #8a8273));
  --ip-shell-rule: var(--rule, var(--border-default, #d8d1c0));
  --ip-shell-pop: var(--b-pop, var(--accent, #ff4a1c));
  --ip-shell-pine: var(--b-deep, var(--surface-pine, #123a33));
  --ip-shell-display: var(--f-display, var(--p-font-display, "Bricolage Grotesque", sans-serif));
  --ip-shell-body: var(--f-body, var(--p-font-body, "Instrument Sans", sans-serif));
  --ip-shell-mono: var(--f-mono, var(--p-font-mono, "JetBrains Mono", monospace));
  --ip-shell-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon fill='%23000' points='50,1 58.8,24.5 74,19.3 70.2,35.3 94.2,33.9 78,48.5 84.9,58.7 71,61.6 82.4,81.3 63.1,73.6 58.5,90.1 47,74.8 29,93.1 30.9,70.5 18,68.5 24.2,53.2 5.8,37.3 29.3,36 24.1,16.9 41.2,24.5'/%3E%3C/svg%3E");
}

.ip-shell-offset {
  padding-top: 64px;
}

.ip-brand-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(16px, 3vw, 34px);
  color: var(--ip-shell-ink);
  background: color-mix(in srgb, var(--ip-shell-paper) 88%, transparent);
  border-bottom: 1px solid var(--ip-shell-rule);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.ip-shell-menu {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ip-shell-rule);
  border-radius: 8px;
  background: transparent;
  color: var(--ip-shell-ink);
  cursor: pointer;
}

.ip-shell-menu:hover,
.ip-shell-menu:focus-visible {
  background: var(--ip-shell-ink);
  color: var(--ip-shell-paper);
  outline: none;
}

.ip-shell-menu-lines,
.ip-shell-menu-lines::before,
.ip-shell-menu-lines::after {
  width: 16px;
  height: 1.5px;
  display: block;
  background: currentColor;
}

.ip-shell-menu-lines {
  position: relative;
}

.ip-shell-menu-lines::before,
.ip-shell-menu-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.ip-shell-menu-lines::before { top: -6px; }
.ip-shell-menu-lines::after { top: 6px; }

.ip-shell-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.ip-shell-wordmark {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--ip-shell-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.038em;
  font-size: clamp(20px, 2vw, 25px);
}

.ip-shell-burst {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  background: var(--ip-shell-pop);
  -webkit-mask: var(--ip-shell-mark) center / contain no-repeat;
  mask: var(--ip-shell-mark) center / contain no-repeat;
}

.ip-shell-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ip-shell-title {
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid var(--ip-shell-rule);
  color: var(--ip-shell-muted);
  font-family: var(--ip-shell-mono);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 910;
  background: rgba(26, 20, 14, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.ip-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 920;
  width: min(360px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  background: var(--ip-shell-paper);
  color: var(--ip-shell-ink);
  border-right: 1px solid var(--ip-shell-rule);
  box-shadow: 18px 0 46px rgba(26, 20, 14, 0.18);
  transform: translateX(-102%);
  transition: transform 220ms cubic-bezier(.2,.7,.2,1);
}

.ip-sidebar-open .ip-sidebar {
  transform: translateX(0);
}

.ip-sidebar-open .ip-sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.ip-sidebar-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid var(--ip-shell-rule);
}

.ip-sidebar-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--ip-shell-rule);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.ip-sidebar-close:hover,
.ip-sidebar-close:focus-visible {
  background: var(--ip-shell-ink);
  color: var(--ip-shell-paper);
  outline: none;
}

.ip-sidebar-scroll {
  overflow: auto;
  padding: 14px 14px 28px;
}

.ip-sidebar a {
  color: inherit;
  text-decoration: none;
}

.ip-sidebar-root {
  margin-bottom: 4px;
}

.ip-sidebar details {
  border-bottom: 1px solid var(--ip-shell-rule);
}

.ip-sidebar summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
  padding: 12px 5px;
  font-family: var(--ip-shell-mono);
  font-size: 11px;
  color: var(--ip-shell-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ip-sidebar summary::-webkit-details-marker {
  display: none;
}

.ip-sidebar summary::after {
  content: "+";
  color: var(--ip-shell-pop);
  font-size: 16px;
}

.ip-sidebar details[open] summary::after {
  content: "-";
}

.ip-sidebar-list {
  display: grid;
  gap: 2px;
  padding: 0 0 13px;
}

.ip-sidebar-link {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 9px;
  align-items: baseline;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.3;
}

.ip-sidebar-link:hover {
  background: color-mix(in srgb, var(--ip-shell-pop) 8%, transparent);
}

.ip-sidebar-link[aria-current="page"],
.ip-sidebar-link[aria-current="location"] {
  background: var(--ip-shell-ink);
  color: var(--ip-shell-paper);
}

.ip-sidebar-link .ip-code {
  color: var(--ip-shell-muted);
  font-family: var(--ip-shell-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ip-sidebar-link[aria-current] .ip-code {
  color: color-mix(in srgb, var(--ip-shell-paper) 62%, transparent);
}

.ip-sidebar-link .ip-name {
  min-width: 0;
}

@media (max-width: 640px) {
  .ip-brand-shell {
    gap: 11px;
    padding-inline: 12px;
  }

  .ip-shell-title {
    font-size: 10px;
    padding-left: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ip-sidebar,
  .ip-sidebar-backdrop {
    transition: none;
  }
}
