#drawer-hub {
  position: relative;
  z-index: 0;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 96px 0;
  isolation: isolate;
  contain: paint;
  background: #07090c;
  color: #f6f8fa;
}

#drawer-hub::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: clamp(220px, 32vh, 360px);
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, #0d1117 0%, rgba(10, 14, 20, 0.96) 38%, rgba(7, 9, 12, 0.72) 68%, rgba(7, 9, 12, 0) 100%),
    radial-gradient(ellipse at 34% 0%, rgba(88, 166, 255, 0.1), transparent 68%);
}

#drawer-hub::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(180px, 26vh, 320px);
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to top, #0d1117 0%, rgba(10, 14, 20, 0.94) 34%, rgba(7, 9, 12, 0.62) 68%, rgba(7, 9, 12, 0) 100%),
    radial-gradient(ellipse at 66% 100%, rgba(126, 231, 135, 0.06), transparent 64%);
}

#drawer-hub + footer {
  border-top: 0;
}

.drawer-bg-container,
.drawer-gridline {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.drawer-bg-container {
  z-index: 0;
  transform: translate3d(0, 0, 0) scale(1.04);
}

.drawer-gridline {
  z-index: 1;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.drawer-bg-item {
  position: absolute;
  inset: -4%;
  opacity: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 28%, var(--drawer-glow), transparent 32%),
    linear-gradient(135deg, var(--drawer-bg-a), var(--drawer-bg-b));
  transform: scale(1.08);
  will-change: opacity, transform, clip-path;
}

.drawer-bg-item.is-active {
  opacity: 1;
}

.drawer-bg-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 12, 0.9) 0%, rgba(7, 9, 12, 0.46) 42%, rgba(7, 9, 12, 0.84) 100%),
    linear-gradient(to bottom, rgba(7, 9, 12, 0.16), rgba(7, 9, 12, 0.9));
  z-index: 2;
}

.drawer-preview {
  position: absolute;
  right: clamp(24px, 7vw, 112px);
  top: 50%;
  width: min(48vw, 680px);
  min-width: 360px;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 12, 16, 0.72);
  box-shadow: 0 32px 120px rgba(0, 0, 0, 0.52);
  transform: translateY(-50%) rotateX(4deg) rotateY(-8deg);
  transform-origin: center;
  overflow: hidden;
  z-index: 1;
}

.drawer-preview::before {
  content: "";
  display: block;
  height: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 18px 18px, #ff5f57 0 5px, transparent 6px),
    radial-gradient(circle at 38px 18px, #febc2e 0 5px, transparent 6px),
    radial-gradient(circle at 58px 18px, #28c840 0 5px, transparent 6px),
    rgba(255, 255, 255, 0.045);
}

.preview-lines {
  display: grid;
  gap: 14px;
  padding: 28px;
}

.preview-line {
  display: block;
  height: 10px;
  width: var(--line-width);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--drawer-accent), rgba(255, 255, 255, 0.24));
  opacity: var(--line-opacity);
}

.preview-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  padding: 0 28px 28px;
}

.preview-card {
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent),
    rgba(255, 255, 255, 0.035);
}

.preview-card:last-child {
  min-height: 88px;
  align-self: end;
}

.drawer-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
  padding-left: clamp(24px, 3vw, 48px);
  padding-right: clamp(260px, 28vw, 520px);
}

#drawer-hub .drawer-content {
  width: 100vw;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
  padding-left: clamp(24px, 3vw, 48px);
  padding-right: clamp(260px, 28vw, 520px);
}

.drawer-heading {
  max-width: 520px;
  margin-bottom: 32px;
}

.drawer-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  line-height: 0.92;
  font-weight: 760;
}

.drawer-lede {
  max-width: 520px;
  margin-top: 20px;
  color: rgba(230, 237, 243, 0.64);
  font-size: 0.82rem;
}

.drawer-layout {
  display: grid;
  grid-template-columns: minmax(260px, 500px) minmax(260px, 420px);
  justify-content: start;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.drawer-side {
  position: relative;
  display: grid;
  align-content: center;
  gap: 0;
  min-width: 0;
}

.folder-grid {
  display: grid;
  gap: 8px;
  max-width: 544px;
  margin-left: 0;
}

.folder-item {
  --folder-accent: #58a6ff;
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 88px;
  padding: 12px 0;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  outline-offset: 8px;
  transform: translate3d(0, 0, 0);
}

.folder-item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.folder-item::before {
  content: "";
  position: absolute;
  inset: 8px -18px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
  box-shadow: inset 3px 0 0 var(--folder-accent);
  opacity: 0;
  transform: scaleX(0.96);
  transition: opacity 260ms ease, transform 260ms ease;
}

.folder-item:hover::before,
.folder-item:focus-visible::before,
.folder-item.is-active::before {
  opacity: 1;
  transform: scaleX(1);
}

.folder-item:focus-visible {
  outline: 2px solid var(--folder-accent);
}

.folder-icon {
  position: relative;
  width: 56px;
  height: 42px;
  color: rgba(246, 248, 250, 0.78);
  transition: color 260ms ease, transform 260ms ease;
}

.folder-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.folder-item:hover .folder-icon,
.folder-item:focus-visible .folder-icon,
.folder-item.is-active .folder-icon {
  color: var(--folder-accent);
  transform: translateY(-4px) rotate(-2deg);
}

.folder-main {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.folder-label {
  color: #ffffff;
  font-size: clamp(1.45rem, 3.4vw, 2.92rem);
  line-height: 0.92;
  font-weight: 720;
}

.folder-desc {
  color: rgba(230, 237, 243, 0.58);
  font-size: 0.78rem;
}

.folder-meta {
  position: relative;
  display: grid;
  justify-items: end;
  gap: 6px;
  color: rgba(230, 237, 243, 0.58);
  font-size: 0.72rem;
}

.folder-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--folder-accent);
  box-shadow: 0 0 18px var(--folder-accent);
}

.drawer-inspector {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px 24px 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.055), transparent);
}

.inspector-kicker {
  color: var(--drawer-current, #58a6ff);
  font-size: 0.72rem;
}

.drawer-inspector h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  line-height: 0.98;
}

.drawer-inspector p {
  margin: 0;
  color: rgba(230, 237, 243, 0.68);
  font-size: 0.92rem;
  line-height: 1.7;
}

.drawer-enter {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
  text-decoration: none;
}

.drawer-enter::after {
  content: "->";
  color: var(--drawer-current, #58a6ff);
}

.drawer-enter:hover,
.drawer-enter:focus-visible {
  border-color: var(--drawer-current, #58a6ff);
  text-decoration: none;
}

@media (max-width: 900px) {
  #drawer-hub {
    min-height: auto;
    padding: 80px 0;
  }

  .drawer-preview {
    right: -12vw;
    top: 28%;
    width: 72vw;
    min-width: 0;
    opacity: 0.48;
  }

  .drawer-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  #drawer-hub .drawer-content {
    max-width: var(--content-max);
    margin: 0 auto;
    padding-right: 24px;
    padding-left: 24px;
  }

  .drawer-side {
    order: -1;
  }

  .drawer-inspector {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .drawer-heading {
    margin-bottom: 36px;
  }

  .folder-item {
    grid-template-columns: 52px 1fr;
    min-height: 78px;
    gap: 12px;
  }

  .folder-meta {
    display: none;
  }

  .folder-icon {
    width: 44px;
    height: 34px;
  }

  .folder-desc {
    font-size: 0.72rem;
  }

  .drawer-preview {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer-bg-item,
  .folder-item,
  .folder-icon,
  .folder-item::before {
    transition: none;
  }
}
