:root {
  --black: #09090b;
  --surface: #111113;
  --surface-2: #18181b;
  --surface-3: #27272a;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --white: #fafafa;
  --text-1: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #52525b;
  --accent: #818cf8;
  --accent-dim: rgba(129, 140, 248, 0.08);
  --yellow: #facc15;
  --red: #ef4444;
  --green: #22c55e;
  --blue: #60a5fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

html,
body {
  background: var(--black);
  color: var(--text-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #000;
  z-index: 999;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 6px 0;
}

/* ---- Top Bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  background: var(--black);
  z-index: 50;
  border-bottom: 1px solid var(--border);
}

.topbar-logo {
  height: 28px;
  width: auto;
}

.topbar-actions {
  display: flex;
  gap: 2px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-2);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition:
    color 0.1s,
    background 0.1s;
  text-decoration: none;
  flex-shrink: 0;
}

.icon-btn.sm {
  width: 30px;
  height: 30px;
  font-size: 0.82rem;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

.icon-btn:active {
  background: var(--surface-3);
}

.icon-btn.active-bookmark {
  color: var(--yellow);
}

.icon-btn.active-bookmark:hover {
  color: var(--yellow);
}

.text-btn {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.1s;
}

.text-btn:hover {
  color: var(--text-2);
}

/* ---- Search ---- */
.search-panel {
  padding: 0.5rem 1rem 0.75rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 0.75rem;
  height: 40px;
  transition: border-color 0.1s;
}

.search-box:focus-within {
  border-color: var(--border-hover);
}

.search-box i {
  color: var(--text-3);
  font-size: 0.8rem;
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-1);
  font-size: 0.85rem;
  outline: none;
  height: 100%;
}

.search-box input::placeholder {
  color: var(--text-3);
}

#searchClose {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 2px;
  display: flex;
  font-size: 0.85rem;
}

#searchClose:hover {
  color: var(--text-2);
}

/* ---- Layout ---- */
.layout {
  display: flex;
  min-height: calc(100vh - 53px);
}

/* ---- Sidebar ---- */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  position: sticky;
  top: 53px;
  height: calc(100vh - 53px);
  border-right: 1px solid var(--border);
}

.sidebar-right {
  border-right: none;
  border-left: 1px solid var(--border);
}

.sidebar-header {
  margin-bottom: 0.75rem;
}

.sidebar-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.1s,
    color 0.1s;
  font-size: 0.78rem;
  color: var(--text-2);
  border: none;
  background: none;
  text-align: left;
  width: 100%;
}

.sidebar-nav-item:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

.sidebar-nav-item.active {
  background: var(--surface-2);
  color: var(--text-1);
}

.sidebar-nav-item i {
  width: 18px;
  text-align: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  color: var(--text-3);
  transition: color 0.1s;
}

.sidebar-nav-item:hover i,
.sidebar-nav-item.active i {
  color: var(--text-2);
}

.sidebar-nav-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar sections */
.sidebar-section {
  margin-bottom: 1.25rem;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-section-title i {
  font-size: 0.6rem;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 0.75rem;
  color: var(--text-2);
}

.sidebar-item:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

.sidebar-item-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.7rem;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--text-3);
}

.sidebar-item-icon.folder {
  background: rgba(250, 204, 21, 0.06);
  color: var(--yellow);
}

.sidebar-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-item-remove {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 2px;
  font-size: 0.65rem;
  display: flex;
  opacity: 0;
  transition:
    opacity 0.1s,
    color 0.1s;
}

.sidebar-item:hover .sidebar-item-remove {
  opacity: 1;
}

.sidebar-item-remove:hover {
  color: var(--red);
}

.sidebar-empty {
  font-size: 0.72rem;
  color: var(--text-3);
  padding: 0.5rem 0;
}

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.5rem;
  text-align: center;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.6rem;
  color: var(--text-3);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* File type breakdown */
.type-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--text-2);
  cursor: default;
}

.type-bar:hover {
  background: var(--surface-2);
}

.type-bar-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.65rem;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--text-3);
}

.type-bar-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-bar-count {
  font-size: 0.65rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.type-bar-fill {
  width: 40px;
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  flex-shrink: 0;
  overflow: hidden;
}

.type-bar-fill-inner {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ---- Content ---- */
.content {
  padding: 0 1rem 3rem;
  flex: 1;
  min-width: 0;
}

/* ---- Hero ---- */
.hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 1.75rem;
  margin-top: 0.5rem;
}

.hero-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.hero-title {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-2);
}

.hero-title span {
  font-weight: 600;
  color: var(--text-1);
  font-size: 1.35rem;
  display: block;
}

/* ---- Section Heading ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.75rem;
}

.section-header .section-heading {
  margin-bottom: 0;
}

/* ---- Recent Grid ---- */
.recent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 1.5rem;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition:
    border-color 0.1s,
    background 0.1s;
  min-height: 44px;
}

.recent-item:hover {
  background: var(--surface-2);
  border-color: var(--border-hover);
}

.recent-item:active {
  background: var(--surface-3);
}

.recent-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.8rem;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--text-2);
}

.recent-icon.folder {
  background: rgba(250, 204, 21, 0.06);
  color: var(--yellow);
}

.recent-name {
  flex: 1;
  font-size: 0.78rem;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.1s;
}

.recent-item:hover .recent-name {
  color: var(--text-1);
}

.recent-time {
  font-size: 0.65rem;
  color: var(--text-3);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ---- Department Grid ---- */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.dept-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition:
    border-color 0.1s,
    background 0.1s;
  color: var(--text-1);
  -webkit-tap-highlight-color: transparent;
  min-height: 100px;
  overflow: hidden;
}

.dept-card:hover {
  background: var(--surface-2);
  border-color: var(--border-hover);
}

.dept-card:active {
  background: var(--surface-3);
}

.dept-icon {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-2);
  transition: color 0.1s;
}

.dept-card:hover .dept-icon {
  color: var(--text-1);
}

.dept-label {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-2);
  transition: color 0.1s;
}

.dept-card:hover .dept-label {
  color: var(--text-1);
}

/* ---- Folder View ---- */
.folder-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  padding-top: 0.5rem;
}

.folder-path {
  font-size: 0.8rem;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.folder-path span {
  color: var(--text-3);
}

.folder-path b {
  color: var(--text-1);
  font-weight: 500;
}

/* ---- Toolbar ---- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  min-height: 34px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.toolbar-right {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.file-count {
  font-size: 0.68rem;
  color: var(--text-3);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ---- Filter Chips ---- */
.filter-chips {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: none;
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.1s,
    color 0.1s,
    background 0.1s;
  flex-shrink: 0;
}

.chip i {
  font-size: 0.6rem;
}

.chip:hover {
  color: var(--text-2);
  border-color: var(--border-hover);
}

.chip.active {
  color: var(--text-1);
  border-color: var(--border-hover);
  background: var(--surface-2);
}

/* ---- Sort Dropdown ---- */
.sort-dropdown {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  width: fit-content;
}

.sort-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--text-3);
  font-size: 0.7rem;
  cursor: pointer;
  transition:
    color 0.1s,
    background 0.1s;
  white-space: nowrap;
}

.sort-option i {
  font-size: 0.65rem;
}

.sort-option:hover {
  color: var(--text-2);
}

.sort-option.active {
  color: var(--text-1);
  background: var(--surface-2);
}

/* ---- Folder Grid ---- */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.folder-grid.list-view {
  grid-template-columns: 1fr;
  gap: 2px;
}

.folder-grid.list-view .file-cell {
  flex-direction: row;
  padding: 0.55rem 0.65rem;
  min-height: 0;
  gap: 0.6rem;
  text-align: left;
}

.folder-grid.list-view .file-cell-icon {
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
}

.folder-grid.list-view .file-cell-name {
  flex: 1;
  -webkit-line-clamp: 1;
  font-size: 0.78rem;
}

.folder-grid.list-view .file-cell-meta {
  flex-shrink: 0;
}

.file-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.1rem 0.5rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition:
    border-color 0.1s,
    background 0.1s;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  min-height: 120px;
  overflow: hidden;
}

.file-cell:hover {
  background: var(--surface-2);
  border-color: var(--border-hover);
}

.file-cell:active {
  background: var(--surface-3);
}

.file-cell-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.file-cell-icon.folder {
  background: rgba(250, 204, 21, 0.06);
  color: var(--yellow);
}

.file-cell-icon.file {
  background: var(--surface-3);
  color: var(--text-2);
}

.file-cell-icon.file.fa-brands.fa-html5,
.file-cell-icon.file.fa-brands.fa-css3-alt,
.file-cell-icon.file.fa-brands.fa-js,
.file-cell-icon.file.fa-brands.fa-python,
.file-cell-icon.file.fa-brands.fa-java,
.file-cell-icon.file.fa-brands.fa-react,
.file-cell-icon.file.fa-brands.fa-vuejs,
.file-cell-icon.file.fa-brands.fa-php,
.file-cell-icon.file.fa-brands.fa-swift,
.file-cell-icon.file.fa-brands.fa-golang,
.file-cell-icon.file.fa-brands.fa-apple,
.file-cell-icon.file.fa-brands.fa-android {
  color: var(--text-1);
}

.file-cell-icon.file.fa-solid.fa-file-pdf {
  color: var(--red);
  background: rgba(239, 68, 68, 0.06);
}

.file-cell-icon.file.fa-solid.fa-file-word {
  color: var(--blue);
  background: rgba(96, 165, 250, 0.06);
}

.file-cell-icon.file.fa-solid.fa-file-excel {
  color: var(--green);
  background: rgba(34, 197, 94, 0.06);
}

.file-cell-icon.file.fa-solid.fa-file-powerpoint {
  color: #f97316;
  background: rgba(249, 115, 22, 0.06);
}

.file-cell-icon.file.fa-solid.fa-file-video,
.file-cell-icon.file.fa-solid.fa-clapperboard {
  color: #a855f7;
  background: rgba(168, 85, 247, 0.06);
}

.file-cell-icon.file.fa-solid.fa-file-audio {
  color: #f97316;
  background: rgba(249, 115, 22, 0.06);
}

.file-cell-icon.file.fa-solid.fa-file-zipper {
  color: #eab308;
  background: rgba(234, 179, 8, 0.06);
}

.file-cell-icon.file.fa-solid.fa-database {
  color: #14b8a6;
  background: rgba(20, 184, 166, 0.06);
}

.file-cell-icon.file.fa-solid.fa-terminal {
  color: var(--green);
  background: rgba(34, 197, 94, 0.06);
}

.file-cell-icon.file.fa-brands.fa-git-alt {
  color: #f97316;
  background: rgba(249, 115, 22, 0.06);
}

.file-cell-icon.file.fa-brands.fa-docker {
  color: var(--blue);
  background: rgba(96, 165, 250, 0.06);
}

.file-cell-name {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  max-width: 100%;
  transition: color 0.1s;
  word-break: break-word;
}

.file-cell:hover .file-cell-name {
  color: var(--text-1);
}

.file-cell-meta {
  font-size: 0.65rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ---- State Boxes ---- */
.state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-3);
  gap: 0.5rem;
}

.state-box i {
  font-size: 1.5rem;
  color: var(--red);
  margin-bottom: 0.25rem;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--surface-3);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  font-size: 0.8rem;
  transition:
    border-color 0.1s,
    color 0.1s,
    background 0.1s;
}

.back-to-top:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
  background: var(--surface-2);
}

/* ---- Viewer ---- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--black);
  display: flex;
  flex-direction: column;
}

.viewer-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.viewer-name {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.viewer-actions {
  display: flex;
  gap: 0;
  flex-shrink: 0;
}

.viewer-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 0.75rem;
}

.viewer-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.viewer-content video {
  max-width: 100%;
  max-height: 100%;
  outline: none;
}

.viewer-content audio {
  width: 50%;
  min-width: 260px;
}

.viewer-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.viewer-content pre {
  width: 100%;
  max-width: 780px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow: auto;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}

.unsupported {
  text-align: center;
  color: var(--text-3);
  padding: 3rem 1rem;
}

.unsupported i {
  font-size: 2rem;
  color: var(--text-3);
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.4;
}

.unsupported p {
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.unsupported a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 0.45rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.78rem;
  transition:
    border-color 0.1s,
    color 0.1s;
}

.unsupported a:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
}

/* ---- Responsive ---- */
@media (max-width: 1199px) {
  .sidebar {
    display: none;
  }

  .back-to-top {
    right: 1rem;
  }
}

@media (min-width: 1200px) {
  .content {
    max-width: 760px;
    margin: 0 auto;
  }

  .dept-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .folder-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .back-to-top {
    right: calc(220px + 1rem);
  }
}

@media (min-width: 1500px) {
  .content {
    max-width: 860px;
  }

  .dept-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .folder-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1800px) {
  .content {
    max-width: 960px;
  }

  .dept-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .folder-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
